Learn R Programming

provenance (version 0.2)

getKDEs: Generate an object of class KDEs

Description

Convert a dataset of class DZdata into an object of class KDEs for further processing by the summaryplot function.

Usage

getKDEs(x, from = NA, to = NA, bw = NA, samebandwidth = TRUE,
  adaptive = TRUE, pch = NA, normalise = FALSE, log = FALSE)

Arguments

x
an object of class DZdata
from
minimum limit of the x-axis.
to
maximum limit of the x-axis. #'
bw
the bandwidth of the kernel density estimates. If bw = NULL, the bandwidth will be set automatically using botev()
samebandwidth
boolean flag indicating whether the same bandwidth should be used for all samples. If samebandwidth = TRUE and bw = NULL, then the function will use the median bandwidth of all the samples.
adaptive
boolean flag switching on the adaptive bandwidth modifier of Abramson (1982)
pch
(optional) symbol to be used to mark the sample points along the x-axis
normalise
boolean flag indicating whether or not the KDEs should all integrate to the same value.
log
boolean flag indicating whether the data should by plotted on a logarithmic scale.

Examples

Run this code
fname <- system.file("DZ.csv",package="provenance")
DZ <- read.DZdata(fname)
KDEs <- getKDEs(DZ,0,3000,pch=NA)
summaryplot(KDEs,ncol=3)

Run the code above in your browser using DataLab