Learn R Programming

fsbrain (version 0.5.5)

qdec.table.skeleton: Generate skeleton dataframe for FreeSurfer QDEC long file from subjects list.

Description

Generate skeleton dataframe for FreeSurfer QDEC long file from subjects list.

Usage

qdec.table.skeleton(
  subjects_list,
  isi = rep(0.8, length(subjects_list)),
  isi_name = "years",
  timepoint_names = c("_MR1", "_MR2")
)

Value

data.frame with 3 columns named fsid and fsid-base and 'isi_name', a data.frame to use with the demographics.to.qdec.table.dat function.

Arguments

subjects_list

vector of character strings, the Freesurfer subject IDs (cross-sectional names, without any suffixes like _MR1, long, etc.)

isi

numerical vector, the inter-scan interval for the subjects, in a unit of your choice. Typically in years.

isi_name

character string, the name for the isi columns. Defaults to "years".

timepoint_names

vector of character strings, the timepoint names. These are mandatory for QDEC, so there should be very little reason to change them. Leave along unless you know what you are doing.

See Also

The function demographics.to.qdec.table.dat to write the result to a QDEC file.

Examples

Run this code
    dem = data.frame("ID"=paste("subject", seq(5), sep=""),
      "age"=sample.int(20, 5)+10L, "isi"=rnorm(5, 2.0, 0.1)); #sample data.
    qdec.table.skeleton(dem$ID, dem$isi);

Run the code above in your browser using DataLab