loadRecent: Loads the most recent version of a set of files.

Description Usage Arguments Value Author(s) Examples

View source: R/loadRecent.R

Description

I often save some file (output, data file, etc) many many times, but I add a time stamp to each version. Sometimes I need to load these files and it is important that I always load the most recent version. This function allows me to not worry about updating my programs with the most recent file names, it will just take a substring-filename and find and load the most recent version.

Usage

1
loadRecent(path, fileString, type)

Arguments

path

File path to search

fileString

A substring of the file name.

type

Character vector: either "RDS" or "RDATA", not case sensitive.

Value

Returns whatever is loaded

Author(s)

Brian Carter

Examples

1
cohort <- loadRecent("data","Merged data",".RDS")

buddha2490/MargotFun documentation built on Nov. 4, 2019, 8:16 a.m.