data_folder: Data Folder

Description Usage Arguments Examples

Description

A function so that users don't need to change where data is loaded from when multiple users are working on a single project. Assumes the data is going to be one folder behind the current directory. Most likely nested inside the function read.csv() or read_csv().

Usage

1
data_folder(file = "", folder = "", steps_back = 1, ws = FALSE)

Arguments

file

The name of the dataset to load as string.

folder

The name where the dataset is stored one directory back. Directories "Data", "data", "dataset", "datasets" are checked automatically.

steps_back

An integer labeling how many steps back from your current wd is the data folder located? Set to 1 by default.

ws

Should there be white space is preceding or trailing the name of the datafolder? Defaults to FALSE.

Examples

1
read.csv(data_folder("mydataset.csv"))

johnhenrypezzuto/blpl documentation built on Dec. 6, 2019, 2:36 a.m.