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

Support for logical input in rowCummaxs et al.? #215

Closed
Henrik-P opened this issue Sep 21, 2021 · 1 comment
Closed

Support for logical input in rowCummaxs et al.? #215

Henrik-P opened this issue Sep 21, 2021 · 1 comment

Comments

@Henrik-P
Copy link

First, thanks a lot for an excellent package.

This issue is related to colCumprods() does not support logical input, which was implemented. I just noted some other functions which don't support logical input: rowCummaxs, rowCummins, colCummaxs, colCummins. It would be great if they also could handle a logical x.

m = matrix(c(TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), nrow = 3, byrow = TRUE)
m
#       [,1]  [,2]  [,3]
# [1,]  TRUE FALSE FALSE
# [2,] FALSE  TRUE FALSE
# [3,] FALSE FALSE  TRUE

rowCummaxs(m)
# Error in rowCummaxs(m) : Argument 'x' cannot be logical.

rowCummins(m)
# Error in rowCummins(m) : Argument 'x' cannot be logical.

colCummaxs(m)
# Error in colCummaxs(m) : Argument 'x' cannot be logical.

colCummins(m)
# Error in colCummins(m) : Argument 'x' cannot be logical.
@Henrik-P Henrik-P changed the title rowCummaxs et al don't support logical input. rowCummaxs et al. don't support logical input. Sep 21, 2021
@Henrik-P Henrik-P changed the title rowCummaxs et al. don't support logical input. Support logical input in rowCummaxs et al. Sep 21, 2021
@Henrik-P Henrik-P changed the title Support logical input in rowCummaxs et al. Support for logical input in rowCummaxs et al.? Sep 21, 2021
@HenrikBengtsson HenrikBengtsson added this to the Next release milestone Sep 22, 2021
@HenrikBengtsson
Copy link
Owner

I've just added support for this in the develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants