Description Usage Arguments Details Examples
match.names
1 | match.names(obj_1, obj_2, inverse = FALSE)
|
obj_1, obj_2 |
The data objects to compare |
inverse |
logical Should the negated names be returned or the matched names? Defaults to FALSE for inclusion |
Match the names of one list or data frame to an altered list or data frame or key ref table
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # For brevity
names(mtcars)
[1] "mpg" "cyl" "disp" "hp" "drat" "wt"
"qsec" "vs" "am" "gear" "carb"
mtcars2 <- mtcars[1:4]
names(mtcars2)
[1] "mpg" "cyl" "disp" "hp"
> match.names(mtcars,mtcars2)
[1] "mpg" "cyl" "disp" "hp"
> match.names(mtcars,mtcars2,T)
[1] "drat" "wt" "qsec" "vs" "am" "gear" "carb"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.