Skip to content

var producing NA #812

@jcanner

Description

@jcanner

Hello! In vs 1.9.1 and 1.9.2 on R 4.5.1 and 4.5.2 when var() is run with a missing value it returns NA even though na.rm = TRUE is added. Base R still works though. Other functions perform as expected (mean, sd) when na.rm = TRUE is added
Recreation of Issue

missing <- c(1, 2, 3, 4, NA)
mosiac::var(~missing, na.rm = TRUE)
[1] NA

stats::var(missing, na.rm = TRUE)
[1] 1.666667

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions