stableMerge: Execute a Stable Left Join

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Merge Two Data Sets Without Altering Material from the Left Argument.

Usage

1

Arguments

x

the main data.frame

y

a second data.frame containing related information

Details

merge is unpredictable, because it can add, drop, and reorder rows, as well as reorder columns and recreate row names. stableMerge expects a primary data.frame and a secondary data.frame, and performs a ‘stable’ left join (all.x=TRUE, all.y=FALSE). Absence of extra arguments is by design, for integrity. Keys are defined by common columns, and are repeatable in the primary, but must be unique in the secondary data.frame. New columns in the secondary data.frame are appended to the primary, supplying secondary information by key match. No rows are added, or dropped, row/column order is unaffected, and row names are preserved.

Value

A dataframe with as many rows as nrow(x) but possibly more columns.

Author(s)

Tim Bergsma

References

http://metrumrg.googlecode.com

See Also

Examples

1
2
#a nonsense example
stableMerge(Theoph,BOD)

metrumrg documentation built on May 2, 2019, 5:55 p.m.