Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent data.table errors in check_values() #34

Closed
wants to merge 1 commit into from

Conversation

@danschrage
Copy link

danschrage commented Apr 2, 2019

check_values() relies on selecting variables using a vector of strings corresponding to names. If data is a data.table, this requires the option "with=FALSE". If we instead coerce data to a data.frame at the start of the function, we avoid this error.

This is a bugfix for issue #35.

Please ensure the following before submitting a PR:

  • if suggesting code changes or improvements, open an issue first
  • for all but trivial changes (e.g., typo fixes), add your name to DESCRIPTION
  • for all but trivial changes (e.g., typo fixes), documentation your change in NEWS.md with a parenthetical reference to the issue number being addressed
  • if changing documentation, edit files in /R not /man and run devtools::document() to update documentation
  • add code or new test files to /tests for any new functionality or bug fix
  • make sure R CMD check runs without error before submitting the PR
check_values() relies on selecting variables using a vector of strings corresponding to names. If data is a data.table, this requires the option "with=FALSE". If we instead coerce data to a data.frame at the start of the function, we avoid this error.
@leeper

This comment has been minimized.

Copy link
Owner

leeper commented Dec 24, 2019

Thanks. Looks like the best fix for this is to be more data.table aware rather than doing a class coercion. I'm sending a patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.