convAnnData {Heatplus} | R Documentation |
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.
convAnnData(x, nval.fac = 3, inclRef = TRUE, asIs = FALSE)
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 |
Logical variables are converted to factors. So are numerical variables with less than nval.fac
unique values.
convAnnData
returns the converted data frame, which is a numerical matrix
data(mtcars) summary(mtcars) summary(convAnnData(mtcars)) summary(convAnnData(mtcars, nval.fac=2)) summary(convAnnData(mtcars, nval.fac=2, inclRef=FALSE))