data.frame or RLum.Results
object (required): for data.frame: two columns: De (data[,1])
and De error (data[,2])
na.rm
logical (with default): excludes NA
values from the data set prior to any further operations.
mtext
character (optional): further sample information
(mtext).
cex.global
numeric (with default): global scaling
factor.
se
logical (optional): plots standard error points over
the histogram, default is FALSE.
rug
logical (optional): adds rugs to the histogram,
default is TRUE.
normal_curve
logical (with default): adds a normal
curve to the histogram. Mean and sd are calculated from the input data. More
see details section.
summary
character (optional): add statistic measures of
centrality and dispersion to the plot. Can be one or more of several
keywords. See details for available keywords.
summary.pos
numeric or character (with
default): optional position coordinates or keyword (e.g. "topright")
for the statistical summary. Alternatively, the keyword "sub" may be
specified to place the summary below the plot header. However, this latter
option in only possible if mtext is not used. In case of coordinate
specification, y-coordinate refers to the right y-axis.
colour
numeric or character (with default):
optional vector of length 4 which specifies the colours of the following
plot items in exactly this order: histogram bars, rug lines, normal
distribution curve and standard error points (e.g., c("grey",
"black", "red", "grey")).
interactive
logical (with default): create an interactive
histogram plot (requires the 'plotly' package)
...
further arguments and graphical parameters passed to
plot or hist. If y-axis labels are provided,
these must be specified as a vector of length 2 since the plot features two
axes (e.g. ylab = c("axis label 1", "axis label 2")). Y-axes limits
(ylim) must be provided as vector of length four, with the first two
elements specifying the left axes limits and the latter two elements giving
the right axis limits.
Details
If the normal curve is added, the y-axis in the histogram will show the
probability density.
A statistic summary, i.e. a collection of statistic measures of
centrality and dispersion (and further measures) can be added by specifying
one or more of the following keywords: "n" (number of samples),
"mean" (mean De value), "mean.weighted" (error-weighted mean),
"median" (median of the De values), "sdrel" (relative standard
deviation in percent), "sdrel.weighted" (error-weighted relative
standard deviation in percent), "sdabs" (absolute standard deviation),
"sdabs.weighted" (error-weighted absolute standard deviation),
"serel" (relative standard error), "serel.weighted" (
error-weighted relative standard error), "seabs" (absolute standard
error), "seabs.weighted" (error-weighted absolute standard error),
"kurtosis" (kurtosis) and "skewness" (skewness).
Function version
0.4.4 (2016-05-19 23:47:19)
Note
The input data is not restricted to a special type.
Author(s)
Michael Dietze, GFZ Potsdam (Germany), Sebastian Kreutzer,
IRAMAT-CRP2A, Universite Bordeaux Montaigne (France)
R Luminescence Package Team
See Also
hist, plot
Examples
## load data
data(ExampleData.DeValues, envir = environment())
ExampleData.DeValues <-
Second2Gray(ExampleData.DeValues$BT998, dose.rate = c(0.0438,0.0019))
## plot histogram the easiest way
plot_Histogram(ExampleData.DeValues)
## plot histogram with some more modifications
plot_Histogram(ExampleData.DeValues,
rug = TRUE,
normal_curve = TRUE,
cex.global = 0.9,
pch = 2,
colour = c("grey", "black", "blue", "green"),
summary = c("n", "mean", "sdrel"),
summary.pos = "topleft",
main = "Histogram of De-values",
mtext = "Example data set",
ylab = c(expression(paste(D[e], " distribution")),
"Standard error"),
xlim = c(100, 250),
ylim = c(0, 0.1, 5, 20))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Luminescence)
Welcome to the R package Luminescence version 0.6.0 [Built: 2016-05-30 16:47:30 UTC]
The R-package Luminescence manual: 'Call unto me, and I will answer thee, and will shew thee great things, and difficult, which thou knowest not.'
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Luminescence/plot_Histogram.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot_Histogram
> ### Title: Plot a histogram with separate error plot
> ### Aliases: plot_Histogram
>
> ### ** Examples
>
>
> ## load data
> data(ExampleData.DeValues, envir = environment())
> ExampleData.DeValues <-
+ Second2Gray(ExampleData.DeValues$BT998, dose.rate = c(0.0438,0.0019))
>
> ## plot histogram the easiest way
> plot_Histogram(ExampleData.DeValues)
>
> ## plot histogram with some more modifications
> plot_Histogram(ExampleData.DeValues,
+ rug = TRUE,
+ normal_curve = TRUE,
+ cex.global = 0.9,
+ pch = 2,
+ colour = c("grey", "black", "blue", "green"),
+ summary = c("n", "mean", "sdrel"),
+ summary.pos = "topleft",
+ main = "Histogram of De-values",
+ mtext = "Example data set",
+ ylab = c(expression(paste(D[e], " distribution")),
+ "Standard error"),
+ xlim = c(100, 250),
+ ylim = c(0, 0.1, 5, 20))
>
>
>
>
>
>
>
> dev.off()
null device
1
>