Description Usage Arguments Value Examples
View source: R/equalLengthTables.R
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
.
1 | equalLengthTables(shorterDf, longerDf)
|
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 (" "). |
equalLengthTables returns a data.frame object with common elements replaced with the values in the longer data.frame object longerDf
.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.