Skip to contents

A helper function for the read and write functions that returns the directory path based on the subject ID.

Usage

loc(subject)

Arguments

subject

A character vector denoting the Pregnancy 24/7 subject.

Value

A character value that is the directory path for the subject of interest. If subject starts with a

  • 1 then the start of the directory path will be ./DATA_Iowa_activPAL,

  • 5 then the start of the directory path will be ./DATA_Pitt_activPAL, or

  • 8 then the start of the directory path will be ./DATA_WVU_activPAL.

Details

This function is meant to work within the read_events() and write_events() functions based on no errors being produced by check_dir().

Examples

loc("1001-AB")
#> [1] "./DATA_Iowa_activPAL/1001-AB/"
loc("5001-AB")
#> [1] "./DATA_Pitt_activPAL/5001-AB/"
loc("8001-AB")
#> [1] "./DATA_WVU_activPAL/8001-AB/"