After the session, I would like to clear my temporary folders, for example,
d <- tempfile() dir.create(d) setwd(d) # now work and sweave and latex etc
How to remove d and its elements? file.remove does not work.
d
file.remove
Try unlink("d", recursive=TRUE) . This should remove the folder and its contents.
unlink("d", recursive=TRUE)
Try ?unlink . Depends on what you use, but this:
?unlink
unlink(d, recursive=TRUE)
Must work. If you want to delete the contents and reuse the folder, you can try the following:
file.remove(dir(d, full.names=TRUE))
Source: https://habr.com/ru/post/889755/More articles:Fake HTTP request requests for testing on Android - androidWhere to find the stdio.h implementation? - cVS MSTest runner blocks System.Data.SQLite.dll while working in memory tests - c #What is the difference between a tree and a directory? - gitWhat does the PHP assignment operator do? - phpcss absolute position within the relative position, not overlapping - cssAre there any monitors in C? - cHow to insert multiple records in one trip to the database using PDO? - phpOrdering tabs in Vim minibufexplorer - vimASIHTTPRequest POST iPhone - iosAll Articles