You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
The text was updated successfully, but these errors were encountered:
I think the issue stems from line 191 of helpfunctions_checks.R - probably because indexing a tibble in this way returns a tibble with one variable, rather than a vector.
Modifying line 191 as follows seems to resolve the error:
data[is.nan(unlist(data[, k])), k]
johnsonra
added a commit
to johnsonra/JointAI
that referenced
this issue
Apr 27, 2023
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
Work around
Convert tibbles to data.frames:
The text was updated successfully, but these errors were encountered: