Remove files in the R session's temporary directory.
This function is useful in conjunction with packages like raster
and aws.s3
, which frequently write files to tempdir()
.
1 |
1 2 3 4 5 6 7 8 9 10 | tmp_csv <- tempfile(fileext = rep(c(".csv", ""), 10))
lapply(tmp_csv, function(path) write.csv("", path))
list.files(tempdir())
rm_tmp(pattern = "\\.csv")
list.files(tempdir())
rm_tmp()
list.files(tempdir())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.