#set path to EBV netCDF
file <- system.file(file.path("extdata","martins_comcom_subset.nc"), package="ebvcube")
#get all datacubepaths of EBV netCDF
datacubes <- ebv_datacubepaths(file, verbose=FALSE)
# \donttest{
#read data as DelayedArray
cSAR.delayedarray <- ebv_read(filepath = file, datacubepath = datacubes[1,1],
entity = 1, timestep = c(1,3), type='da',
sparse = TRUE)
#read data as SpatRaster
cSAR.raster <- ebv_read(filepath = file,entity = 1, timestep = "2000-01-01",
type='r', metric = 1)
#read data as Array
cSAR.array <- ebv_read(filepath = file, datacubepath = datacubes[1,1],
entity = 1, timestep = 1, type='r')
# }
Run the code above in your browser using DataLab