setDataDir: Set the data directory

View source: R/datadir.r

setDataDirR Documentation

Set the data directory

Description

This function is automatically called upon loading the package through 'library(alspac)' It creates a global option called 'alspac_data_dir' which is used by the extractVars function to locate the alspac data files. This function guesses the path to be used as default in setDataDir. The defaults are:

  • Windows: R:/Data/Useful_data/current_R/

  • Mac: /Volumes/data/Useful_data/current_R/

  • Linux: ~/.gvfs/data/Useful_data/current_R/

Usage

setDataDir(datadir = getDefaultDataDir())

Arguments

datadir

The directory where the ALSPAC data can be found

Value

Null. Assigns the option alspac_data_dir

Examples

## Not run: 
setDataDir() # This sets the path based on the operating system's default
setDataDir("/some/other/path/") # This is how to supply a path manually

## End(Not run)

explodecomputer/alspac documentation built on Feb. 16, 2024, 4:18 p.m.