Description Usage Arguments Details Value Examples
View source: R/workspaceOperations.R
Writes R script workspace to file in script's Results directory
1 2 3 4 5 6 7 | writeWorkspace(
objectList = ls(envir = parent.frame()),
fileOut = NA,
description = "",
limit = 2,
preserve = FALSE
)
|
objectList |
optional character vector of R object names to write to file |
fileOut |
optional fileName to write workspace to |
description |
character string describing workspace |
limit |
positive integer indicating how many R script workspaces are preserved within this project |
preserve |
logical indicating whether the workspace file is protected form deletion regarding the limit parameter. |
Writes workspace to file, by default it writes all R objects except source_info object. The function is useful for interrogating freshly written R scripts without having to rerun. Also, can be used to pass multiple objects from one R script to the next. The limit parameter limits the file memory space that these workspace dumps can leave behind by deleting older workspace dumps. The preserve logical protects the workspace dump from deletion. The preserve argument should be TRUE if other R scripts depend on the workspace! Workspace file ends end the file suffix ".ws"
return form base::save from workspace write to file.
1 2 3 4 5 6 7 8 | ## Not run:
# Within R script: don't preserve, but save last 4 workspaces
writeWorkspace(limit=4)
# Within R script: preserve, workspace is used by another R script
writeWorkspace(objectList=c("my","favorite","Robjects"),
fileOut="usefulRObjects",description="load me",preserve=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.