civet.flattenForDplyr: Flatten CIVET results for dplyr

civet.flattenForDplyrR Documentation

Flatten CIVET results for dplyr

Description

Convert the data.frame/Matrix/list fusion object produced by civet.readAllCivetFiles to a data.frame usable with dplyr etc.

Usage

civet.flattenForDplyr(civetResults, columnsToKeep)

Arguments

civetResults

A data.frame produced by civet.readAllCivetFiles

columnsToKeep

vector of column names or indices of columns from the original frame to copy to the normalized table. Columns not produced by civet.readAllCivetFiles and not specified here are dropped. See details

Details

The columnsToKeep vector needs to include the subject identifier or it will be dropped. Ideally other columns in the vector should be proper vector/list columns compatible with dplyr

Value

data.frame containing results of civet.readAllCivetFiles, all sub-data.frames and matrices are expanded, non-standard characters in column names are replaced with underscores, and a prefix denoting the origin sub-data is given.


Mouse-Imaging-Centre/RMINC documentation built on Nov. 12, 2022, 1:50 p.m.