You can try converting each layer to data frame instead of all the layers
at once time. You can do this using a loop.
r <- terra::rast(file.nc)
df<- NULL
for( i in 1:nlyr(r)){
r1 <- r[[i]]
r1.df <- as.data.frame(r1,xy =T)
df <- rbind(df, r1.df)
}
Best regards
Vlad Alexandru AMIHAESEI
On
gb_1km_daily_20150101-20150131.nc",
subds = "yourvarname")
or with raster library:
r1 <- raster::brick("chess-met_precip_gb_1km_daily_20150101-20150131.nc")
same,
r1.sub <- raster::brick("chess-met_precip_gb_1km_daily_20150101-20150131.nc",
varname = "your
Hi,
I have an error when I want to install stars package from github
if (!require(remotes))
install.packages("remotes")
remotes::install_github("r-spatial/stars")
library(stars)
I have this :
ERROR: lazy loading failed for package ‘stars’
* removing