Reverse the side-effects of setupProject():
teardownProject(x, origLibPaths)Either the list returned by setupProject(), or a character
vector of paths to remove (back-compat with the previous
.teardownProject(prjPaths, origLibPaths) signature).
Optional. The .libPaths() to restore. Defaults to
x$paths$.previousLibPaths when x is a setupProject() output, so
most callers will not need to supply this.
NULL, invisibly. Called for its side effects.
remove the project library directory created by setupProject(),
unlink the project paths returned by setupProject(),
restore the .libPaths() value that was in effect before
setupProject() was called.
The previous .libPaths() is stored on the setupProject() output as
out$paths$.previousLibPaths (and on attr(out$paths, "extraPaths")),
so teardownProject(out) is enough – no need to remember
origLibPaths separately.
setupProject() for what is being torn down.