loicdtx / bfastSpatial

Set of utilities and wrappers to perform change detection on satellite image time-series (Landsat and MODIS). Includes pre-processing steps and functions for spatial implementation of bfastmonitor change detection and post processing of the results.
93 stars 39 forks source link

Error when installing the package #97

Closed nikosGeography closed 8 months ago

nikosGeography commented 8 months ago

I am trying to install the package following the example in the Code section, like so:

library(devtools)
install_github('loicdtx/bfastSpatial')

but I am getting an error:

Downloading GitHub repo loicdtx/bfastSpatial@HEAD
Skipping 2 packages not available: rgdal, gdalUtils
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\nikos\AppData\Local\Temp\Rtmp0egzmI\remotes2ebc78de1750\loicdtx-bfastSpatial-9aa6461/DESCRIPTION'
─  preparing 'bfastSpatial': (528ms)
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a 'data/datalist' file should be added
─  building 'bfastSpatial_0.6.3.tar.gz'

ERROR: dependency 'gdalUtils' is not available for package 'bfastSpatial'
* removing 'C:/Program Files/R/R-4.3.2/library/bfastSpatial'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/nikos/AppData/Local/Temp/Rtmp0egzmI/file2ebc565a2848/bfastSpatial_0.6.3.tar.gz’ had non-zero exit status

Then I tried to install the gdalUtils package using the install.package("gdalUtils") function but I am getting this error:

Warning in install.packages :
  package ‘gdalUtils’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

Is there a workaround or the package is not available?

R 4.3.2, RStudio 2023.12.0 Build 369, Windows 11.

nikosGeography commented 8 months ago

Just solved it. The order for the installation of the packages should be:

library(devtools)
devtools:::install_github("gearslaboratory/gdalUtils")
install_github('loicdtx/bfastSpatial')
loicdtx commented 8 months ago

See https://github.com/loicdtx/bfastSpatial/issues/95#issuecomment-1427880860