Learn R Programming

mixdist (version 0.5-5)

mixdata: Mixed Data

Description

as.mixdata checks if its argument is mixed data, if true, it returns the data with class "mixdata", if false, it returns NULL.

is.mixdata returns TRUE if its argument is of class "mixdata" and FALSE otherwise.

Usage

as.mixdata(x)
is.mixdata(x)

Arguments

x

object to be tested.

Details

Mixed data consist of grouped data and conditional data (if available). Grouped data is either a data frame or a matrix, whose first column should be right boundaries of grouping intervals where the first and last intervals are open-ended; whose second column should consist of the frequencies indicating numbers of observations falling into each interval. If conditional data are available, mixed data should have k + 2 columns, where k is the number of components, whose element in row j and column i + 2 is the number of observations from the jth interval belonging to the ith component.

See Also

mixgroup to construct mixed data.

Examples

Run this code
# NOT RUN {
data(pike65) # load data set `pike65'
pike65 # display the mixed data `pike65'
data(pike65sg) # load data set `pike65sg'
pike65sg # display the mixed data `pike65sg'
data(pikepar)
as.mixdata(pikepar)
as.mixdata(pike65)
is.mixdata(pike65)
is.mixdata(as.mixdata(pike65))
# }

Run the code above in your browser using DataLab