Hist {statVisual} | R Documentation |
Compare Groups Based on Histograms
Description
Compare groups based on histograms.
Usage
Hist(
data,
y,
group = NULL,
fill = group,
border.color = NULL,
inner.color = NULL,
theme_classic = TRUE,
bins = NULL,
binwidth = NULL,
alpha = 0.8,
xlab = y,
ylab = "count",
group.lab = group,
title = "Histogram",
addThemeFlag = TRUE,
...)
Arguments
data |
A data frame. Rows are subjects; Columns are variables describing the subjects. |
y |
character. The column name of |
group |
character. The column name of |
fill |
character. The column name of |
border.color |
Histogram border color, only available when group & fill are NULL. |
inner.color |
Histogram inside color, only available when group & fill are NULL. |
theme_classic |
logical. Use classic background without grids (default: TRUE). |
bins |
integer. number of bins of histogram (default: 30). |
binwidth |
Bin width of histogram. |
alpha |
Transparency of histogram inside color. |
xlab |
x axis label |
ylab |
y axis label |
group.lab |
label of group variable |
title |
title of the plot |
addThemeFlag |
logical. Indicates if light blue background and white grid should be added to the figure. |
... |
other input parameters for facet & theme |
Value
A list with the following 9 elements.
data
, layers
, scales
, mapping
,
theme
, coordinates
,
facet
, plot_env
, and labels
.
Author(s)
Wenfei Zhang <Wenfei.Zhang@sanofi.com>, Weiliang Qiu <Weiliang.Qiu@sanofi.com>, Xuan Lin <Xuan.Lin@sanofi.com>, Donghui Zhang <Donghui.Zhang@sanofi.com>
Examples
data(esSim)
print(esSim)
# expression data
dat = exprs(esSim)
print(dim(dat))
print(dat[1:2,])
# phenotype data
pDat = pData(esSim)
print(dim(pDat))
print(pDat[1:2,])
# feature data
fDat = fData(esSim)
print(dim(fDat))
print(fDat[1:2,])
# choose the first probe which is over-expressed in cases
pDat$probe1 = dat[1,]
# check histograms of probe 1 expression in cases and controls
print(table(pDat$grp, useNA = "ifany"))
statVisual(type = 'Hist',
data = pDat,
y = 'probe1',
group = 'grp')
Hist(
data = pDat,
y = 'probe1',
group = 'grp')