Skip to content
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

create internal func and put in relevant funcs #320

Merged
merged 4 commits into from
Sep 18, 2023

Conversation

hfuchs5
Copy link
Collaborator

@hfuchs5 hfuchs5 commented Aug 4, 2023

What changes are proposed in this pull request?
Changed non-numeric column identification to make sure it stopped printing all of the column names

If there is an GitHub issue associated with this pull request, please provide link.
#314


Reviewer Checklist (if item does not apply, mark is as complete)

  • PR branch has pulled the most recent updates from main branch. Ensure the pull request branch and your local version match and both have the latest updates from the main branch.
  • If a new function was added, function included in _pkgdown.yml
  • If a bug was fixed, a unit test was added for the bug check
  • Run pkgdown::build_site(). Check the R console for errors, and review the rendered website.
  • Code coverage is suitable for any new functions/features. Review coverage with withr::with_envvar(new = c("NOT_CRAN" = "true"), covr::report()). Begin in a fresh R session without any packages loaded.
  • R CMD Check runs without errors, warnings, and notes
  • usethis::use_spell_check() runs with no spelling errors in documentation

When the branch is ready to be merged into master:

  • Update NEWS.md with the changes from this pull request under the heading "# cbioportalR (development version)". If there is an issue associated with the pull request, reference it in parentheses at the end update (see NEWS.md for examples).
  • Run codemetar::write_codemeta()
  • Run usethis::use_spell_check() again
  • Approve Pull Request
  • Merge the PR

@karissawhiting
Copy link
Collaborator

This looks good and close to merge!

I think we can simply the .check_numeric() function a bit. We can either stick to base R matrix subsetting (is_numeric <- apply(alt_only, 2, is.numeric), then names(is_numeric[!is_numeric])), or if we want tidyverse I think imap() would be a good option. This maps over input columns and names simultaneously. Then I don't think we would need to create the interstitial dataframe in between input and outputting vector of names for messaging, which I think could slow things down on a large data set.

@karissawhiting karissawhiting merged commit 0bc1997 into main Sep 18, 2023
6 checks passed
@karissawhiting karissawhiting deleted the fix_error_subset_freq_message branch September 18, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants