trim.data {anchors}R Documentation

Trim a dataset to have same cases present in an anchors.data object

Description

Given a dataset X that was used in the process of creating an anchors.data object Y (which may have had cases deleted due to missing values), trim cases of X to include only cases that would be used in an anchors() analyis of Y. Matching is done by rownames.

Usage

trim.data( data, anchors )

Arguments

data

A data.frame or matrix

anchors

An object returned by anchors

Value

A data.frame or matrix with cases that match rows of anchors$data$z0; matching done by rownames

Note

'data' is unchanged: remember to assign the result.

Author(s)

Jonathan Wand http://wand.stanford.edu

References

Wand, Jonathan; Gary King; and Olivia Lau. (2007) “Anchors: Software for Anchoring Vignettes”. Journal of Statistical Software. Forthcoming. copy at http://wand.stanford.edu/research/anchors-jss.pdf

Wand, Jonathan and Gary King. (2007) Anchoring Vignetttes in R: A (different kind of) Vignette copy at http://wand.stanford.edu/anchors/doc/anchors.pdf

See Also

anchors


[Package anchors version 3.0-8 Index]