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

add as.numeric for bins #28

Merged
merged 1 commit into from
Sep 6, 2023
Merged

add as.numeric for bins #28

merged 1 commit into from
Sep 6, 2023

Conversation

asizemore
Copy link
Member

Resolves #27

Extends as.numeric to work for Bins and BinLists. See VEuPathDB/microbiomeComputations#48 for more details and use!

@asizemore asizemore requested a review from d-callan September 5, 2023 18:22
#' @return BinList
#' @export
setMethod("as.numeric", signature("BinList"), function(x) {
binListNumeric <- BinList(lapply(x, as.numeric))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im a little surprised this worked without explicitly making it a SimpleList

@asizemore asizemore merged commit b2249b6 into main Sep 6, 2023
@asizemore asizemore deleted the fix-27-asnumeric-bins branch September 6, 2023 14:18
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.

add helper to convert binstarts and ends to numeric
2 participants