Thanks for your answers. This a part of my script where it creates files and saves it in anything path. I am not pretty secure how use file.path() or tempdir(). Can you give me more details about it, please?
if (!exists("path_pet")){ path_pet <- getwd() } else if (!exists("path_p")){ path_p <- getwd() } else if (!exists("path_p") | !exists("path_pet")){ path_pet <- getwd() path_p <- getwd() } if (file_type == "raster"){ # ---- identify raster format and loading---- if (format == "GTiff"){ if( length(list.files(path_pet, pattern = ".tif")) == 0 | length( list.files(path_p, pattern = ".tif")) == 0){ stop("Not avaliable data of precipitation or evapotranspiration") } pet_files <- list.files(path_pet) pet <- raster::stack(paste(path_pet, pet_files, sep = "")) p_files <- list.files(path_p) Kind regards, David Zamora El jue., 16 abr. 2020 a las 17:12, Uwe Ligges (< lig...@statistik.tu-dortmund.de>) escribió: > > > On 16.04.2020 20:09, Duncan Murdoch wrote: > > On 16/04/2020 1:11 p.m., David Andres Zamora Avila wrote: > >> Hi, > >> > >> I submitted my package in CRAN and always appearance the next NOTE. > >> > >> Flavor: r-devel-linux-x86_64-debian-gcc > >> Check: for detritus in the temp directory, Result: NOTE > >> Found the following files/directories: > >> 'RtmpcDoRWjr.nc' > >> > >> I have tried to solve it in several ways (like if(interactive()), but > >> I not > >> sure how can I solve it. > > > > How was the file created? What the check wants is that you delete it > > when you are finished with it. You can use the unlink() function to do > > that. > > Or better create it in tempdir(): I guess you used paste(tempdir(), ...) > instead of file.path() and got afilename one level above tempdir()? > > Best, > Uwe Ligges > > > > > > Duncan Murdoch > > > > ______________________________________________ > > R-package-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-package-devel > -- David Zamora <https://sites.google.com/a/unal.edu.co/dazamoraa/> PhD Student, Universidad Nacional de Colombia, Bogotá phone: +571 3165000 ext 13406 address: Av. NQS (Carrera 30) # 45-03, Hydraulics Lab (408-213) email: dazamo...@unal.edu.co [[alternative HTML version deleted]] ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel