cast.and.fill: cast.and.fill

Description Usage Arguments Value

View source: R/PCA_report.R

Description

Cast a data table from long to wide and fill missing values. Output is suitable for PCA.

Usage

1
cast.and.fill(data, condition.var, time.var, measure.var, na.fill)

Arguments

data

A data table in long format.

condition.var

Character vector, names of variables used for rows in casting, define the conditions of the experiment.

time.var

Character, name of Time variable used for columns in casting

measure.var

Character, name of measurement variable, on which PCA is to be performed.

na.fill

Numeric, values to replace NAs

Value

Two matrices. "mat" is a wide character matrix which contains the casted "condition.var" as first columns followed by casted measurements. "mat2" is a numeric wide matrix, which is essentially the same with conditions trimmed.


majpark21/TSexploreR documentation built on Oct. 16, 2019, 2:46 p.m.