Learn R Programming

ANTsR (version 0.3.3)

subjectDataToGroupDataFrame: convert subject matrix data to a row in a dataframe.

Description

SubjectDataToGroupDataFrames take a list of subject-level csv files of the same type and converts them to a data frame with consistent column naming for the values and where rows correspond to subjects.

Usage

subjectDataToGroupDataFrame(csvlist, usecol, mycolname = NA, datarownames = NA)

Arguments

csvlist
input list of csv files eg by Sys.glob ...
usecol
a column name or number e.g. 1 or 'Volume'
mycolname
rename the column by this string (optional)
datarownames
the desired now names (optional)

Value

data frame is output

Examples

Run this code

## Not run: 
# # data(aal,package="ANTsR")
# # csvlist<-Sys.glob("*md*csv")
# # mypopulationdataframe<-subjectDataToGroupDataFrame( csvlist , "Mean" ,
# #  datarownames=aal$label_name )
# # should have each ROI value for each subject listed in a large data frame
# ## End(Not run)

Run the code above in your browser using DataLab