Heatplus (version 2.18.0)

convAnnData: Converting data frames for display as annotation

Description

Converts a data frames for display as annotation in a heatmap. This is mostly intended as an internal function, but might be useful for finetuning an annotation data frame manually.

Usage

convAnnData(x, nval.fac = 3, inclRef = TRUE, asIs = FALSE)

Arguments

x
the data frame to be converted
nval.fac
lower limit for unique values in numerical variables
inclRef
logical value indicating whether to include the reference level among the dummy variables for factors
asIs
logical value indicating whether to perform a conversion; if TRUE, the input x is simply returned, provided it is a numerical matrix (otherwise, the function stops with an error message)

Value

returns the converted data frame, which is a numerical matrix

Details

Logical variables are converted to factors. So are numerical variables with less than nval.fac unique values.

See Also

annHeatmap2

Examples

Run this code
data(mtcars)
summary(mtcars)
summary(convAnnData(mtcars))
summary(convAnnData(mtcars, nval.fac=2))    
summary(convAnnData(mtcars, nval.fac=2, inclRef=FALSE))    

Run the code above in your browser using DataLab