nObs-methods: Accessor method for the number of observations (slot "nobs")...

Description Usage Arguments Value Examples

Description

Number of observations plotted in a plot or associated PlotFeatureSet.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
nObs(object)

## S4 method for signature 'PlotFeatureSet'
nObs(object)

## S4 method for signature 'trellis'
nObs(object)

## S4 method for signature 'gTree'
nObs(object)

## S4 method for signature 'PlotFeatureSet'
nObs(object)

## S4 method for signature '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

1
2
3
4
5
library(ggplot2)
mt = datasets::mtcars
plt = qplot(mt$mpg, mt$cyl)
fs = makeFeatureSet(plt)
nObs(fs)

trackr documentation built on May 24, 2021, 5:09 p.m.