Function for retrieving study specific identifiers.

get_study_info(dir, list_to_global = FALSE)

Arguments

dir

The relative path to the study directory (expects to find meta_study.txt in this folder).

list_to_global

Boolean parameter, if set to TRUE all study identifiers will be returned to the global environment. Default is FALSE.

Value

A list with study specific identifiers, or nothing (i.e list_to_global = TRUE).

Details

This function takes one required parameter (dir). This is the relative path to the main directory for the study of interest. The function reads in the meta_study.txt file and extracts unique study identifiers. This returns a list that holds all the identifiers. The user can also return the study identifiers to the global environment. To do so, set the list_to_global = TRUE.

Examples

if (FALSE) {
#return study identifiers as  list:
my_study_info= get_study_info(dir = "path/to/study/")

#return all identifiers to the global environment:
get_study_info(dir = "path/to/study/", list_to_global = TRUE)
}