man/plotDataFrame.rd
f921bb9f
 \name{plotDataFrame}
 \alias{plotDataFrame}
 \title{
b08d7ba4
 Quickly visualize a data frame
f921bb9f
 }
 \description{
b08d7ba4
 Quickly visualize a data frame
f921bb9f
 }
 \usage{
b08d7ba4
 plotDataFrame(df, overlap = 0.25, nlevel = 30, show_row_names = TRUE,
     show_column_names = TRUE, group = NULL, group_names = names(group),
     main_heatmap = NULL, km = 1, split = NULL, cluster_rows = TRUE,
bbf90151
     cluster_columns = TRUE, row_order = NULL, ...)
ba8a5070
 }
f921bb9f
 \arguments{
 
b08d7ba4
   \item{df}{a data frame.}
bbf90151
   \item{overlap}{how to group numeric columns. If the overlapping rate between the ranges in the current column and previous numeric column is larger than this value, the two columns are treated as under same measurement and should be grouped.}
   \item{nlevel}{If the number of levels of a character column is larger than this value, the column will be excluded, because it doesn't make any sense to visualize a character vector or matrix that contains huge number of unique elements through a heatmap.}
f921bb9f
   \item{show_row_names}{whether show row names after the last heatmap if there are row names.}
b08d7ba4
   \item{show_column_names}{whether show column names for all heatmaps.}
   \item{group}{a list of index that defines the groupping.}
   \item{group_names}{names for each group.}
   \item{main_heatmap}{which group is the main heatmap?}
   \item{km}{a value larger than 1 means applying k-means clustering on rows for the main heatmap.}
   \item{split}{one or multiple variables that split the rows.}
   \item{cluster_rows}{whether perform clustering on rows of the main heatmap.}
   \item{cluster_columns}{whether perform clustering on columns for all heatmaps.}
bbf90151
   \item{row_order}{order of rows, remember to turn off \code{cluster_rows}}
c0fa3d16
   \item{...}{pass to \code{\link{draw,HeatmapList-method}} or \code{\link{make_layout,HeatmapList-method}}}
ba8a5070
 
f921bb9f
 }
 \details{
b08d7ba4
 The data frame contains heterogeneous information. The \code{\link{plotDataFrame}} function provides a simple and quick way to
6f1307c6
 visualize information that are stored in a data frame.
7ab3fd24
 
12e85497
 There are only a few settings in this function, so the heamtap generated by this functioin
b08d7ba4
 may look ugly (in most of the time). However, users can customize the style of the heatmaps by manually
 constructing a \code{\link{HeatmapList}} object.
f921bb9f
 }
 \value{
12e85497
 A \code{\link{HeatmapList}} object.
f921bb9f
 }
 \author{
6f1307c6
 Zuguang Gu <z.gu@dkfz.de>
f921bb9f
 }
 \examples{
c0fa3d16
 df = data.frame(matrix(rnorm(40), nrow = 10, dimnames = list(letters[1:10], letters[1:4])),
                 large = runif(10)*100,
                 t1 = sample(letters[1:3], 10, replace = TRUE),
                 matrix(runif(60), nrow = 10, dimnames = list(LETTERS[1:10], LETTERS[1:6])),
                 t2 = sample(LETTERS[1:3], 10, replace = TRUE))
f921bb9f
 plotDataFrame(df)
c0fa3d16
 plotDataFrame(df, group = list(1:4, 5, 6, 7:12, 13), group_names = c("mat1", "large", "t1", "mat2", "t2"),
f597719b
     main_heatmap = 4, km = 2, column_title = "column title", row_title = "row title")
ba8a5070
 
f597719b
 }