Learn R Programming

lattice (version 0.12-9)

make.groups: Grouped data from multiple vectors

Description

Combines two or more vectors, possibly of different lengths, producing a data frame with a second column indicating which of these vectors that row came from. This is mostly useful for getting data into a form suitable for use in high level Lattice functions.

Usage

make.groups(...)

Arguments

Value

A data frame with two columnsdataall the vectors supplied, concatenatedwhichfactor indicating which vector the corresponding data value came from

See Also

Lattice

Examples

Run this code
sim.dat <-
    make.groups(uniform = runif(200),
                exponential = rexp(175),
                lognormal = rlnorm(150),
                normal = rnorm(125))
qqmath( ~ data | which, sim.dat, scales = list(y = "free"))

Run the code above in your browser using DataLab