View source: R/index_samples.R
index_samples | R Documentation |
A function to align genotype and phenotype data
index_samples(
obj,
rds_dir,
indiv_id,
add_outcome,
outcome_id,
outcome_col,
na_outcome_vals,
outfile,
quiet
)
obj |
An object created by |
rds_dir |
The path to the directory in which you want to create the new '.rds' and '.bk' files. |
indiv_id |
A character string indicating the ID column name in the 'fam' element of the genotype data list. Defaults to 'sample.ID', equivalent to 'IID' in PLINK. The other option is 'family.ID', equivalent to 'FID' in PLINK. |
add_outcome |
A data frame with at least two columns: and ID column and a phenotype column |
outcome_id |
A string specifying the name of the ID column in |
outcome_col |
A string specifying the name of the phenotype column in |
na_outcome_vals |
A vector of numeric values used to code NA values in the outcome. Defaults to |
outfile |
A string with the name of the filepath for the log file |
quiet |
Logical: should messages be printed to the console? Defaults to FALSE (which leaves the print messages on... |
a list with two items:
a data.table with rows corresponding to the samples for which both genotype and phenotype are available.
a numeric vector with indices indicating which samples were 'complete' (i.e., which samples from add_outcome had corresponding data in the PLINK files)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.