Skip to contents

Retrieves the names or paths of risk factor directories within the project structure.

Usage

get_risk_factor_names(root_dir, return_paths = FALSE)

Arguments

root_dir

A character string which specifies the root directory of the project.

return_paths

A logical which determines whether to return full paths (TRUE) or only directory names (FALSE).

Value

An invisible character vector of risk factor directory names or paths.

Examples

root_dir <- system.file("extdata", "example-nl", "Reference_Data", package = "hiaR")
get_risk_factor_names(root_dir)
#> D:/a/_temp/Library/hiaR/extdata/example-nl/Reference_Data/Risk_Factors
#> └── Smoking_cat3
get_risk_factor_names(root_dir, return_paths = TRUE)
#> D:/a/_temp/Library/hiaR/extdata/example-nl/Reference_Data/Risk_Factors
#> └── Smoking_cat3