Open serenaverdi opened 10 months ago
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)
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
Try downloading libgdal-dev
via brew.
@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.
@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.
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
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:
Download the docker image
docker pull ramroomh/ggseg-rstudio-server:v0.1
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
access the server on a web browser by pasting:
http://localhost:8787
login with default user and pass
user: rstudio_user, pass: password
start using ggseg
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.
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!