Skip to content

Error when passing tibble #12

@johnsonra

Description

@johnsonra

I'm getting the following error when passing a tibble. I'm guessing this is the same problem that was reported in Issue #8.

Example

library(dplyr)
library(JointAI)

set.seed(284397)
lm_imp(y ~ x,
       data = tibble(y = rnorm(100),
                     x = c(rnorm(99), NA)))

## Error in is.nan(data[, k]) : 
##  default method not implemented for type 'list'

Work around

Convert tibbles to data.frames:

lm_imp(y ~ x,
       data = tibble(y = rnorm(100),
                     x = c(rnorm(99), NA)) %>%
         as.data.frame())

## Note: No MCMC sample will be created when n.iter is set to 0.
## 
## Call:
## lm_imp(formula = y ~ x, data = tibble(y = rnorm(100), x = c(rnorm(99), 
##     NA)) %>% as.data.frame())
## 
## (The object does not contain an MCMC sample.)

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