CompareToReferenceDataset: Test if column is identical with reference dataset

View source: R/clean_datasets.R

CompareToReferenceDatasetR Documentation

Test if column is identical with reference dataset

Description

Tests wether the column given is identical with another column from a reference dataset. The order of rows is not identical in both columns, therefore a simple comparison with identical() is not possible. The columns compared have the same name "name". Both datasets have a column (e.g. with the name "Plot"), by which they can be sorted. Is used in BetaDivMultifun to test wether the dataset content is identical with the Synthesis dataset "Info_data_EP grass functions & services.xlsx", BExIS number

Usage

CompareToReferenceDataset(
  tocompareset,
  refset,
  name,
  sortcol = "Plot",
  tolerance = 1e-04
)

Arguments

tocompareset

name of the dataset which is compared (dataset 1). Is a data.table.

refset

name of the reference dataset (dataset 2). This dataset can be much larger than tocompareset, only the two columns of interest are filtered out. Is a data.table.

name

names of the columns which will be compared.

sortcol

name of the column which is used to sort rows

Value

Boolean value which indicates wheter the columns are identical or not.


allanecology/multiFunBetadivLuiGDM documentation built on Nov. 12, 2023, 6:16 a.m.