MSKCC-Epi-Bio / gnomeR

Package to wrangle and visualize genomic data in R
https://mskcc-epi-bio.github.io/gnomeR/
Other
26 stars 16 forks source link

create internal func and put in relevant funcs #320

Closed hfuchs5 closed 11 months ago

hfuchs5 commented 1 year ago

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)

When the branch is ready to be merged into master:

karissawhiting commented 1 year ago

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.