Initial version of saving state

This commit is contained in:
Winston Chang
2016-05-19 17:06:53 -05:00
parent 781e15cb84
commit d5975195b3
7 changed files with 118 additions and 22 deletions

View File

@@ -250,6 +250,12 @@ find.file.ci <- function(...) {
return(matches[1])
}
# The function base::dir.exists was added in R 3.2.0, but for backward
# compatibility we need to add this function
dirExists <- function(paths) {
file.exists(paths) & file.info(paths)$isdir
}
# Attempt to join a path and relative path, and turn the result into a
# (normalized) absolute path. The result will only be returned if it is an
# existing file/directory and is a descendant of dir.