Skip to contents

By 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.

Usage

save_rds_with_suffix(object, dir, basename = NULL, suffix = "", ext = "rds")

Arguments

object

Object to save as an .rds file.

dir

Directory in which to save the .rds file.

basename

Base name for the .rds, before any suffix or the file extension, as a string. If NULL, use the name of the object in the R environment. Default NULL.

suffix

Suffix to append to the basename before the file extension. Default "" (no suffix).

ext

Extension for the saved file, without the .. Default rds.

Value

Nothing, saving the object as a side effect.