setPath | R Documentation |
Set a named path to avoid absolute path in R scripts
setPath(pathname, path, makedir = c("Ask", "Force", "Never"))
pathname |
pathname Label |
path |
absolute path to associate with the pathname |
makedir |
if "Force" path will be created if it doesn't exist, if "Never" path will not be created and a warning will pop if path is missing. If set to "Ask" a prompt will ask for confirmation before creating the missing directory |
Previous defined path
setPath("SOURCES","c:/dev/Rsources", makedir = "Never")
getPath("SOURCES")
# Setting a name/keyword associated to a specific path
setPath(pathname = "DATA",
path = "./data", # Note './' for relative paths
makedir = "Never")
# Checking the path is properly set
getPath("DATA")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.