rasterLayer as internal/external data fail to load

Hi,

I’ve successfully installed a small package from a source .gz file with an internal raster object. Everything went fine with installation, but the raster object cannot be handled in any operation. I've tried to put it as external data with:

usethis::use_data(clc2018, overwrite = T, internal = F)

But the error persists.

> install.packages("/cloud/project/landi_0.0.0.9000.tar.gz", repos = NULL)
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package ‘landi’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
✔ Setting active project to '/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-landi/00new/landi'
✔ Saving 'clc2000' to 'data/clc2000.rda'
✔ Saving 'clc2000' to 'data/clc2000.rda'
✔ Saving 'clc2018' to 'data/clc2018.rda'
✔ Saving 'clc2018' to 'data/clc2018.rda'
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (landi)
> clc2018
class      : RasterLayer 
dimensions : 5761, 3504, 20186544  (nrow, ncol, ncell)
resolution : 100, 100  (x, y)
extent     : 2630400, 2980800, 1727500, 2303600  (xmin, xmax, ymin, ymax)
crs        : +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
source     : C:/sig/CLC/clc2000_n6.tif 
names      : Ano2000 
values     : 1, 6  (min, max)
> plot(clc00)
Error in .local(.Object, ...) :

Any clue?

All the best

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.