- using R Under development (unstable) (2024-12-21 r87453 ucrt)
- using platform: x86_64-w64-mingw32
- R was compiled by
gcc.exe (GCC) 13.3.0
GNU Fortran (GCC) 13.3.0
- running under: Windows Server 2022 x64 (build 20348)
- using session charset: UTF-8
- checking for file 'MarZIC/DESCRIPTION' ... OK
- checking extension type ... Package
- this is package 'MarZIC' version '1.0.0'
- package encoding: UTF-8
- 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 hidden files and directories ... OK
- checking for portable file names ... OK
- checking whether package 'MarZIC' can be installed ... OK
See the install log for details.
- used C++ compiler: 'g++.exe (GCC) 13.3.0'
- checking installed package size ... OK
- checking package directory ... 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 ... [1s] OK
- checking whether the package can be loaded with stated dependencies ... [1s] OK
- checking whether the package can be unloaded cleanly ... [1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s] OK
- checking loading without being on the library search path ... [1s] 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 ... [6s] OK
- checking Rd files ... [0s] OK
- checking Rd metadata ... 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 line endings in C/C++/Fortran sources/headers ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compiled code ... OK
- checking installed files from 'inst/doc' ... OK
- checking files in 'vignettes' ... OK
- checking examples ... [3s] ERROR
Running examples in 'MarZIC-Ex.R' failed
The error most likely occurred in:
> ### Name: MarZIC
> ### Title: Marginal Mediation Model for Zero-Inflated Compositional
> ### Mediators
> ### Aliases: MarZIC
>
> ### ** Examples
>
> {
+ library(MarZIC)
+
+ ## A make up example with 2 taxon and 20 subjects.
+ set.seed(1)
+ nSub <- 20
+ nTaxa <- 2
+ ## generate covariate of interest X
+ X <- rbinom(nSub, 1, 0.5)
+ ## generate confounders
+ conf1<-rnorm(nSub)
+ conf2<-rbinom(nSub,1,0.5)
+ ## generate mean of each taxon. All taxon are having the same mean for simplicity.
+ mu <- exp(-5 + X + 0.1 * conf1 + 0.1 * conf2) /
+ (1 + exp(-5 + X + 0.1 * conf1 + 0.1 * conf2))
+ phi <- 10
+
+ ## generate true RA
+ M_taxon<-t(sapply(mu,function(x) dirmult::rdirichlet(n=1,rep(x*phi,nTaxa))))
+
+ P_zero <- exp(-3 + 0.3 * X + 0.1 * conf1 + 0.1 * conf2) /
+ (1 + exp(-3 + 0.3 * X + 0.1 * conf1 + 0.1 * conf2))
+
+ non_zero_ind <- t(sapply(P_zero,function(x) 1-rbinom(nTaxa,1,rep(x,nTaxa))))
+
+ True_RA<-t(apply(M_taxon*non_zero_ind,1,function(x) x/sum(x)))
+
+ ## generate outcome Y based on true RA
+ Y <- 1 + 100 * True_RA[,1] + 5 * (True_RA[,1] > 0) + X + conf1 + conf2 + rnorm(nSub)
+
+ ## library size was set to 10,000 for all subjects for simplicity.
+ libsize <- 10000
+
+ ## generate observed RA
+ observed_AA <- floor(M_taxon*libsize*non_zero_ind)
+
+ observed_RA <- t(apply(observed_AA,1,function(x) x/sum(x)))
+ colnames(observed_RA)<-paste0("rawCount",seq_len(nTaxa))
+ CovData <- cbind(Y = Y, X = X, libsize = libsize, conf1 = conf1, conf2 = conf2)
+
+
+ ## run the analysis
+ res <- MarZIC(
+ MicrobData = observed_RA,
+ CovData = CovData,
+ lib_name = "libsize",
+ y_name = "Y",
+ x_name = "X",
+ conf_name = c("conf1","conf2"),
+ taxa_of_interest = NULL,
+ num_cores = 1,
+ mediator_mix_range = 1
+ )
+ }
One or more reads are missing. Subjects with missing were removed from analysis
Error in unserialize(socklist[[n]]) : error reading from connection
Calls: MarZIC
Execution halted
Error in serialize(data, node$con) : error writing to connection
Calls: <Anonymous> ... postNode -> sendData -> sendData.SOCKnode -> serialize
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [4s] ERROR
Error(s) in re-building vignettes:
--- re-building 'MarZIC.Rmd' using rmarkdown
Quitting from lines 113-127 [unnamed-chunk-3] (MarZIC.Rmd)
Error: processing vignette 'MarZIC.Rmd' failed with diagnostics:
error reading from connection
--- failed re-building 'MarZIC.Rmd'
SUMMARY: processing the following file failed:
'MarZIC.Rmd'
Error: Vignette re-building failed.
Execution halted
Error in serialize(data, node$con) : error writing to connection
Calls: <Anonymous> ... postNode -> sendData -> sendData.SOCKnode -> serialize
- checking PDF version of manual ... [21s] OK
- checking HTML version of manual ... [1s] OK
- DONE
Status: 2 ERRORs