[.dtrace {dtrace}R Documentation

Subsetting of density trace objects

Description

These functions perform subsetting of density trace objects.

Usage

x[i]
x[[i]]

Arguments

x An object of class dtrace.
i Indexing information

Details

The first form of subsetting can be used to produce a dtrace object containing a subset of the original object.

The second form of subsetting provides access to the internal components of and individual density estimate. The result is a list which contains x and y components which give the actual estimates.

Value

A subset of the dtrace object passed as an argument.

Author(s)

Ross Ihaka

See Also

dtrace.

Examples

## Estimation and plotting of three densities.
## A demonstration of the formula-based interface.
data(iris)
d <- dtrace(Petal.Width ~ Species, data = iris)
summary(d[1])
plot(d[[2]], type = "l")

[Package dtrace version 0.1 Index]