str_file: Create File path with Today's Date appended

Description Usage Arguments Value Examples

Description

used to paste strings together for file location. Primary usage is for long directory names that you can store in a string, as well as for automatically appending the date to a file name for intermittenly run reports/etc.

Usage

1
str_file(dir, file, ext, date = T)

Arguments

dir

path to directory

file

filename

ext

extension type

date

logical for Y/N appended date

Value

Character String with the path to filename

Examples

1
2
3
4
5
str_file("C:/Documents", "Test", "csv")
data(mtcars)
DataEx = head(mtcars)
write.csv(DataEx, str_file("C:/Documents", "Test", "csv"))
write.csv(DataEx, str_file("C:/Documents", "Test", "csv", date = F))

Ajfrick/AVRCHelp documentation built on May 28, 2019, 1:34 a.m.