release | 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 the new rows (if present) but matched rows which contain changes from previous data will be dropped.
release(df_current, df_previous, datetime_variable, include_new = TRUE, ...)
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
|
include_new |
boolean, should new rows be included? Default is TRUE. |
... |
Other |
A dataframe which contains only rows of df_current
that have not
changed from df_previous
, and includes new rows. Also returns a waldo
object as in loupe()
.
loupe()
create_object_list()
# Dropping matched rows which contain changes, and returning unchanged rows
df_released <- butterfly::release(
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
include_new = TRUE # Whether to include new rows or not, default is TRUE
)
df_released
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.