save_rds | R Documentation |
Save rds
save_rds(
object,
filename = NULL,
path = NULL,
overwrite = FALSE,
rm_object = FALSE,
...
)
object |
R object to serialize. |
filename |
Name of the file where the R object is saved (file extension must be .rds). |
path |
Path to where the R object is saved. |
overwrite |
If true, existing file is overwritten. |
rm_object |
If true, the object is removed form the environment. |
... |
Options passed to saveRDS. |
This function checks if the file aready exists before saving it. If the file aready exists and 'overwrite = FALSE' (default), the file is not saved. The filename and path is combined using 'file.path()'. See '?base::saveRDS()“ for more information
saveRDS
## Not run:
set.seed(42)
x <- runif(n = 100)
save_rds(x, filename = "random_numbers.rds")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.