* using log directory ‘/data/gannet/ripley/R/packages/tests-MKL/adaptDA.Rcheck’ * using R Under development (unstable) (2018-01-29 r74182) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘adaptDA/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘adaptDA’ version ‘1.0’ * 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 whether package ‘adaptDA’ 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 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 ... NOTE .amdai.initparam: no visible global function definition for ‘cov’ .amdat.initiparam: no visible global function definition for ‘cov’ amdai: no visible global function definition for ‘cov’ Undefined global functions or variables: cov Consider adding importFrom("stats", "cov") to your NAMESPACE file. * checking Rd files ... 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 examples ... ERROR Running examples in ‘adaptDA-Ex.R’ failed The error most likely occurred in: > ### Name: adaptDA-package > ### Title: Adaptive Mixture Discriminant Analysis > ### Aliases: adaptDA-package adaptDA > ### Keywords: package > > ### ** Examples > > set.seed(12345) > > ## Data simulation > data(iris) > Z.data = iris[,-5] > Z.cls = as.numeric(iris[,5]) > Z.cls[as.numeric(iris[,5]==2)] = 3 > Z.cls[as.numeric(iris[,5]==3)] = 2 > N = 150 > > ## Sampling > ind = sample(1:N,N) > X.data = Z.data[ind[1:(2*N/3)],] > X.cls = Z.cls[ind[1:(2*N/3)]] > X.data = X.data[X.cls!=3,] > X.cls = X.cls[X.cls!=3] > Y.data = Z.data[ind[(2*N/3+1):N],] > Y.cls = Z.cls[ind[(2*N/3+1):N]] > > # Plotting the data > par(mfrow=c(2,3))#,cex.lab=0.75,cex.axis=0.75,cex.main=0.75,cex.sub=0.75) > pc = princomp(Z.data) > x = predict(pc,X.data) > y = predict(pc,Y.data) > plot(y,type='n',main='Learning data') > points(x[,1:2],col=X.cls+1,pch=19,main='Learning data') > y = predict(pc,Y.data) > plot(y[,1:2],col=1,pch=19,main='Test data') > plot(y[,1:2],col=Y.cls+1,pch=19,main='True labels of test data') > > ## Usual classification with QDA > c1 = qda(X.data,X.cls) > res1 = predict(c1,Y.data) > plot(y[,1:2],col=as.numeric(res1$class)+1,pch=19,main='QDA results') > > ## Classification with AMDAi > c2 = amdai(X.data,X.cls,model='qda') > B = rep(c(-Inf),5) > myPRMS <- vector(mode='list', length=7) # vector of lists! > for (i in 2:5){ + myPRMS[[i]] = predict(c2,Y.data,K=i) + B[i] = myPRMS[[i]]$crit$bic + } Error in solve.default(V[i, , ]) : system is computationally singular: reciprocal condition number = 2.26537e-18 Calls: predict ... .amdai.loglikelihood -> diag -> solve -> solve.default Execution halted * checking PDF version of manual ... OK * DONE Status: 1 ERROR, 1 NOTE See ‘/data/gannet/ripley/R/packages/tests-MKL/adaptDA.Rcheck/00check.log’ for details. Time 0:36.36, 21.54 + 3.52