The Xpose 4 generic functions for continuous y-variables.
Source:R/xpose.plot.histogram.R
xpose.plot.histogram.Rd
This function is a wrapper for the lattice xyplot function.
Usage
xpose.plot.histogram(
x,
object,
inclZeroWRES = FALSE,
onlyfirst = FALSE,
samp = NULL,
type = "density",
aspect = object@Prefs@Graph.prefs$aspect,
scales = list(),
by = object@Prefs@Graph.prefs$condvar,
force.by.factor = FALSE,
ordby = object@Prefs@Graph.prefs$ordby,
byordfun = object@Prefs@Graph.prefs$byordfun,
shingnum = object@Prefs@Graph.prefs$shingnum,
shingol = object@Prefs@Graph.prefs$shingol,
strip = function(...) strip.default(..., strip.names = c(TRUE, TRUE)),
subset = xsubset(object),
main = xpose.create.title.hist(x, object, subset, ...),
xlb = NULL,
ylb = "Density",
hicol = object@Prefs@Graph.prefs$hicol,
hilty = object@Prefs@Graph.prefs$hilty,
hilwd = object@Prefs@Graph.prefs$hilwd,
hidcol = object@Prefs@Graph.prefs$hidcol,
hidlty = object@Prefs@Graph.prefs$hidlty,
hidlwd = object@Prefs@Graph.prefs$hidlwd,
hiborder = object@Prefs@Graph.prefs$hiborder,
mirror = FALSE,
max.plots.per.page = 4,
mirror.aspect = "fill",
pass.plot.list = FALSE,
x.cex = NULL,
y.cex = NULL,
main.cex = NULL,
mirror.internal = list(strip.missing = missing(strip)),
...
)
Arguments
- x
A string or a vector of strings with the name(s) of the x-variable(s).
- object
An "xpose.data" object.
- inclZeroWRES
A logical value indicating whether rows with WRES=0 should be plotted.
- onlyfirst
A logical value indicating whether only the first row per individual should be included in the plot.
- samp
An integer between 1 and object@Nsim (see
xpose.data-class
) specifying which of the simulated data sets to extract from SData.- type
The type of histogram to make. See
histogram
.- aspect
The aspect ratio of the display (see
histogram
).- scales
A list to be used for the
scales
argument inhistogram
.- by
A string or a vector of strings with the name(s) of the conditioning variables.
- force.by.factor
Logical value. If TRUE, and
by
is notNULL
, the variable specified byby
is taken as categorical.- ordby
A string with the name of a variable to be used to reorder any factor conditioning variables (
by
). The variable is used in a call to thereorder.factor
function.- byordfun
The name of the function to be used when reordering a factor conditioning variable (see argument
ordby
)- shingnum
The number of shingles ("parts") a continuous conditioning variable should be divided into.
- shingol
The amount of overlap between adjacent shingles (see argument
shingnum
)- strip
The name of the function to be used as the strip argument to the
xyplot
.- subset
A string giving the subset expression to be applied to the data before plotting. See
xsubset
.- main
A string giving the plot title or
NULL
if none.- xlb
A string giving the label for the x-axis.
NULL
if none.- ylb
A string giving the label for the y-axis.
NULL
if none.- hicol
the fill colour of the histogram - an integer or string. The default is blue (see
histogram
).- hilty
the border line type of the histogram - an integer. The default is 1 (see
histogram
).- hilwd
the border line width of the histogram - an integer. The default is 1 (see
histogram
).- hidcol
the fill colour of the density line - an integer or string. The default is black (see
histogram
).- hidlty
the border line type of the density line - an integer. The default is 1 (see
histogram
).- hidlwd
the border line width of the density line - an integer. The default is 1 (see
histogram
).- hiborder
the border colour of the histogram - an integer or string. The default is black (see
histogram
).- mirror
Should we create mirror plots from simulation data? Value can be
FALSE
,TRUE
or1
for one mirror plot, or3
for three mirror plots.- max.plots.per.page
The maximum number of plots per page that can be created with the mirror plots.
- mirror.aspect
The aspect ratio of the plots used for mirror functionality.
- pass.plot.list
Should we pass the list of plots created with mirror or should we print them directly. Values can be
TRUE/FALSE
.- x.cex
The size of the x-axis label.
- y.cex
The size of the y-axis label.
- main.cex
The size of the title.
- mirror.internal
an internal mirror argument used in
create.mirror
. Checks if thestrip
argument fromxyplot
has been used.- ...
Other arguments passed to
xpose.plot.histogram
.
Details
x
can be either numeric or factor, and can be either single valued
strings or vectors of strings.
Examples
if (FALSE) {
## xpdb5 is an Xpose data object
## We expect to find the required NONMEM run and table files for run
## 5 in the current working directory
xpdb5 <- xpose.data(5)
xpose.plot.histogram("AGE", xpdb5, onlyfirst = TRUE)
xpose.plot.histogram(c("SEX", "AGE"), xpdb5, onlyfirst = TRUE)
}