Learn R Programming

BIEN (version 1.2.7)

BIEN_metadata_match_data: Check for differing records between old and new dataframes.

Description

BIEN_metadata_match_data compares old and new dataframes, and can check whether they are identical or be used to select rows that are unique to the old or new versions.

Usage

BIEN_metadata_match_data(old, new, return = "identical")

Value

Logical of varying length (depending on choice of "return" parameter)

Arguments

old

A dataframe that is to be compared to a (typically) newer dataframe.

new

A dataframe that is to be compared to a (typically) older dataframe.

return

What information should be returned? Current options are: "identical" (Logical, are the two dataframes identical?), "additions" (numeric, which rows are new?), "deletions" (numeric, which rows are no longer present?), "logical" (logical, which elements of the old dataframe are in the new one?).

See Also

Other metadata functions: BIEN_metadata_citation(), BIEN_metadata_data_dictionaries(), BIEN_metadata_database_version(), BIEN_metadata_list_political_names(), BIEN_plot_metadata(), BIEN_ranges_list()

Examples

Run this code
if (FALSE) {
new<-BIEN_occurrence_species("Acer nigrum")
old<-new[-1:-4,]#simulate having an older dataset by removing four rows
BIEN_metadata_match_data(old,new,return="identical")
BIEN_metadata_match_data(old,new,return="additions")}

Run the code above in your browser using DataLab