Re: [R-pkg-devel] Error: [writeRaster] cannot write file

2023-10-09 Thread Keshav, Krishna
Hi, This works. I think this is also an implementation of what Berry and Duncan suggested earlier. Thanks. Best Regards, Krishna Keshav From: Iris Simmons Date: Monday, October 9, 2023 at 7:37 PM To: Keshav, Krishna Cc: r-package-devel@r-project.org Subject: Re: [R-pkg-devel] Error

Re: [R-pkg-devel] Error: [writeRaster] cannot write file

2023-10-09 Thread Iris Simmons
You wrote # create the plots directory if it does not exist but then created a directory named outdir/plots/typ_Sys.time.tif You need to rewrite the code like: plotsdir <- file.path(outdir, "plots") fp <- file.path(plotsdir, paste(typ, "_", stringr::str_replace_all(Sys.time(), "[^a-zA-Z0-9

Re: [R-pkg-devel] Error: [writeRaster] cannot write file

2023-10-09 Thread Duncan Murdoch
://builder.r-hub.io/status/geohabnet_1.0.0.tar.gz-a2eaa40ccf1d026bbebf5077bfb482d5> Best Regards, Krishna Keshav *From: *Duncan Murdoch *Date: *Monday, October 9, 2023 at 4:08 PM *To: *Keshav, Krishna , r-package-devel@r-project.org *Subject: *Re: [R-pkg-devel] Error: [writeRaster] cannot write

Re: [R-pkg-devel] Error: [writeRaster] cannot write file

2023-10-09 Thread Keshav, Krishna
tps://builder.r-hub.io/status/geohabnet_1.0.0.tar.gz-a2eaa40ccf1d026bbebf5077bfb482d5 Best Regards, Krishna Keshav From: Duncan Murdoch Date: Monday, October 9, 2023 at 4:08 PM To: Keshav, Krishna , r-package-devel@r-project.org Subject: Re: [R-pkg-devel] Error: [writeRaster] cannot write f

Re: [R-pkg-devel] Error: [writeRaster] cannot write file

2023-10-09 Thread Berry Boessenkool
v, Krishna Sent: Monday, October 9, 2023 20:59 To: r-package-devel@r-project.org Subject: [R-pkg-devel] Error: [writeRaster] cannot write file Hi, I am developing an R package where I need to save Raster file with .tif extension to the tempdir(). I am using terra::writeRaster for the same. While

Re: [R-pkg-devel] Error: [writeRaster] cannot write file

2023-10-09 Thread Duncan Murdoch
What were you using as "outdir"? On 09/10/2023 2:59 p.m., Keshav, Krishna wrote: Hi, I am developing an R package where I need to save Raster file with .tif extension to the tempdir(). I am using terra::writeRaster for the same. While it works through R CMD check in mac, it is failing in R h

[R-pkg-devel] Error: [writeRaster] cannot write file

2023-10-09 Thread Keshav, Krishna
Hi, I am developing an R package where I need to save Raster file with .tif extension to the tempdir(). I am using terra::writeRaster for the same. While it works through R CMD check in mac, it is failing in R hub builder. Snippet �V .saverast <- function(typ, rast, outdir) { if (is.null(outd