equalLengthTables: equalLengthTables

Description Usage Arguments Value Examples

View source: R/equalLengthTables.R

Description

equalLengthTables equalLengthTables takes as input two data.frame objects and returns a data.frame object with common values present in both data.frame objects. It replaces the values with the values of longerDf.

Usage

1
equalLengthTables(shorterDf, longerDf)

Arguments

shorterDf

a data.frame object. Note that this is not a character string but the data.frame object itself. The parameter passed to the function should be without quotes (" ").

longerDf

a data.frame object. Note that this is not a character string but the data.frame object itself. The parameter passed to the function should be without quotes (" ").

Value

equalLengthTables returns a data.frame object with common elements replaced with the values in the longer data.frame object longerDf.

Examples

1
2
3
4
5
6
7
short_table <-data.frame(c(1,4,5,6,8),"short_val")
long_table <- data.frame(c(1,2,4,5,6,7,8,9),"long_val")
equalLengthTables(short_table,long_table)
employees_short <- employees[c(2,3,5),]
equalLengthTables(employees_short,employees)
iris_short <- iris[c(50:75),]
equalLengthTables(iris_short,iris)

lwTools/agriTrf documentation built on March 26, 2020, 12:09 a.m.