save_rds | R Documentation |
Save rds
save_rds(
object,
filename = NULL,
path = NULL,
overwrite = FALSE,
verbose = TRUE,
...
)
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. |
verbose |
If true, messages are printed to the console. |
... |
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.
It is possible to set path = ""
and use the entire path including the file
name as filename
argument.
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.