* using log directory 'd:/Rcompile/CRANpkg/local/3.3/sm.Rcheck' * using R version 3.3.3 (2017-03-06) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'sm/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'sm' version '2.2-5.4' * 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 'sm' 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 * loading checks for arch 'i386' ** 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 * loading checks for arch 'x64' ** 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 ... NOTE 'library' or 'require' calls in package code: 'akima' 'misc3d' 'rgl' 'rpanel' 'tkrplot' Please use :: or requireNamespace() instead. See section 'Suggested packages' in the 'Writing R Extensions' manual. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... NOTE addplot: no visible global function definition for 'par' addplot: no visible global function definition for 'points' britmap: no visible binding for global variable 'britpts' britmap: no visible global function definition for 'lines' circle: no visible global function definition for 'par' circle: no visible global function definition for 'lines' cv: no visible global function definition for 'dnorm' cv: no visible global function definition for 'var' cv.crit.dens: no visible global function definition for 'dnorm' h.select: no visible global function definition for 'var' h.select: no visible global function definition for 'optim' h.select: no visible global function definition for 'optimise' hcv: no visible global function definition for 'var' hcv: no visible global function definition for 'plot' hcv: no visible global function definition for 'lines' hidplot: no visible global function definition for 'par' hidplot: no visible global function definition for 'points' lambda.select: no visible global function definition for 'uniroot' latlines: no visible global function definition for 'par' latlines: no visible global function definition for 'points' latlines.e: no visible global function definition for 'par' latlines.e: no visible global function definition for 'points' longlines: no visible global function definition for 'par' longlines: no visible global function definition for 'points' longlines.e: no visible global function definition for 'par' longlines.e: no visible global function definition for 'points' nise: no visible global function definition for 'dnorm' nmise: no visible global function definition for 'dnorm' nnbr: no visible global function definition for 'var' normdens.band: no visible global function definition for 'dnorm' normdens.band: no visible global function definition for 'par' normdens.band: no visible global function definition for 'polygon' p.quad.moment: no visible global function definition for 'pchisq' p.quad.moment.adjusted: no visible global function definition for 'pchisq' p.quad.moment.old: no visible global function definition for 'pchisq' plot.density2: no visible global function definition for 'rgl.pop' plot.density3: no visible global function definition for 'pop3d' plot.smooth2: no visible global function definition for 'rgl.pop' plot2: no visible global function definition for 'par' plot2: no visible global function definition for 'points' plot2: no visible global function definition for 'text' plot2d: no visible global function definition for 'par' plot2d: no visible global function definition for 'plot' ps.normal: no visible global function definition for 'uniroot' ps.normal: no visible global function definition for 'plot' ps.normal: no visible global function definition for 'lines' ps.normal: no visible global function definition for 'persp' replot.density1: no visible global function definition for 'rp.tkrreplot' replot.density1: no visible binding for global variable 'plot' replot.density2: no visible global function definition for 'rp.tkrreplot' replot.density3: no visible global function definition for 'rp.tkrreplot' replot.smooth1: no visible global function definition for 'rp.tkrreplot' replot.smooth1: no visible binding for global variable 'plot' replot.smooth2: no visible global function definition for 'rp.tkrreplot' rp.colour.chart: no visible global function definition for 'plot' rp.colour.chart: no visible global function definition for 'axis' rp.colour.chart: no visible global function definition for 'rect' rp.colour.chart: no visible global function definition for 'box' rp.density1: no visible global function definition for 'rp.control' rp.density1: no visible global function definition for 'rp.tkrplot' rp.density1: no visible binding for global variable 'plot' rp.density1: no visible global function definition for 'rp.radiogroup' rp.density1: no visible global function definition for 'rp.slider' rp.density1: no visible global function definition for 'rp.checkbox' rp.density1: no visible global function definition for 'rp.do' rp.density2: no visible global function definition for 'rp.control' rp.density2: no visible global function definition for 'rp.tkrplot' rp.density2: no visible global function definition for 'rp.radiogroup' rp.density2: no visible global function definition for 'rp.slider' rp.density3: no visible global function definition for 'rp.control' rp.density3: no visible global function definition for 'rp.tkrplot' rp.density3: no visible global function definition for 'rp.radiogroup' rp.density3: no visible global function definition for 'rp.slider' rp.smooth1: no visible global function definition for 'rp.control' rp.smooth1: no visible global function definition for 'rp.tkrplot' rp.smooth1: no visible binding for global variable 'plot' rp.smooth1: no visible global function definition for 'rp.radiogroup' rp.smooth1: no visible global function definition for 'rp.slider' rp.smooth1: no visible global function definition for 'rp.checkbox' rp.smooth1: no visible global function definition for 'rp.do' rp.smooth2: no visible global function definition for 'rp.control' rp.smooth2: no visible global function definition for 'rp.tkrplot' rp.smooth2: no visible global function definition for 'rp.radiogroup' rp.smooth2: no visible global function definition for 'rp.slider' rp.smooth2: no visible global function definition for 'rp.checkbox' set.bandwidth: no visible global function definition for 'rp.do' set.bandwidth.d: no visible global function definition for 'rp.do' sig.trace: no visible global function definition for 'plot' sig.trace: no visible global function definition for 'lines' sj : phi6: no visible global function definition for 'dnorm' sj : phi4: no visible global function definition for 'dnorm' sj: no visible global function definition for 'quantile' sj: no visible global function definition for 'dnorm' sm: no visible global function definition for 'terms' sm: no visible global function definition for 'as.formula' sm: no visible global function definition for 'model.matrix' sm: no visible global function definition for 'approxfun' sm : sm.pam.draw: no visible global function definition for 'plot' sm : sm.pam.draw: no visible global function definition for 'title' sm : sm.pam.redraw: no visible global function definition for 'rp.tkrreplot' sm : sm.pam.redraw: no visible binding for global variable 'plot' sm: no visible global function definition for 'rp.control' sm: no visible global function definition for 'rp.tkrplot' sm: no visible binding for global variable 'plot' sm: no visible global function definition for 'rp.slider' sm: no visible global function definition for 'rp.checkbox' sm: no visible global function definition for 'plot' sm.ancova: no visible global function definition for 'plot' sm.ancova: no visible global function definition for 'text' sm.ancova: no visible global function definition for 'par' sm.ancova: no visible global function definition for 'polygon' sm.ancova: no visible global function definition for 'lines' sm.autoregression : sm.autoregression.1d: no visible global function definition for 'plot' sm.autoregression : sm.autoregression.1d: no visible global function definition for 'lines' sm.autoregression : sm.autoregression.1d: no visible global function definition for 'acf' sm.autoregression : sm.autoregression.1d: no visible global function definition for 'title' sm.autoregression : sm.autoregression.2d: no visible global function definition for 'quantile' sm.autoregression : sm.autoregression.2d: no visible global function definition for 'persp' sm.autoregression : sm.autoregression.2d: no visible global function definition for 'title' sm.binomial: no visible binding for global variable 'nobs' sm.binomial: no visible global function definition for 'plot' sm.binomial: no visible global function definition for 'abline' sm.binomial: no visible global function definition for 'points' sm.binomial: no visible global function definition for 'binomial' sm.binomial: no visible global function definition for 'lines' sm.binomial.bootstrap : rbetabinom: no visible global function definition for 'rbeta' sm.binomial.bootstrap : rbetabinom: no visible global function definition for 'rbinom' sm.binomial.bootstrap: no visible global function definition for 'binomial' sm.binomial.bootstrap: no visible global function definition for 'poly' sm.binomial.bootstrap: no visible global function definition for 'glm.fit' sm.binomial.bootstrap: no visible global function definition for 'fitted' sm.binomial.bootstrap: no visible global function definition for 'residuals' sm.binomial.bootstrap: no visible global function definition for 'lines' sm.check.data: no visible global function definition for 'na.omit' sm.density.1d: no visible global function definition for 'quantile' sm.density.1d: no visible global function definition for 'plot' sm.density.1d: no visible global function definition for 'dnorm' sm.density.2d: no visible global function definition for 'dnorm' sm.density.3d: no visible global function definition for 'topo.colors' sm.density.compare: no visible global function definition for 'plot' sm.density.compare: no visible global function definition for 'lines' sm.density.compare: no visible global function definition for 'polygon' sm.density.eval.3d: no visible global function definition for 'quantile' sm.density.eval.3d: no visible global function definition for 'contour3d' sm.density.eval.3d: no visible global function definition for 'rp.plot3d' sm.density.eval.3d: no visible global function definition for 'triangles3d' sm.discontinuity: no visible binding for global variable 'df' sm.discontinuity.1d: no visible global function definition for 'plot' sm.discontinuity.1d: no visible global function definition for 'polygon' sm.discontinuity.1d: no visible global function definition for 'lines' sm.discontinuity.1d: no visible global function definition for 'points' sm.discontinuity.2d: no visible global function definition for 'chull' sm.discontinuity.2d: no visible global function definition for 'plot' sm.discontinuity.2d: no visible global function definition for 'contour' sm.glm: no visible global function definition for 'glm.fit' sm.imageplot: no visible global function definition for 'image' sm.mask: no visible global function definition for 'chull' sm.monotonicity: no visible binding for global variable 'df' sm.monotonicity: no visible global function definition for 'var' sm.monotonicity: no visible global function definition for 'plot' sm.monotonicity: no visible global function definition for 'rbinom' sm.monotonicity: no visible global function definition for 'lines' sm.pam.colour.chart: no visible global function definition for 'par' sm.pca : : no visible global function definition for 'quantile' sm.pca: no visible global function definition for 'plot' sm.pca: no visible global function definition for 'polygon' sm.pca: no visible global function definition for 'lines' sm.pca: no visible global function definition for 'col2rgb' sm.pca: no visible global function definition for 'rgb' sm.pca: no visible global function definition for 'segments' sm.pca: no visible binding for global variable 'sd' sm.persplot: no visible global function definition for 'persp' sm.poisson: no visible global function definition for 'plot' sm.poisson: no visible global function definition for 'points' sm.poisson: no visible global function definition for 'poisson' sm.poisson: no visible global function definition for 'lines' sm.poisson.bootstrap : rNegBin: no visible global function definition for 'rgamma' sm.poisson.bootstrap : rNegBin: no visible global function definition for 'rpois' sm.poisson.bootstrap: no visible global function definition for 'poisson' sm.poisson.bootstrap: no visible global function definition for 'poly' sm.poisson.bootstrap: no visible global function definition for 'glm.fit' sm.poisson.bootstrap: no visible global function definition for 'fitted' sm.poisson.bootstrap: no visible global function definition for 'lines' sm.regression.1d: no visible global function definition for 'plot' sm.regression.2d: no visible global function definition for 'rainbow' sm.regression.2d: no visible global function definition for 'image' sm.regression.2d: no visible global function definition for 'contour' sm.regression.2d: no visible global function definition for 'persp' sm.regression.2d: no visible global function definition for 'rp.plot3d' sm.regression.autocor: no visible global function definition for 'plot' sm.regression.autocor: no visible global function definition for 'title' sm.regression.autocor: no visible global function definition for 'lines' sm.regression.eval.2d: no visible global function definition for 'chull' sm.rglplot: no visible global function definition for 'rp.plot3d' sm.rm: no visible global function definition for 'plot' sm.rm: no visible global function definition for 'title' sm.rm: no visible global function definition for 'lines' sm.rm: no visible global function definition for 'optim' sm.sigma2: no visible global function definition for 'chull' sm.sigma2: no visible global function definition for 'var' sm.sigma2: no visible global function definition for 'contour' sm.sigma2: no visible global function definition for 'qchisq' sm.sigweight: no visible global function definition for 'var' sm.sliceplot: no visible global function definition for 'plot' sm.sliceplot: no visible global function definition for 'points' sm.sliceplot: no visible global function definition for 'quantile' sm.sliceplot: no visible global function definition for 'contour' sm.sphere: no visible global function definition for 'menu' sm.sphere: no visible global function definition for 'par' sm.surface3d: no visible global function definition for 'triangles3d' sm.surface3d: no visible global function definition for 'segments3d' sm.survival: no visible global function definition for 'plot' sm.survival: no visible global function definition for 'text' sm.survival: no visible global function definition for 'lines' sm.ts.pdf: no visible global function definition for 'title' sm.variogram: no visible binding for global variable 'df' sm.variogram: no visible global function definition for 'var' sm.variogram: no visible global function definition for 'plot' sm.variogram: no visible global function definition for 'polygon' sm.variogram: no visible global function definition for 'points' sm.variogram: no visible global function definition for 'segments' sm.variogram: no visible global function definition for 'lines' sm.variogram: no visible global function definition for 'interp' sm.variogram: no visible global function definition for 'contourLines' sm.variogram: no visible global function definition for 'filled.contour' sm.variogram: no visible binding for global variable 'topo.colors' sm.variogram: no visible global function definition for 'axis' sm.variogram: no visible global function definition for 'contour' smplot.density: no visible global function definition for 'polygon' smplot.density: no visible global function definition for 'par' smplot.density: no visible global function definition for 'box' smplot.density: no visible global function definition for 'lines' smplot.density: no visible global function definition for 'rug' smplot.density: no visible global function definition for 'dnorm' smplot.regression: no visible global function definition for 'par' smplot.regression: no visible global function definition for 'polygon' smplot.regression: no visible global function definition for 'lines' smplot.regression: no visible global function definition for 'points' smplot.regression: no visible global function definition for 'box' sphimage: no visible global function definition for 'image' sphimage: no visible global function definition for 'polygon' Undefined global functions or variables: abline acf approxfun as.formula axis binomial box britpts chull col2rgb contour contour3d contourLines df dnorm filled.contour fitted glm.fit image interp lines menu model.matrix na.omit nobs optim optimise par pchisq persp plot points poisson poly polygon pop3d qchisq quantile rainbow rbeta rbinom rect residuals rgamma rgb rgl.pop rp.checkbox rp.control rp.do rp.plot3d rp.radiogroup rp.slider rp.tkrplot rp.tkrreplot rpois rug sd segments segments3d terms text title topo.colors triangles3d uniroot var Consider adding importFrom("grDevices", "chull", "col2rgb", "contourLines", "rainbow", "rgb", "topo.colors") importFrom("graphics", "abline", "axis", "box", "contour", "filled.contour", "image", "lines", "par", "persp", "plot", "points", "polygon", "rect", "rug", "segments", "text", "title") importFrom("stats", "acf", "approxfun", "as.formula", "binomial", "df", "dnorm", "fitted", "glm.fit", "model.matrix", "na.omit", "nobs", "optim", "optimise", "pchisq", "poisson", "poly", "qchisq", "quantile", "rbeta", "rbinom", "residuals", "rgamma", "rpois", "sd", "terms", "uniroot", "var") importFrom("utils", "menu") to your NAMESPACE file. * 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 line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... OK * checking examples ... ** running examples for arch 'i386' ... [24s] OK ** running examples for arch 'x64' ... [24s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... ** running tests for arch 'i386' ... [27s] ERROR Running 'test_scripts.R' [26s] Running the tests in 'tests/test_scripts.R' failed. Complete output: > ## Note: R CMD check may run these scripts from an installed package > scripts <- list.files(system.file("scripts", package = "sm"), ".*\\.q$") > ## these are interactive > omit2 <- match(c("bissell3.q", "dogs.q"), scripts) > scripts <- scripts[-omit2] > library(sm) Package 'sm', version 2.2-5.4: type help(sm) for summary information > if(.Platform$OS.type == "unix") options(pager="cat") else options(pager="console") > postscript(file="test_scripts.ps") > for(z in scripts) { + cat("\n============ running script `", z, "' ============\n", sep="") + set.seed(123) + source(system.file("scripts", z, package = "sm"), echo=TRUE) + rm(list = ls(all = TRUE)) + } ============ running script `air_band.q' ============ > with(aircraft, { + y <- log(Span)[Period == 3] + sm.density(y, xlab = "Log span", display = "se") + }) ============ running script `air_boot.q' ============ > with(aircraft, { + y <- log(Span)[Period == 3] + sm.density(y, xlab = "Log span") + for (i in 1:20) sm.density(sample(y, replace = TRUE) .... [TRUNCATED] ============ running script `air_cont.q' ============ > with(airpc, { + pc <- cbind(Comp.1, Comp.2) + pc1 <- pc[Period == 1, ] + pc2 <- pc[Period == 2, ] + pc3 <- pc[Period == 3, ] + p .... [TRUNCATED] Loading required package: rgl Loading required package: rpanel Loading required package: tcltk Package `rpanel', version 1.1-3: type help(rpanel) for summary information ============ running script `air_dens.q' ============ > with(airpc, { + pc3 <- cbind(Comp.1, Comp.2)[Period == 3, ] + par(mfrow = c(2, 2)) + par(cex = 0.6) + plot(pc3) + sm.density(pc3 .... [TRUNCATED] ============ running script `air_hcv.q' ============ > with(aircraft, { + y <- log(Span)[Period == 3] + par(mfrow = c(1, 2)) + sm.density(y, h = hcv(y), xlab = "Log span", lty = 3, yht = 1.4) .... [TRUNCATED] ============ running script `air_imag.q' ============ > with(airpc, { + pc3 <- cbind(Comp.1, Comp.2)[Period == 3, ] + par(mfrow = c(1, 2)) + sm.density(pc3, display = "image") + sm.density .... [TRUNCATED] ============ running script `air_ind.q' ============ > with(aircraft, { + Speed3 <- log(Speed[Period == 3]) + Span3 <- log(Span[Period == 3]) + par(mfrow = c(1, 2)) + plot(Span3, Speed3, .... [TRUNCATED] ============ running script `air_inds.q' ============ > with(aircraft, { + Speed3 <- log(Speed[Period == 3]) + Span3 <- log(Span[Period == 3]) + air3 <- cbind(Span3, Speed3) + result.12 <- .... [TRUNCATED] Observed value: -0.12786 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 Empirical significance: 1 ============ running script `air_scat.q' ============ > with(airpc, { + pc <- cbind(Comp.1, Comp.2) + pc1 <- pc[Period == 1, ] + pc2 <- pc[Period == 2, ] + pc3 <- pc[Period == 3, ] + x .... [TRUNCATED] ============ running script `bin_use.q' ============ > cat("Examples of use of function binning()\n") Examples of use of function binning() > x <- rnorm(1000) > xb <- binning(x) > h <- hnorm(x) > sm.density(xb$x, h = h, weights = xb$x.freq, ylim = c(0, + 0.5/sqrt(var(x)))) > pause() > x <- cbind(x, x + rnorm(1000)) > xb <- binning(x) > h <- hnorm(x) > par(mfrow = c(1, 2)) > sm.density(xb$x, h = h, weights = xb$x.freq) > sm.density(xb$x, h = h, weights = xb$x.freq, display = "slice") > par(mfrow = c(1, 1)) > pause() > with(airpc, { + pc3 <- cbind(Comp.1, Comp.2)[Period == 3, ] + pc.bin <- binning(pc3) + par(mfrow = c(1, 2)) + sm.density(pc.bin$x, h .... [TRUNCATED] this time original data rather than grid data are plotted ============ running script `birth1.q' ============ > with(birth, { + Low1 <- Low[Smoke == "S"] + Lwt1 <- Lwt[Smoke == "S"] + Lj <- jitter(Low1, amount = 0) + plot(Lwt1, Lj, type = "n", .... [TRUNCATED] ============ running script `birth2.q' ============ > with(birth, { + Low0 <- Low[Smoke == "N"] + Lwt0 <- Lwt[Smoke == "N"] + Low1 <- Low[Smoke == "S"] + Lwt1 <- Lwt[Smoke == "S"] + .... [TRUNCATED] ============ running script `bissell1.q' ============ > with(bissell, { + plot(Length, Flaws, xlim = c(0, 1000), pch = "o") + beta <- sum(Flaws)/sum(Length) + x <- seq(0, 1000, length = 50) + .... [TRUNCATED] ============ running script `bissell2.q' ============ > with(bissell, { + plot(Length, Flaws, xlim = c(0, 1000), pch = "o") + beta <- sum(Flaws)/sum(Length) + x <- seq(0, 1000, length = 50) + .... [TRUNCATED] ============ running script `citrate.q' ============ > with(citrate, { + Citrate <- as.matrix(citrate) + nSubj <- dim(Citrate)[1] + nTime <- dim(Citrate)[2] + Time <- (1:nTime) + plot .... [TRUNCATED] Autocovariances & autocorrelations: auto-cov auto-corr 0 360.623571 1.00000000 1 244.287143 0.67740204 2 204.040714 0.56579972 3 175.807857 0.48751072 4 151.130000 0.41907965 5 128.680714 0.35682835 6 120.196429 0.33330164 7 103.723571 0.28762283 8 91.565000 0.25390742 9 87.847857 0.24359988 10 53.901429 0.14946729 11 22.932143 0.06359025 12 13.760714 0.03815811 13 9.732143 0.02698698 Rice's criterion: h indept. depend. [1] 0.100000 6.005194 6.005194 [1] 0.200000 6.005156 6.005182 [1] 0.300000 5.965648 5.992517 [1] 0.400000 5.583011 5.878175 [1] 0.500000 4.855846 5.702201 [1] 0.600000 4.131101 5.579386 [1] 0.700000 3.535247 5.519406 [1] 0.800000 3.072755 5.506906 [1] 0.900000 2.735846 5.530976 [1] 1.000000 2.516341 5.582579 [1] 1.100000 2.400934 5.653475 [1] 1.200000 2.370399 5.736703 [1] 1.300000 2.402966 5.826924 [1] 1.400000 2.478570 5.920349 [1] 1.500000 2.581237 6.014418 [1] 1.600000 2.699336 6.107412 [1] 1.700000 2.824778 6.198149 [1] 1.800000 2.952046 6.285777 [1] 1.900000 3.077424 6.369671 [1] 2.000000 3.198465 6.449387 h: 0.8 ============ running script `edfgrad.q' ============ > with(aircraft, { + y <- log(Span[Period == 3]) + n <- length(y) + plot(sort(y), (1:n)/n, type = "S", xlab = "y", ylab = "Empirical distr ..." ... [TRUNCATED] ============ running script `follicle.q' ============ > with(follicle, { + sm.regression(Age, log(Count), h = 4, lty = 2) + model <- loess(log(Count) ~ Age) + lines(Age, model$fitted, col = 6) .... [TRUNCATED] ============ running script `geys3d.q' ============ > with(geys3d, { + par(mfrow = c(1, 2)) + plot(Waiting, Duration) + sm.density(geys3d) + par(mfrow = c(1, 1)) + }) Loading required package: misc3d ============ running script `geys_ts.q' ============ > d <- geyser$duration > cat("Data are: d=(duration of geyser eruption)\n") Data are: d=(duration of geyser eruption) > cat("Marginal density of d(t) first, followed by\n") Marginal density of d(t) first, followed by > cat("estimated density of (d(t-k),d(t)), for k=1,2\n") estimated density of (d(t-k),d(t)), for k=1,2 > a <- sm.ts.pdf(d, lags = c(1, 2)) ============ running script `lc_comp.q' ============ > with(lcancer, { + cases <- cbind(Easting/10000, Northing/10000)[Cancer == 1, + ] + controls <- cbind(Easting/10000, Northing/10000) .... [TRUNCATED] Observed value: 384.6738 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 p-value = 0.75 ============ running script `lc_dens.q' ============ > with(lcancer, { + cases <- cbind(Easting, Northing)[Cancer == 1, ]/10000 + controls <- cbind(Easting, Northing)[Cancer == 2, ]/10000 + x .... [TRUNCATED] ============ running script `lc_rr.q' ============ > with(lcancer, { + cases <- cbind(Easting, Northing)[Cancer == 1, ]/10000 + controls <- cbind(Easting, Northing)[Cancer == 2, ]/10000 + x .... [TRUNCATED] ============ running script `lynx.q' ============ > ts.plot(lynx) > title("Canadian lynx trapping (1821-1934)") > pause() > cat("Data are now log-transformed\n") Data are now log-transformed > log.lynx <- log(lynx) > sm.ts.pdf(log.lynx, lags = 4:5) > pause() > sm.autoregression(log.lynx, maxlag = 5, se = TRUE) > pause() > sm.autoregression(log.lynx, lags = cbind(4, 5)) ============ running script `mackgam.q' ============ > library(gam) Loading required package: splines Loading required package: foreach Loaded gam 1.15 > model1 <- gam(log(Density) ~ lo(log(mack.depth)) + + lo(Temperature) + lo(mack.lat, mack.long), data = mackerel) > print(model1) Call: gam(formula = log(Density) ~ lo(log(mack.depth)) + lo(Temperature) + lo(mack.lat, mack.long), data = mackerel) Degrees of Freedom: 278 total; 262.7774 Residual Residual Deviance: 260.3544 > print(gam(log(Density) ~ lo(Temperature) + lo(mack.lat, + mack.long), data = mackerel)) Call: gam(formula = log(Density) ~ lo(Temperature) + lo(mack.lat, mack.long), data = mackerel) Degrees of Freedom: 278 total; 266.4857 Residual Residual Deviance: 359.4476 > print(gam(log(Density) ~ lo(log(mack.depth)) + lo(mack.lat, + mack.long), data = mackerel)) Call: gam(formula = log(Density) ~ lo(log(mack.depth)) + lo(mack.lat, mack.long), data = mackerel) Degrees of Freedom: 278 total; 266.0766 Residual Residual Deviance: 271.311 > print(gam(log(Density) ~ lo(log(mack.depth)) + lo(Temperature), + data = mackerel)) Call: gam(formula = log(Density) ~ lo(log(mack.depth)) + lo(Temperature), data = mackerel) Degrees of Freedom: 278 total; 270.9924 Residual Residual Deviance: 335.5316 > par(mfrow = c(2, 2)) > plot.gam(model1, se = TRUE) Error in eval(expr, envir, enclos) : could not find function "plot.gam" Calls: source -> withVisible -> eval -> eval Execution halted ** running tests for arch 'x64' ... [27s] ERROR Running 'test_scripts.R' [26s] Running the tests in 'tests/test_scripts.R' failed. Complete output: > ## Note: R CMD check may run these scripts from an installed package > scripts <- list.files(system.file("scripts", package = "sm"), ".*\\.q$") > ## these are interactive > omit2 <- match(c("bissell3.q", "dogs.q"), scripts) > scripts <- scripts[-omit2] > library(sm) Package 'sm', version 2.2-5.4: type help(sm) for summary information > if(.Platform$OS.type == "unix") options(pager="cat") else options(pager="console") > postscript(file="test_scripts.ps") > for(z in scripts) { + cat("\n============ running script `", z, "' ============\n", sep="") + set.seed(123) + source(system.file("scripts", z, package = "sm"), echo=TRUE) + rm(list = ls(all = TRUE)) + } ============ running script `air_band.q' ============ > with(aircraft, { + y <- log(Span)[Period == 3] + sm.density(y, xlab = "Log span", display = "se") + }) ============ running script `air_boot.q' ============ > with(aircraft, { + y <- log(Span)[Period == 3] + sm.density(y, xlab = "Log span") + for (i in 1:20) sm.density(sample(y, replace = TRUE) .... [TRUNCATED] ============ running script `air_cont.q' ============ > with(airpc, { + pc <- cbind(Comp.1, Comp.2) + pc1 <- pc[Period == 1, ] + pc2 <- pc[Period == 2, ] + pc3 <- pc[Period == 3, ] + p .... [TRUNCATED] Loading required package: rgl Loading required package: rpanel Loading required package: tcltk Package `rpanel', version 1.1-3: type help(rpanel) for summary information ============ running script `air_dens.q' ============ > with(airpc, { + pc3 <- cbind(Comp.1, Comp.2)[Period == 3, ] + par(mfrow = c(2, 2)) + par(cex = 0.6) + plot(pc3) + sm.density(pc3 .... [TRUNCATED] ============ running script `air_hcv.q' ============ > with(aircraft, { + y <- log(Span)[Period == 3] + par(mfrow = c(1, 2)) + sm.density(y, h = hcv(y), xlab = "Log span", lty = 3, yht = 1.4) .... [TRUNCATED] ============ running script `air_imag.q' ============ > with(airpc, { + pc3 <- cbind(Comp.1, Comp.2)[Period == 3, ] + par(mfrow = c(1, 2)) + sm.density(pc3, display = "image") + sm.density .... [TRUNCATED] ============ running script `air_ind.q' ============ > with(aircraft, { + Speed3 <- log(Speed[Period == 3]) + Span3 <- log(Span[Period == 3]) + par(mfrow = c(1, 2)) + plot(Span3, Speed3, .... [TRUNCATED] ============ running script `air_inds.q' ============ > with(aircraft, { + Speed3 <- log(Speed[Period == 3]) + Span3 <- log(Span[Period == 3]) + air3 <- cbind(Span3, Speed3) + result.12 <- .... [TRUNCATED] Observed value: -0.12786 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 Empirical significance: 1 ============ running script `air_scat.q' ============ > with(airpc, { + pc <- cbind(Comp.1, Comp.2) + pc1 <- pc[Period == 1, ] + pc2 <- pc[Period == 2, ] + pc3 <- pc[Period == 3, ] + x .... [TRUNCATED] ============ running script `bin_use.q' ============ > cat("Examples of use of function binning()\n") Examples of use of function binning() > x <- rnorm(1000) > xb <- binning(x) > h <- hnorm(x) > sm.density(xb$x, h = h, weights = xb$x.freq, ylim = c(0, + 0.5/sqrt(var(x)))) > pause() > x <- cbind(x, x + rnorm(1000)) > xb <- binning(x) > h <- hnorm(x) > par(mfrow = c(1, 2)) > sm.density(xb$x, h = h, weights = xb$x.freq) > sm.density(xb$x, h = h, weights = xb$x.freq, display = "slice") > par(mfrow = c(1, 1)) > pause() > with(airpc, { + pc3 <- cbind(Comp.1, Comp.2)[Period == 3, ] + pc.bin <- binning(pc3) + par(mfrow = c(1, 2)) + sm.density(pc.bin$x, h .... [TRUNCATED] this time original data rather than grid data are plotted ============ running script `birth1.q' ============ > with(birth, { + Low1 <- Low[Smoke == "S"] + Lwt1 <- Lwt[Smoke == "S"] + Lj <- jitter(Low1, amount = 0) + plot(Lwt1, Lj, type = "n", .... [TRUNCATED] ============ running script `birth2.q' ============ > with(birth, { + Low0 <- Low[Smoke == "N"] + Lwt0 <- Lwt[Smoke == "N"] + Low1 <- Low[Smoke == "S"] + Lwt1 <- Lwt[Smoke == "S"] + .... [TRUNCATED] ============ running script `bissell1.q' ============ > with(bissell, { + plot(Length, Flaws, xlim = c(0, 1000), pch = "o") + beta <- sum(Flaws)/sum(Length) + x <- seq(0, 1000, length = 50) + .... [TRUNCATED] ============ running script `bissell2.q' ============ > with(bissell, { + plot(Length, Flaws, xlim = c(0, 1000), pch = "o") + beta <- sum(Flaws)/sum(Length) + x <- seq(0, 1000, length = 50) + .... [TRUNCATED] ============ running script `citrate.q' ============ > with(citrate, { + Citrate <- as.matrix(citrate) + nSubj <- dim(Citrate)[1] + nTime <- dim(Citrate)[2] + Time <- (1:nTime) + plot .... [TRUNCATED] Autocovariances & autocorrelations: auto-cov auto-corr 0 360.623571 1.00000000 1 244.287143 0.67740204 2 204.040714 0.56579972 3 175.807857 0.48751072 4 151.130000 0.41907965 5 128.680714 0.35682835 6 120.196429 0.33330164 7 103.723571 0.28762283 8 91.565000 0.25390742 9 87.847857 0.24359988 10 53.901429 0.14946729 11 22.932143 0.06359025 12 13.760714 0.03815811 13 9.732143 0.02698698 Rice's criterion: h indept. depend. [1] 0.100000 6.005194 6.005194 [1] 0.200000 6.005156 6.005182 [1] 0.300000 5.965648 5.992517 [1] 0.400000 5.583011 5.878175 [1] 0.500000 4.855846 5.702201 [1] 0.600000 4.131101 5.579386 [1] 0.700000 3.535247 5.519406 [1] 0.800000 3.072755 5.506906 [1] 0.900000 2.735846 5.530976 [1] 1.000000 2.516341 5.582579 [1] 1.100000 2.400934 5.653475 [1] 1.200000 2.370399 5.736703 [1] 1.300000 2.402966 5.826924 [1] 1.400000 2.478570 5.920349 [1] 1.500000 2.581237 6.014418 [1] 1.600000 2.699336 6.107412 [1] 1.700000 2.824778 6.198149 [1] 1.800000 2.952046 6.285777 [1] 1.900000 3.077424 6.369671 [1] 2.000000 3.198465 6.449387 h: 0.8 ============ running script `edfgrad.q' ============ > with(aircraft, { + y <- log(Span[Period == 3]) + n <- length(y) + plot(sort(y), (1:n)/n, type = "S", xlab = "y", ylab = "Empirical distr ..." ... [TRUNCATED] ============ running script `follicle.q' ============ > with(follicle, { + sm.regression(Age, log(Count), h = 4, lty = 2) + model <- loess(log(Count) ~ Age) + lines(Age, model$fitted, col = 6) .... [TRUNCATED] ============ running script `geys3d.q' ============ > with(geys3d, { + par(mfrow = c(1, 2)) + plot(Waiting, Duration) + sm.density(geys3d) + par(mfrow = c(1, 1)) + }) Loading required package: misc3d ============ running script `geys_ts.q' ============ > d <- geyser$duration > cat("Data are: d=(duration of geyser eruption)\n") Data are: d=(duration of geyser eruption) > cat("Marginal density of d(t) first, followed by\n") Marginal density of d(t) first, followed by > cat("estimated density of (d(t-k),d(t)), for k=1,2\n") estimated density of (d(t-k),d(t)), for k=1,2 > a <- sm.ts.pdf(d, lags = c(1, 2)) ============ running script `lc_comp.q' ============ > with(lcancer, { + cases <- cbind(Easting/10000, Northing/10000)[Cancer == 1, + ] + controls <- cbind(Easting/10000, Northing/10000) .... [TRUNCATED] Observed value: 384.6738 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 p-value = 0.75 ============ running script `lc_dens.q' ============ > with(lcancer, { + cases <- cbind(Easting, Northing)[Cancer == 1, ]/10000 + controls <- cbind(Easting, Northing)[Cancer == 2, ]/10000 + x .... [TRUNCATED] ============ running script `lc_rr.q' ============ > with(lcancer, { + cases <- cbind(Easting, Northing)[Cancer == 1, ]/10000 + controls <- cbind(Easting, Northing)[Cancer == 2, ]/10000 + x .... [TRUNCATED] ============ running script `lynx.q' ============ > ts.plot(lynx) > title("Canadian lynx trapping (1821-1934)") > pause() > cat("Data are now log-transformed\n") Data are now log-transformed > log.lynx <- log(lynx) > sm.ts.pdf(log.lynx, lags = 4:5) > pause() > sm.autoregression(log.lynx, maxlag = 5, se = TRUE) > pause() > sm.autoregression(log.lynx, lags = cbind(4, 5)) ============ running script `mackgam.q' ============ > library(gam) Loading required package: splines Loading required package: foreach Loaded gam 1.15 > model1 <- gam(log(Density) ~ lo(log(mack.depth)) + + lo(Temperature) + lo(mack.lat, mack.long), data = mackerel) > print(model1) Call: gam(formula = log(Density) ~ lo(log(mack.depth)) + lo(Temperature) + lo(mack.lat, mack.long), data = mackerel) Degrees of Freedom: 278 total; 262.7774 Residual Residual Deviance: 260.3544 > print(gam(log(Density) ~ lo(Temperature) + lo(mack.lat, + mack.long), data = mackerel)) Call: gam(formula = log(Density) ~ lo(Temperature) + lo(mack.lat, mack.long), data = mackerel) Degrees of Freedom: 278 total; 266.4857 Residual Residual Deviance: 359.4476 > print(gam(log(Density) ~ lo(log(mack.depth)) + lo(mack.lat, + mack.long), data = mackerel)) Call: gam(formula = log(Density) ~ lo(log(mack.depth)) + lo(mack.lat, mack.long), data = mackerel) Degrees of Freedom: 278 total; 266.0766 Residual Residual Deviance: 271.311 > print(gam(log(Density) ~ lo(log(mack.depth)) + lo(Temperature), + data = mackerel)) Call: gam(formula = log(Density) ~ lo(log(mack.depth)) + lo(Temperature), data = mackerel) Degrees of Freedom: 278 total; 270.9924 Residual Residual Deviance: 335.5316 > par(mfrow = c(2, 2)) > plot.gam(model1, se = TRUE) Error in eval(expr, envir, enclos) : could not find function "plot.gam" Calls: source -> withVisible -> eval -> eval Execution halted * checking PDF version of manual ... OK * DONE Status: 2 ERRORs, 2 NOTEs