save_check: Conditionally save file to RDS.

View source: R/file_tools.R

save_checkR Documentation

Conditionally save file to RDS.

Description

Wrapper around saveRDS() but checks if file already exists first. If it does then it will only save if overwrite = TRUE. A message is given whether the object is saved or not.

Usage

save_check(object, file, overwrite = FALSE, ...)

Arguments

object

Object to save.

file

The name of the file where object is to be saved.

overwrite

Will only overwrite existing file if set to TRUE.

...

Other arguments passed to saveRDS()

Value

(invisible) The file argument.


jedwards24/edwards documentation built on Sept. 2, 2023, 8:16 a.m.