load_most_recent: Wrapper for 'load()' and 'readr::read_csv()' that saves a...

Description Usage Arguments Examples

View source: R/load-most-recent.R

Description

Wrapper for load() and readr::read_csv() that saves a RData or csv with today's date appended to filename

Usage

1
load_most_recent(directory, filename_keyword = NULL, date_in_filename = TRUE)

Arguments

directory

directory to look for most recent data files in

filename_keyword

a file name (e.g. "data.RData") or keyword (e.g. "patient-data"). If provided, function will only consider files in that directory with that name or keyword

date_in_filename

If TRUE, function will use dates in filenames to sort. If FALSE function will use the date the file was last updated to sort. TRUE by default.

Examples

1
save_date(df, here::here("data", "patients.RData"))

karissawhiting/kwiktools documentation built on May 24, 2021, 1:30 a.m.