picketPlot: Display a data frame of annotation information

Description Usage Arguments Details Value See Also Examples

Description

Displays a data frame of both factor and numerical variables in parallel panels. Factors levels are indicated by black rectangles, using dummy variables for more than two levels. Numerical variables are shown as simple index plots with an optional loess smoother. Panels can be arranged horizontally or vertically, and different groups of subjects can be indicated through different background colors.

Usage

1
2
3
4
5
6
7
8
9
picketPlot(
  x,
  grp = NULL,
  grpcol,
  grplabel = NULL,
  horizontal = TRUE,
  asIs = FALSE,
  control = list()
)

Arguments

x

usually a data frame, which is passed to convAnnData to be converted to a numerical matrix with dummy coding for the factor levels. Alternatively, such a numerical matrix can be constructed manually and passed in as x, see argument asIs

grp

an optional vector of cluster memberships, in the same order as the rows of x

grpcol

an optional vector of background colors for the clusters specified in grp

grplabel

an optional vector of names for the clusters specified in grp

horizontal

logical value whether to plot variables horizontally (default) or vertically

asIs

a logical value indicating whether x should be passed to convAnnData for pre-processing or not. Defaults to FALSE.

control

a named list of control parameters that determines the visual appearance of the plot; see picketPlotControl for details.

Details

Missing values are indicated by a box marking in nacol for factor values.

Value

Invisibly, a list containing the data and parameters used for plotting each binary indicator and numerical variable, respectively. This is an internal data structure, mostly useful for debugging. Irrelevant, as the main desired effetc is a plot to the current graphical device.

See Also

annHeatmap2, convAnnData, par, picketPlotControl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    ## Standard call
    data(mtcars)
    picketPlot(mtcars)
    
    ## Pre-process the data for display
    mm = convAnnData(mtcars, inclRef=FALSE)
    picketPlot(mm, asIs=TRUE)
    
    ## Higher panels for continous traits
    picketPlot(mm, asIs=TRUE, control=list(numfac=3))
 
    ## With clusters
    picketPlot(mtcars, grp = rep(1:2, c(16, 16)), grpcol = c("pink","lightblue"), grplabel=c("Cluster 1", "Cluster 2"))

alexploner/Heatplus documentation built on May 23, 2021, 2:01 p.m.