catch | R Documentation |
This function matches two dataframe objects by their unique identifier (usually "time" or "datetime in a timeseries), and returns a new dataframe which contains only rows that have changed compared to previous data. It will not return any new rows.
catch(df_current, df_previous, datetime_variable, ...)
df_current |
data.frame, the newest/current version of dataset x. |
df_previous |
data.frame, the old version of dataset, for example x - t1. |
datetime_variable |
string, which variable to use as unique ID to join
|
... |
Other |
The underlying functionality is handled by create_object_list()
.
A dataframe which contains only rows of df_current
that have
changes from df_previous
, but without new rows. Also returns a waldo
object as in loupe()
.
loupe()
create_object_list()
# Returning only matched rows which contain changes
df_caught <- butterfly::catch(
butterflycount$march, # New or current dataset
butterflycount$february, # Previous version you are comparing it to
datetime_variable = "time" # Unique ID variable they have in common
)
df_caught
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.