Description Usage Arguments Value See Also Examples
Load a list of subjects and metadata from a demographics file, i.e., a tab-separated file containing an arbitrary number of columns, one of which must be the subject id.
1 2 3 4 5 6 7 8 9 10 |
demographics_file, |
string. The path to the file. |
column_names, |
vector of strings. The column names to set in the returned dataframe. The length must match the number of columns in the file. |
header, |
logical. Whether the file starts with a header line. |
scale_and_center, |
logical. Whether to center and scale the data. Defaults to FALSE. |
sep, |
string. Separator passed to |
report, |
logical. Whether to write an overview, i.e., some descriptive statistics for each column, to STDOUT. Defaults to FALSE. See |
stringsAsFactors, |
logical. Whether to convert strings in the input data to factors. Defaults to TRUE. |
group_column_name, |
string or NULL. If given, the column name of the group column. It must be a factor column with 2 levels. Enables group-comparison tests. Defaults to NULL. |
a dataframe. The data in the file. String columns will be returned as factors, which you may want to adapt afterwards for the subject identifier column.
Other metadata functions:
demographics.to.fsgd.file()
,
read.md.subjects()
,
report.on.demographics()
1 2 3 4 5 | demographics_file =
system.file("extdata", "demographics.tsv", package = "fsbrain", mustWork = TRUE);
column_names = c("subject_id", "group", "age");
demographics = read.md.demographics(demographics_file,
header = TRUE, column_names = column_names, report = FALSE);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.