Skip to content

ampute with run = FALSE produces error #727

@clayford

Description

@clayford

Running ampute() with run = FALSE produces the following error:

Error in `[<-.data.frame`(`*tmp*`, is.na(data.frame(missing.data)), value = NA) : 
  unsupported matrix index in replacement

To Reproduce

set.seed(2016)
testdata <- as.data.frame(MASS::mvrnorm(n = 10000, 
                                        mu = c(10, 5, 0), 
                                        Sigma = matrix(data = c(1.0, 0.2, 0.2, 
                                                                0.2, 1.0, 0.2, 
                                                                0.2, 0.2, 1.0), 
                                                       nrow = 3, 
                                                       byrow = T)))
emptyresult <- ampute(testdata, run = FALSE)

Expected behavior
I expected to run ampute() without actually executing the amputation procedure as documented in the ampute vingette

Running mice version 3.18.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions