rgeeExtra icon indicating copy to clipboard operation
rgeeExtra copied to clipboard

Trouble with rgeeExtra install

Open gltyree opened this issue 3 years ago • 6 comments

Hi, I want to use rgeeExtra to import Javascript modules from GEE, as described in r-spatial/rgee issue #155 (https://github.com/r-spatial/rgee/issues/155). I have successfully downloaded the required version of reticulate (1.22.9000) but I am having difficulty downloading the rgeeExtra package. Below is my code and the output.

remotes::install_github("r-earthengine/rgeeExtra")

Downloading GitHub repo r-earthengine/rgeeExtra@HEAD Error: Failed to install 'rgeeExtra' from GitHub: Git does not seem to be installed on your system. In addition: Warning message: In readLines(file) : incomplete final line found on 'C:\Users\Gtyree\AppData\Local\Temp\RtmpSSb4xZ\remotesd228626324ba/r-earthengine-rgeeExtra-a14ee7c/.gitmodules'

I attempted to solve the issue by installing Git, but after I did that I began to experience the issue described in r-spatial/rgee issue #91 (https://github.com/r-spatial/rgee/issues/91). It's possible that the problem was unrelated to Git, but was only solved after I both uninstalled Git and ran this code:

library(rgee) library(reticulate) earthengine_python <- Sys.getenv("EARTHENGINE_PYTHON", unset = NA) Sys.setenv(RETICULATE_PYTHON = earthengine_python) reticulate::py_config()

Is there a way to install rgeeExtra that doesn't require Git? I have also tried devtools::install_github("r-earthengine/rgeeExtra") but received the same error message.

I am using RStudio v. 1.4.1717 on a Windows 10 computer.

gltyree avatar Dec 21 '21 15:12 gltyree

Here to see what happens. Getting the same error.

joshualerickson avatar Dec 30 '21 21:12 joshualerickson

@joshualerickson @gltyree sorry for the late reply,

PS: rgeeExtra needs reticulate 1.22.9000 to work! Can you try again? thanks! :)

csaybar avatar Dec 31 '21 00:12 csaybar

Work for me, thanks! Updated to 1.22.9000 and works just fine with the rgeeExtra example.

joshualerickson avatar Dec 31 '21 15:12 joshualerickson

Hi Cesar, it worked for me this time as well, thank you for the guidance!

As mentioned in my original post, I want to use rgeeExtra to import .js modules, as discussed in r-spatial/rgee#155. Running an rgee equivalent to var X = require(moduleX) presented this error, in which R misinterpreted the require function:

Model = require('users/gtyreegee/MODIS:Modules/CW16_v3_module')

Loading required package: users/gtyreegee/MODIS:Modules/CW16_v3_module Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘users/gtyreegee/MODIS:Modules/CW16_v3_module’

Do you have any guidance on importing .js modules with rgeeExtra?

gltyree avatar Dec 31 '21 17:12 gltyree

Disregard that last post - I found the ee_module.R script on the rgeeExtra Github page. Will begin a new issue if one crops up. Thanks again!

gltyree avatar Dec 31 '21 18:12 gltyree

:) :+1:

csaybar avatar Jan 02 '22 16:01 csaybar