Create a merged AFQ and phenotype dataframe
Usage
read_afq_files(
nodes_file,
pheno_file = NULL,
by = "subjectID",
tract_col = "tractID",
node_col = "nodeID",
other_cols = NULL,
na_omit = FALSE,
...
)
Arguments
- nodes_file
Path to a nodes file.
- pheno_file
Path to a phenotypic file. If pheno_file = NULL returns an "unsupervised" AFQ dataset (no phenotypic data).
- by
Column used for merging the nodes and phenotypic files. Default: "subjectID"
If variable names differ between the nodes and phenotypic datasets, use a named character vector like by = c("x_a" = "y_a", "x_b" = "y_b").- tract_col
The column name that encodes tract names. Default: "tractID"
- node_col
The column name that encodes tract node positions. Default: "nodeID"
- other_cols
Other column names to be included in the final data frame. Default: NULL
- na_omit
A logical indicating whether rows with NA values should be removed from the data frame before returning. Default: FALSE
- ...
Further keyword arguments to be passed to the file reading function: readr::read_csv or readr::read_tsv.