Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgdal retired, causing issues for ggsegExtra on newer R versions #59

Open
serenaverdi opened this issue Jan 5, 2024 · 7 comments
Open
Labels
atlas request Atleas request help wanted Extra attention is needed

Comments

@serenaverdi
Copy link

When installing ggsegExtra:-

ERROR: dependency ‘rgdal’ is not available for package ‘ggsegExtra’, as package ‘rgdal’ is not available for later versions of R (my version is 4.3.2 (2023-10-31))

Is there another way I can use ggsegExtra?

Thanks!

@serenaverdi serenaverdi added atlas request Atleas request help wanted Extra attention is needed labels Jan 5, 2024
@ramroomh
Copy link

ramroomh commented Jan 8, 2024

Try this:

# Download package tarball from CRAN archive: https://cran.r-project.org/src/contrib/Archive/rgdal/
url <- https://cran.r-project.org/src/contrib/Archive/rgdal/rgdal_1.6-7.tar.gz
pkgFile <- "rgdal_1.6-7.tar.gz"
download.file(url = url, destfile = pkgFile)

# Install package
install.packages(pkgs=pkgFile, type="source", repos=NULL)

# Delete package tarball
unlink(pkgFile)

from: https://stackoverflow.com/questions/24194409/how-do-i-install-a-package-that-has-been-archived-from-cran

@serenaverdi
Copy link
Author

Thanks, although it was unsuccessful (see below). I have downloaded gdal (via brew) too, but still no luck. Is there any other way to install ggsegExtra? Thanks for you help!

Install package

install.packages(pkgs=pkgFile, type="source", repos=NULL)

  • installing source package ‘rgdal’ ...
    ** package ‘rgdal’ successfully unpacked and MD5 sums checked
    ** using staged installation
    configure: R_HOME: /Library/Frameworks/R.framework/Resources
    configure: CC: clang -arch arm64
    configure: CXX: clang++ -arch arm64 -std=gnu++17
    configure: CFLAGS: -falign-functions=64 -Wall -g -O2
    configure: CPPFLAGS: -I/opt/R/arm64/include
    configure: CXXFLAGS: -falign-functions=64 -Wall -g -O2
    configure: LDFLAGS: -L/opt/R/arm64/lib
    configure: LDFLAGS: -L/opt/R/arm64/lib
    configure: CXX17 is: clang++ -arch arm64, CXX17STD is: -std=gnu++17
    configure: CXX is: clang++ -arch arm64 -std=gnu++17
    configure: C++17 support available
    configure: rgdal: 1.6-7
    checking for /usr/bin/svnversion... no
    configure: svn revision: 1203
    checking for gdal-config... no
    no
    configure: error: gdal-config not found or not executable.
    ERROR: configuration failed for package ‘rgdal’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/rgdal’
    Warning in install.packages :
    installation of package ‘rgdal_1.6-7.tar.gz’ had non-zero exit status

@serenaverdi serenaverdi closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024
@serenaverdi serenaverdi reopened this Jan 9, 2024
@ramroomh
Copy link

ramroomh commented Jan 9, 2024

@drmowinckels
Copy link
Contributor

@ramroomh thank you so much for assisting! I'm very busy with other tasks now, but I am paying attention and noting what is being tried, so I can hopefully fix things later.

@amirhusseinab
Copy link

@ramroomh I'm trying to use it on my Windows machine. Any suggestions for that? Searching for "rgdal" leads to this page: https://cran.r-project.org/web/packages/rgdal/index.html in which "sf" or "terra" are suggested as a substitute - which I think changes are required for ggsegExtra to be made.

@drmowinckels
Copy link
Contributor

Info have a dev version of the package where i am trying to sub rgdal with sf, but its not working yet and its trickier than expected. I, unfortunately, don't have lots of time.to dedicate to the worn right now. I hope that changes after march

@ramroomh
Copy link

Hello everyone,

For now I've created a work around to the dependency problem, where I've created a docker image of an rstudio server with ggseg and associated packages preloaded (including rgdal).

Here are the steps in terminal, please note this requires installing docker and creating a docker hub account:

  1. Download the docker image
    docker pull ramroomh/ggseg-rstudio-server:v0.1

  2. run the image and port the image to a webserver
    docker run -d -p 8787:8787 -e PASSWORD=password --name ggseg-instance ramroomh/ggseg-rstudio-server:v0.1

  3. access the server on a web browser by pasting:
    http://localhost:8787

  4. login with default user and pass
    user: rstudio_user, pass: password

  5. start using ggseg

  6. export plots with:
    docker cp ggseg-instance:/home/rstudio_user/name_of_image.png /path/to/save/name_of_image.png

Currently it is preloaded with the brodmann atlas but happy to add the other atlases if there is interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
atlas request Atleas request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants