Re: [R-sig-Geo] Sentienl 2 gdal translate

2017-03-17 Thread Loïc Dutrieux
Hi Miguel, Do you have more than one installation of gdal? That could potentially explain why your first try with gdal_translate() did not work. library(gdalUtils) length(getOption("gdalUtils_gdalPath")) should give you the number of installations you have on your system. If more than 1, gdal_c

Re: [R-sig-Geo] xlsx or rJava issue

2017-03-17 Thread Dr Didier G. Leibovici
Thank you Thiago that worked! Rgui: > library(rJava) > library(xlsx) Loading required package: xlsxjars > On 17/03/2017 10:17, Thiago V. dos Santos wrote: > Didier, I noticed you are using macOS. Are you by any chance using RStudio as > well? If yes, besides Edzer's suggestion, the followin

Re: [R-sig-Geo] Sentienl 2 gdal translate

2017-03-17 Thread Miguel Castro Gómez
Hi Loïc, Thanks for your help, When trying the system2 option this is what happens: Image_Path<- “path/to/images/" S2_JP2_List <- list.files(Image_Path, full.names = TRUE, pattern = ".jp2$") for (file in S2_JP2_List) { out_file <- extension(file, 'tif') system2('gdal_translate', args =

Re: [R-sig-Geo] xlsx or rJava issue

2017-03-17 Thread Thiago V. dos Santos via R-sig-Geo
Didier, I noticed you are using macOS. Are you by any chance using RStudio as well? If yes, besides Edzer's suggestion, the following command has also helped me in the past: sudo ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib Then, try re-installing rJava - *from

Re: [R-sig-Geo] xlsx or rJava issue

2017-03-17 Thread Dr Didier G. Leibovici
Yes, thanks Edzer I found this solution though Rgui didn't seem to get it (could that be after a reboot?) thanks, Didier On 17/03/2017 09:56, Edzer Pebesma wrote: > Didier, this is somewhat off-topic for this list, but in the past I've > solved all my R/java troubles with running, as root > > R

Re: [R-sig-Geo] xlsx or rJava issue

2017-03-17 Thread Dr Didier G. Leibovici
A bit of dig up on google and I found (http://stackoverflow.com/questions/35179151/cannot-load-r-xlsx-package-on-mac-os-10-11) which resolves the thing in a terminal but when using Rgui same thing (?) I tried re-installing in Rgui and now it is library(rJava) which cannot load (?) library(xls

Re: [R-sig-Geo] xlsx or rJava issue

2017-03-17 Thread Edzer Pebesma
Didier, this is somewhat off-topic for this list, but in the past I've solved all my R/java troubles with running, as root R CMD javareconf On 17/03/17 10:46, Dr Didier G. Leibovici wrote: > Hi, > > I had some issues with java settings when using xlsx. > > I had re-installed rJava as well. > >

[R-sig-Geo] xlsx or rJava issue

2017-03-17 Thread Dr Didier G. Leibovici
Hi, I had some issues with java settings when using xlsx. I had re-installed rJava as well. > library(xlsx) Error : .onLoad failed in loadNamespace() for 'xlsx', details: call: .jinit() error: JNI_GetCreatedJavaVMs returned -1 Error: package or namespace load failed for ‘xlsx’ JavaVM: re