Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mergeRows

Function to Merge Rows of Two Data Frames.


Description

This function merges two data frames by combining their rows.

Usage

mergeRows(X, Y, common.only = FALSE, ...)

## S3 method for class 'data.frame'
mergeRows(X, Y, common.only = FALSE, ...)

Arguments

X

First data frame.

Y

Second data frame.

common.only

If TRUE, only variables (columns) common to the two data frame are included in the merged data set; the default is FALSE.

...

Not used.

Value

A data frame containing the rows from both input data frames.

Author(s)

John Fox

See Also

For column merges and more complex merges, see merge.

Examples

if (require(car)){
    data(Duncan)
    D1 <- Duncan[1:20,]
    D2 <- Duncan[21:45,]
    D <- mergeRows(D1, D2)
    print(D)
    dim(D)
}

RcmdrMisc

R Commander Miscellaneous Functions

v2.7-1
GPL (>= 2)
Authors
John Fox [aut, cre], Robert Muenchen [ctb], Dan Putler [ctb]
Initial release
2020-08-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.