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
The following example was kindly contributed by Leonhard Bakker. It shows that mice 3.6.0 does not work with nested data frames, for example, as created by tibble::add_column().
Error description
When using the mice() function, the error
Error in is.data.frame(x) : (list) object cannot be coerced to type 'double'
was returned. The error originated from a coding error. A function returned a variable as a data.frame, which was added to the dataset using the tibble::add_column() function. The dataset now comprised a variable with the class data.frame, which resulted in the error message.
Generate the data
This error was replicated using the mice::nhanes2 dataset. The chl variable is dropped first from the test dataset and subsequently the chl variable is added as a data.frame using the tibble::add_column() function.
The following example was kindly contributed by Leonhard Bakker. It shows that
mice 3.6.0
does not work with nested data frames, for example, as created bytibble::add_column()
.Error description
When using the
mice()
function, the errorwas returned. The error originated from a coding error. A function returned a variable as a
data.frame
, which was added to the dataset using thetibble::add_column()
function. The dataset now comprised a variable with the classdata.frame
, which resulted in the error message.Generate the data
This error was replicated using the
mice::nhanes2
dataset. Thechl
variable is dropped first from the test dataset and subsequently thechl
variable is added as adata.frame
using thetibble::add_column()
function.Replicate the error
The text was updated successfully, but these errors were encountered: