rstudio / rstudio/pointblank

Tolerance for testing column value equality

Open
#326 0 comments 0 reactions 1 assignee View on GitHub

@rich-iannone is already working on this.

Since Jun 30, 2021.

Difficulty: [3] Advanced Effort: [3] High Priority: [3] High Type: ★ Enhancement
Dominant language
R
Stars
1k
Forks
59
Avg merge
25m
Merged PRs (30d)
4

Description

Apply this to col_vals_equal() and col_vals_not_equal() (plus the variants of those functions). Use whatever testthat 3e uses for tolerance (based on all_equal()). Make sure this works in YAML, when creating testthat files, and across all data sources (e.g., databases).

Thank you @eveyp for this! (original post from Discussions below)

Discussed in https://github.com/rich-iannone/pointblank/discussions/325

Originally posted by eveyp June 30, 2021
Would it be possible to specify a tolerance when testing if column values are equal to a specified value? This would be helpful to avoid floating point round off issues.

It could be similar to how testthat has expect_equal() which allows for a tolerance and expect_identical() which requires the values to be exactly the same (https://testthat.r-lib.org/reference/equality-expectations.html).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.