Skip to content

Warning about inconsistent lengths #2

@MetaEntropy

Description

@MetaEntropy

ifelse1 should warn, by default, when the longer object is not a multiple of length of the shorter object, as in usual R functions.

Example:

ifelse1(rep(TRUE,5), 1:4, 1:5*10)
[1] 1 2 3 4 1

I would prefer:

ifelse1(rep(TRUE,5), 1:4, 1:510)
[1] 1 2 3 4 1
Warning message:
In ifelse1(rep(TRUE,5), 1:4, 1:5
10):
longer object length is not a multiple of shorter object length

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions