Skip to content

[ fails when the condition contains NAs #92

Description

@gogonzo

Hi there,
I have an issue related with the [ which is not consistent with the base R. Normally, when one pass the condition containing NAs into [, NAs will be returned for this row.

df <- data.frame(a = c(1, NA, 3), b = 1:3)
df[df$a > 0, ]

#     a  b
# 1   1  1
# NA NA NA
# 3   3  3

With S4Vectors is not the case

DF <- S4Vectors::DataFrame(a = c(1, NA, 3), b = 1:3)
DF[DF$a > 0, ]
# Error: logical subscript contains NAs

Do you have a plan to change this?

Regards,
DK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions