Re: [R-sig-Geo] strange issue of memory converting a raster to a data frame

2023-01-23 Thread Vlad Amihaesei
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

Re: [R-sig-Geo] getting data from an nc file

2022-11-09 Thread Vlad Amihaesei
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

[R-sig-Geo] (no subject)

2020-10-07 Thread Vlad Amihaesei
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