Save an object to .rds in a given dir, with programmatic naming.
Source: R/utils.R
save_rds_with_suffix.RdBy default, names the .rds file according to
the object name in the R environment, with an
optional string suffix appended.
So for example a variable named my_var with
suffix equal to "my_suffix" would be saved to disk
as <output_dir>/my_var_my_suffix.rds. Alternatively,
a custom basename can be supplied. The suffix
will still be added.
Arguments
- object
Object to save as an
.rdsfile.- dir
Directory in which to save the
.rdsfile.- basename
Base name for the
.rds, before anysuffixor the file extension, as a string. IfNULL, use the name of the object in the R environment. DefaultNULL.- suffix
Suffix to append to the
basenamebefore the file extension. Default""(no suffix).- ext
Extension for the saved file, without the
.. Defaultrds.