[R-pkg-devel] Help with detritus on temporary directory note

Thierry Onkelinx th|erry@onke||nx @end|ng |rom |nbo@be
Thu May 30 13:12:10 CEST 2024


Dear Hector,

The tmp dir depends on the R session. Use tools::R_user_dir("your_package",
which = "cache") if you want a permanent cache of the files.

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be
Havenlaan 88 bus 73, 1000 Brussel
*Postadres:* Koning Albert II-laan 15 bus 186, 1210 Brussel
*Poststukken die naar dit adres worden gestuurd, worden ingescand en
digitaal aan de geadresseerde bezorgd. Zo kan de Vlaamse overheid haar
dossiers volledig digitaal behandelen. Poststukken met de vermelding
‘vertrouwelijk’ worden niet ingescand, maar ongeopend aan de geadresseerde
bezorgd.*
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op do 30 mei 2024 om 12:26 schreef Héctor Meleiro Suárez <
hmeleiros using gmail.com>:

> Hello everybody. I'm having a problem submitting a package to CRAN. It
> involves a NOTE about  detritus files on the temporary directory.
>
> The thing is my package basically downloads a zip file to the temporary
> directory, unzips, reads and processes some of the extracted files and
> imports the data to the R environment. So after the examples and tests are
> run the temporary directory is full of those files. So I implemented an
> internal cleanup function that removes the download zip file and the
> directory to which the files are extracted and, of course, the NOTE
> disappears. But I really don't like this approach because I want the
> function to keep the files in the temporary directory so that if a file has
> been already downloaded it would not download the file again and just read
> the data.
>
> I thought that R cleaned up the temporary directory when the session ended.
> So why is this a problem? Is it that there are too many files aftes
> examples and tests are run? or would this NOTE be an issue to CRAN even if
> only one file was detected at the end?
>
> Thanks in advance.
>
> This is the NOTE on the logs:
>
> * checking for detritus in the temp directory ... NOTE
> Found the following files/directories:
>   ‘RtmpRfd2nv\02202307_MESA’ ‘RtmpRfd2nv\02202307_MESA.zip’
>   ‘RtmpRfd2nv\02202307_MUNI’ ‘RtmpRfd2nv\02202307_MUNI.zip’
>   ‘RtmpRfd2nv\02202307_TOTA’ ‘RtmpRfd2nv\02202307_TOTA.zip’
>   ‘RtmpRfd2nv\03202307_MUNI’ ‘RtmpRfd2nv\03202307_MUNI.zip’
>   ‘RtmpUEZkAQ\02198210_MUNI’ ‘RtmpUEZkAQ\02198210_MUNI.zip’
>   ‘RtmpUEZkAQ\02201904_MESA’ ‘RtmpUEZkAQ\02201904_MESA.zip’
>   ‘RtmpUEZkAQ\03201911_MUNI’ ‘RtmpUEZkAQ\03201911_MUNI.zip’
>   ‘RtmpVtjuwE\02198210_TOTA’ ‘RtmpVtjuwE\02198210_TOTA.zip’
>   ‘RtmpVtjuwE\02201911_MUNI’ ‘RtmpVtjuwE\02201911_MUNI.zip’
>   ‘RtmpVtjuwE\03200403_MUNI’ ‘RtmpVtjuwE\03200403_MUNI.zip’
>   ‘RtmpcFaNBb\02201512_MUNI’ ‘RtmpcFaNBb\02201512_MUNI.zip’
>   ‘Rtmpe86bkd\02198210_TOTA’ ‘Rtmpe86bkd\02198210_TOTA.zip’
>   ‘Rtmpe86bkd\02201911_MUNI’ ‘Rtmpe86bkd\02201911_MUNI.zip’
>   ‘Rtmpe86bkd\02202307_MESA’ ‘Rtmpe86bkd\02202307_MESA.zip’
>   ‘Rtmpe86bkd\03200403_MUNI’ ‘Rtmpe86bkd\03200403_MUNI.zip’
> * DONE
> Status: 1 NOTE
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list