Learn R Programming

trackr (version 0.10.7)

nObs: Accessor method for the number of observations (slot "nobs") of the plot object.

Description

Number of observations plotted in a plot or associated PlotFeatureSet.

Usage

nObs(object)

# S4 method for PlotFeatureSet nObs(object)

# S4 method for trellis nObs(object)

# S4 method for gTree nObs(object)

# S4 method for PlotFeatureSet nObs(object)

# S4 method for ggplot nObs(object)

Arguments

object

An object of class PlotFeatureSet, GGplotFeatureSet, TrellisFeatureSet, ggplot, or trellis.

Value

An integer representing the number of observations in the plotted data.

Examples

Run this code
# NOT RUN {
library(ggplot2)
mt = datasets::mtcars
plt = qplot(mt$mpg, mt$cyl)
fs = makeFeatureSet(plt)
nObs(fs)
# }

Run the code above in your browser using DataLab