Learn R Programming

rTwig (version 1.1.0)

standardize_qsm: Standardize QSM

Description

Standardizes QSM variable names and ordering across different QSM software

Usage

standardize_qsm(cylinder)

Value

Returns a data frame

Arguments

cylinder

QSM cylinder data frame

Details

Renames supported QSM software output columns to be consistent. All names are lower case and underscore delimited. See the dictionary vignette for a detailed description of column names. A consistent QSM format ensures maximum compatibility when analyzing QSMs made with different software. This function can be run either before or after the update_cylinders function has been run, or at any stage.

Examples

Run this code

## TreeQSM Processing Chain
file <- system.file("extdata/QSM.mat", package = "rTwig")
qsm <- import_qsm(file)
cylinder <- qsm$cylinder
cylinder <- standardize_qsm(cylinder)
str(cylinder)

## SimpleForest Processing Chain
file <- system.file("extdata/QSM.csv", package = "rTwig")
cylinder <- read.csv(file)
cylinder <- standardize_qsm(cylinder)
str(cylinder)

Run the code above in your browser using DataLab