Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Development version
- Added check to ensure that the column ordering is the same (#32)
- Added more informative error messaging if a specified key is missing from the base or comparison dataset (#113)
- Added check for differences in classes between the base and comparison datasets (#42)
- The package is less shouty now (#112)


# diffdf 1.0.4
Expand All @@ -35,4 +36,4 @@ Development version

# diffdf 1.0.0

- Initial Release !!
- Initial Release
20 changes: 10 additions & 10 deletions R/diffdf.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ diffdf <- function(

COMPARE[["UnsupportedColsBase"]] <- construct_issue(
value = identify_unsupported_cols(BASE),
message = "There are columns in BASE with unsupported modes !!"
message = "There are columns in BASE with unsupported modes"
)


COMPARE[["UnsupportedColsComp"]] <- construct_issue(
value = identify_unsupported_cols(COMP),
message = "There are columns in COMPARE with unsupported modes !!"
message = "There are columns in COMPARE with unsupported modes"
)


Expand All @@ -199,13 +199,13 @@ diffdf <- function(

COMPARE[["VarModeDiffs"]] <- construct_issue(
value = identify_mode_differences(BASE, COMP),
message = "There are columns in BASE and COMPARE with different modes !!"
message = "There are columns in BASE and COMPARE with different modes"
)


COMPARE[["VarClassDiffs"]] <- construct_issue(
value = identify_class_differences(BASE, COMP),
message = "There are columns in BASE and COMPARE with different classes !!"
message = "There are columns in BASE and COMPARE with different classes"
)


Expand Down Expand Up @@ -265,15 +265,15 @@ diffdf <- function(
BASE[, keep_vars_base, drop = FALSE],
COMP[, keep_vars_comp, drop = FALSE]
),
message = "There are differences in the column ordering between BASE and COMPARE !!"
message = "There are differences in the column ordering between BASE and COMPARE"
)
}


##### Check Attributes
COMPARE[["AttribDiffs"]] <- construct_issue(
value = identify_att_differences(BASE, COMP, exclude_cols),
message = "There are columns in BASE and COMPARE with differing attributes !!"
message = "There are columns in BASE and COMPARE with differing attributes"
)


Expand All @@ -285,25 +285,25 @@ diffdf <- function(

COMPARE[["ExtRowsBase"]] <- construct_issue(
value = identify_extra_rows(BASE, COMP, KEYS),
message = "There are rows in BASE that are not in COMPARE !!"
message = "There are rows in BASE that are not in COMPARE"
)


COMPARE[["ExtRowsComp"]] <- construct_issue(
value = identify_extra_rows(COMP, BASE, KEYS),
message = "There are rows in COMPARE that are not in BASE !!"
message = "There are rows in COMPARE that are not in BASE"
)


COMPARE[["ExtColsBase"]] <- construct_issue(
value = identify_extra_cols(BASE, COMP),
message = "There are columns in BASE that are not in COMPARE !!"
message = "There are columns in BASE that are not in COMPARE"
)


COMPARE[["ExtColsComp"]] <- construct_issue(
value = identify_extra_cols(COMP, BASE),
message = "There are columns in COMPARE that are not in BASE !!"
message = "There are columns in COMPARE that are not in BASE"
)


Expand Down
12 changes: 6 additions & 6 deletions tests/testthat/_snaps/identify_column_order.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
------------------------------------------------------------------


There are differences in the column ordering between BASE and COMPARE !!
There are differences in the column ordering between BASE and COMPARE
===================================
COLUMN BASE-INDEX COMPARE-INDEX
-----------------------------------
Expand Down Expand Up @@ -44,7 +44,7 @@
------------------------------------------------------------------


There are differences in the column ordering between BASE and COMPARE !!
There are differences in the column ordering between BASE and COMPARE
===================================
COLUMN BASE-INDEX COMPARE-INDEX
-----------------------------------
Expand All @@ -53,7 +53,7 @@
-----------------------------------


There are columns in BASE that are not in COMPARE !!
There are columns in BASE that are not in COMPARE
=========
COLUMNS
---------
Expand All @@ -80,15 +80,15 @@
------------------------------------------------------------------


There are columns in BASE that are not in COMPARE !!
There are columns in BASE that are not in COMPARE
=========
COLUMNS
---------
y1
---------


There are columns in COMPARE that are not in BASE !!
There are columns in COMPARE that are not in BASE
=========
COLUMNS
---------
Expand All @@ -115,7 +115,7 @@
------------------------------------


There are differences in the column ordering between BASE and COMPARE !!
There are differences in the column ordering between BASE and COMPARE
===================================
COLUMN BASE-INDEX COMPARE-INDEX
-----------------------------------
Expand Down
20 changes: 10 additions & 10 deletions tests/testthat/_snaps/miscellaneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
--------------------------------------


There are rows in COMPARE that are not in BASE !!
There are rows in COMPARE that are not in BASE
First 10 of 150 rows are shown in table below
===============
..ROWNUMBER..
Expand All @@ -34,7 +34,7 @@
---------------


There are columns in COMPARE that are not in BASE !!
There are columns in COMPARE that are not in BASE
==============
COLUMNS
--------------
Expand Down Expand Up @@ -65,7 +65,7 @@
--------------------------------------


There are rows in BASE that are not in COMPARE !!
There are rows in BASE that are not in COMPARE
First 10 of 150 rows are shown in table below
===============
..ROWNUMBER..
Expand All @@ -83,7 +83,7 @@
---------------


There are columns in BASE that are not in COMPARE !!
There are columns in BASE that are not in COMPARE
==============
COLUMNS
--------------
Expand Down Expand Up @@ -114,7 +114,7 @@
------------------------------------------------------------------


There are rows in BASE that are not in COMPARE !!
There are rows in BASE that are not in COMPARE
===============
..ROWNUMBER..
---------------
Expand All @@ -124,7 +124,7 @@
---------------


There are columns in BASE that are not in COMPARE !!
There are columns in BASE that are not in COMPARE
=========
COLUMNS
---------
Expand All @@ -151,7 +151,7 @@
------------------------------------------------------------------


There are rows in COMPARE that are not in BASE !!
There are rows in COMPARE that are not in BASE
===============
..ROWNUMBER..
---------------
Expand All @@ -161,7 +161,7 @@
---------------


There are columns in COMPARE that are not in BASE !!
There are columns in COMPARE that are not in BASE
=========
COLUMNS
---------
Expand All @@ -188,15 +188,15 @@
------------------------------------


There are rows in BASE that are not in COMPARE !!
There are rows in BASE that are not in COMPARE
====
ID
----
A
----


There are rows in COMPARE that are not in BASE !!
There are rows in COMPARE that are not in BASE
====
ID
----
Expand Down
Loading