View source: R/S03_Utilities.R
match_rows | R Documentation |
Function that returns an index indicating the row in one data frame that matches the row in another data frame.
match_rows(dtf_to, dtf_from)
dtf_to |
A data frame with the rows to match over. |
dtf_from |
A data frame with the rows to compared against. |
A list equal in length to the number of rows in
dtf_to
with the row indices from dtf_from
that
matches a given row in dtf_to
. If no matches are found
returns NA
.
dtf_example_1 <- data.frame( c( LETTERS[3:1], 'Z' ), V2 = c( 3:1, 26 ) )
dtf_example_2 <- data.frame( LETTERS[1:6], V2 = 1:6 )
match_rows( dtf_example_1, dtf_example_2 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.