Write FreeSurfer Group Descriptor (FSGD) file from demographics dataframe.
demographics.to.fsgd.file(
filepath,
demographics_df,
group_column_name = "group",
subject_id_column_name = "id",
var_columns = NULL,
ftitle = "OSGM",
fsgd_flag_lines = c("DeMeanFlag 1", "ReScaleFlag 1")
)
character string, the path to the output file in FSGD format
data.frame, as returned by read.md.demographics
or created manually. Note that the data.frame must not contain any character columns, they should be converted to factors.
character string, the column name of the group column in the 'demographics_df'
character string, the column name of the subject identifier column in the 'demographics_df'
vector of character strings, the column names to include as variables in the FSGD file. If NULL (the default), all columns will be included (with the exception of the group column and the subject id column).
character string, freeform title for the FSGD file
vector of character strings, extra flag lines to write to the file. The default setting will activate de-meaning and rescaling.
vector of character strings, the lines written to the 'filepath', invisible.
Other metadata functions:
read.md.demographics()
,
read.md.subjects()
,
report.on.demographics()