
Last chance! 50% off unlimited learning
Sale ends in
Compare groups based on histograms.
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,
...)
A data frame. Rows are subjects; Columns are variables describing the subjects.
character. The column name of data
that indicates the variable,
for which the histogram will be drawn. The string y
can also indicate a function of the variable, e.g.,
character. The column name of data
that indicates the subject groups. The histogram will be drawn for each of the subject group. It also indicates the border colors of the histograms.
character. The column name of data
that indicates the subject groups. It indicates the inside colors of the histograms.
Histogram border color, only available when group & fill are NULL.
Histogram inside color, only available when group & fill are NULL.
logical. Use classic background without grids (default: TRUE).
integer. number of bins of histogram (default: 30).
Bin width of histogram.
Transparency of histogram inside color.
x axis label
y axis label
label of group variable
title of the plot
logical. Indicates if light blue background and white grid should be added to the figure.
other input parameters for facet & theme
A list with the following 9 elements.
data
, layers
, scales
, mapping
,
theme
, coordinates
,
facet
, plot_env
, and labels
.
# NOT RUN {
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')
# }
Run the code above in your browser using DataLab