Learn R Programming

algebraic.dist (version 0.9.1)

obs: Retrieve the observations used to construct a distribution-like object. This is useful for obtaining the data used to construct an empirical distribution, but it is also useful for, say, retrieving the sample that was used by a fitted object, like an maximum likelihood estimate.

Description

Retrieve the observations used to construct a distribution-like object. This is useful for obtaining the data used to construct an empirical distribution, but it is also useful for, say, retrieving the sample that was used by a fitted object, like an maximum likelihood estimate.

Usage

obs(x)

Value

The data (matrix or vector) used to construct x.

Arguments

x

the object to retrieve the observations from

Examples

Run this code
d <- empirical_dist(1:10)
obs(d)  # returns the vector 1:10

Run the code above in your browser using DataLab