here_data: Find your data folder

Description Usage Arguments Details Value Examples

View source: R/here_data.R

Description

Similar to here::here() which returns your project directory, here_data() returns the path to your current data folder based on the date in data_date.txt

Usage

1
here_data(..., data_folder_name = "secure_data")

Arguments

...

[character]
Path components below the project root, can be empty. Each argument should be a string containing one or more path components separated by a forward slash "/".

data_folder_name

name of data folder. Default is "secure_data"

Details

The function expects the user to version their data using a text file indicating the date the data was last received, and the data to be stored in a corresponding folder name, e.g. ~\Project Folder\secure_data\2020-01-01.

Value

path to data folder

Examples

1
2
3
4
5
6
7
8
## Not run: 
here_data()
#> "C:\Users\SjobergD\GitHub\My Project\secure_data\2020-01-01"

here_data("Raw Data.xlsx")
#> "C:\Users\SjobergD\GitHub\My Project\secure_data\2020-01-01\Raw Data.xlsx"

## End(Not run)

ddsjoberg/bstfun documentation built on May 4, 2021, 9:39 a.m.