* using log directory 'd:/Rcompile/CRANpkg/local/3.0/lavaan.Rcheck' * using R version 3.0.3 (2014-03-06) * using platform: i386-w64-mingw32 (32-bit) * using session charset: ISO8859-1 * checking for file 'lavaan/DESCRIPTION' ... OK * this is package 'lavaan' version '0.5-18' * 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 'lavaan' can be installed ... OK * checking installed package size ... OK * checking package 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 R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... 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 ... NOTE lav_samplestats_Gamma: no visible global function definition for 'anyNA' * checking Rd files ... 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 contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... ERROR Running examples in 'lavaan-Ex.R' failed The error most likely occurred in: > ### Name: InformativeTesting > ### Title: Testing order Constrained Hypotheses in SEM > ### Aliases: InformativeTesting informativetesting print.InformativeTesting > > ### ** Examples > > # Simple ANOVA model with 3 groups (N=20 per group) (artifical data) > set.seed(1234) > Y <- cbind(c(rnorm(20,0,1), rnorm(20,0.5,1), rnorm(20,1,1))) > grp <- c(rep("1", 20), rep("2", 20), rep("3", 20)) > Data <- data.frame(Y, grp) > > #create model matrix > fit.lm <- lm(Y ~ grp, data = Data) > mfit <- fit.lm$model > mm <- model.matrix(mfit) > > Y <- model.response(mfit) > X <- data.frame(mm[,2:3]) > names(X) <- c("d1", "d2") > Data.new <- data.frame(Y, X) > > # model > model <- 'Y ~ 1 + a1*d1 + a2*d2' > > # constraints syntax: mu1 < mu2 < mu3 > constraints <- ' a1 > 0 + a1 < a2 ' > > # we only generate 10 bootstrap samples in this example; in practice > # you may wish to use a much higher number, say > 10.000. The double bootstrap > # is not necessary in case of an univariate ANOVA model. > example <- InformativeTesting(model = model, data = Data.new, + R = 10L, double.bootstrap = "no", + constraints = constraints) Error in lav_samplestats_Gamma(X[[g]], meanstructure = meanstructure) : could not find function "anyNA" Calls: InformativeTesting ... -> lav_samplestats_from_data -> lav_samplestats_Gamma Execution halted