data.equal.data.table: Data equal in two data.tables

Description Usage Arguments Note Examples

View source: R/dwtools.R

Description

Test if data equal in two data.tables, can ignore order of rows or columns.

Usage

1
2
data.equal.data.table(DT1, DT2, ignore_row_order = TRUE,
  ignore_col_order = FALSE, check.attributes = FALSE)

Arguments

DT1

data.table.

DT2

data.table.

ignore_row_order

logical.

ignore_col_order

logical.

check.attributes

logical, only FALSE supported.

Note

Duplicate names in DTs were not tested. All attributes all ignored.

Examples

1
2
3
4
5
6
7
8
suppressPackageStartupMessages(library(dwtools))

DT1 <- dw.populate(scenario="fact")
DT2 <- copy(DT1)[sample(1:nrow(DT1),nrow(DT1),FALSE)]
data.equal.data.table(DT1,DT2,ignore_row_order=TRUE)

setcolorder(DT2,sample(names(DT2),length(DT2),FALSE))
data.equal.data.table(DT1,DT2,ignore_row_order=TRUE,ignore_col_order=TRUE)

jangorecki/dwtools documentation built on May 18, 2019, 12:24 p.m.