- using R Under development (unstable) (2026-11-14 r90890)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-16 (Debian 16.2.0-4) 16.2.0
GNU Fortran (Debian 16.2.0-4) 16.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
* current time: 2026-11-15 17:56:19 UTC
- checking for file ‘mi/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘mi’ version ‘1.3.1’
- checking CRAN incoming feasibility ... [1s/2s] OK
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking serialization versions ... OK
- checking whether package ‘mi’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [2s/2s] OK
- checking whether the package can be loaded with stated dependencies ... [2s/2s] OK
- checking whether the package can be unloaded cleanly ... [2s/2s] OK
- checking whether the namespace can be loaded with stated dependencies ... [2s/2s] OK
- checking whether the namespace can be unloaded cleanly ... [2s/2s] OK
- checking loading without being on the library search path ... [2s/2s] OK
- checking whether startup messages can be suppressed ... [2s/2s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [21s/28s] OK
- checking Rd files ... [0s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... [0s/0s] OK
- checking data for ASCII and uncompressed saves ... OK
- checking R/sysdata.rda ... OK
- checking sizes of PDF files under ‘inst/doc’ ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [3s/4s] ERROR
Running examples in ‘mi-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: 02missing_data.frame
> ### Title: Class "missing_data.frame"
> ### Aliases: 02missing_data.frame missing_data.frame-class
> ### missing_data.frame
> ### Keywords: classes manip AimedAtUseRs
>
> ### ** Examples
>
> # STEP 0: Get data
> data(CHAIN, package = "mi")
>
> # STEP 1: Convert to a missing_data.frame
> mdf <- missing_data.frame(CHAIN) # warnings about missingness patterns
NOTE: The following pairs of variables appear to have the same missingness pattern.
Please verify whether they are in fact logically distinct variables.
[,1] [,2]
[1,] "age" "healthy"
[2,] "age" "mental"
[3,] "age" "treatment"
[4,] "healthy" "mental"
[5,] "healthy" "treatment"
[6,] "mental" "treatment"
Warning in .local(.Object, ...) :
Some observations are missing on all included variables.
Often, this indicates a more complicated model is needed for this missingness mechanism
> show(mdf)
Object of class missing_data.frame with 532 observations on 7 variables
There are 9 missing data patterns
Append '@patterns' to this missing_data.frame to access the corresponding pattern for every observation or perhaps use table()
type missing method model
log_virus continuous 179 ppd linear
age continuous 24 ppd linear
income continuous 38 ppd linear
healthy continuous 24 ppd linear
mental binary 24 ppd logit
damage ordered-categorical 63 ppd ologit
treatment ordered-categorical 24 ppd ologit
family link transformation
log_virus gaussian identity standardize
age gaussian identity standardize
income gaussian identity standardize
healthy gaussian identity standardize
mental binomial logit <NA>
damage multinomial logit <NA>
treatment multinomial logit <NA>
>
> # STEP 2: change things
> mdf <- change(mdf, y = "log_virus", what = "transformation", to = "identity")
>
> # STEP 3: look deeper
> summary(mdf)
log_virus age income healthy
Min. : 0.000 Min. :21.00 Min. : 1.000 Min. :16.67
1st Qu.: 0.000 1st Qu.:37.00 1st Qu.: 2.000 1st Qu.:35.00
Median : 0.000 Median :43.00 Median : 3.000 Median :45.37
Mean : 4.324 Mean :42.56 Mean : 3.377 Mean :44.40
3rd Qu.: 9.105 3rd Qu.:48.00 3rd Qu.: 5.000 3rd Qu.:54.89
Max. :13.442 Max. :70.00 Max. :10.000 Max. :70.11
NAs :179 NAs :24 NAs :38 NAs :24
mental damage treatment
Min. :0.0000 Min. :1.000 Min. :0.0000
1st Qu.:0.0000 1st Qu.:3.000 1st Qu.:0.0000
Median :0.0000 Median :4.000 Median :1.0000
Mean :0.2717 Mean :3.578 Mean :0.8602
3rd Qu.:1.0000 3rd Qu.:5.000 3rd Qu.:2.0000
Max. :1.0000 Max. :5.000 Max. :2.0000
NAs :24 NAs :63 NAs :24
> hist(mdf)
> image(mdf)
>
> # STEP 4: impute
> ## Not run:
> ##D imputations <- mi(mdf)
> ## End(Not run)
>
> ## An example with subsetting on a fully observed variable
> data(nlsyV, package = "mi")
> mdfs <- missing_data.frame(nlsyV, favor_positive = TRUE, favor_ordered = FALSE, by = "first")
Error in if ((l <- length(slot(object, i))) > 1) { :
argument is of length zero
Calls: missing_data.frame ... validObject -> anyStrings -> isTRUE -> validityMethod
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [6s/7s] ERROR
Running ‘missing_data.frame.R’ [3s/4s]
Running ‘missing_variable.R’ [2s/3s]
Running the tests in ‘tests/missing_variable.R’ failed.
Complete output:
> stopifnot(require(mi))
Loading required package: mi
Loading required package: Matrix
Loading required package: stats4
mi (Version 1.3.1, packaged: 2026-07-28 02:55:47 UTC; bgoodri)
mi Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Trustees of Columbia University
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under the General Public License version 2 or later.
Execute RShowDoc('COPYING') for details.
> set.seed(1)
> x <- rnorm(10)
> x[1] <- NA
> y <- missing_variable(x, type = "continuous")
>
> y <- missing_variable(x, type = "irrelevant")
> x <- rep(1, 10)
> y <- missing_variable(x, type = "fixed")
> x <- rep(1:5, each = 2)
> y <- missing_variable(x, type = "group")
>
> x[1] <- NA
> y <- missing_variable(x, type = "unordered-categorical")
> y <- missing_variable(x, type = "ordered-categorical")
> y <- missing_variable(x, type = "interval")
>
> x <- rbinom(10, size = 1, prob = 0.5)
> x[1] <- NA
> if (all(x == 1, na.rm = TRUE) || all(x == 0, na.rm = TRUE)) x[10] <- 1 - x[10]
> y <- missing_variable(x, type = "binary")
> y <- missing_variable(x, type = "grouped-binary", strata = rep(c("A", "B"), each = 5))
Error in validObject(.Object) :
invalid class "grouped-binary" object: y : length of strata must be 0 or 1 but is 10
Calls: missing_variable ... .local -> callNextMethod -> .nextMethod -> validObject
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [0s/0s] OK
- checking PDF version of manual ... [7s/9s] OK
- checking HTML version of manual ... [2s/2s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs