CRAN Package Check Results for Package sm

Last updated on 2018-04-24 17:49:33 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2.2-5.4 15.77 96.64 112.41 ERROR
r-devel-linux-x86_64-debian-gcc 2.2-5.4 12.16 72.94 85.10 ERROR
r-devel-linux-x86_64-fedora-clang 2.2-5.4 136.66 ERROR
r-devel-linux-x86_64-fedora-gcc 2.2-5.4 133.10 ERROR
r-devel-windows-ix86+x86_64 2.2-5.4 38.00 142.00 180.00 ERROR
r-patched-linux-x86_64 2.2-5.4 13.29 95.09 108.38 ERROR
r-patched-solaris-x86 2.2-5.4 191.60 ERROR
r-release-linux-x86_64 2.2-5.4 13.69 93.47 107.16 ERROR
r-release-windows-ix86+x86_64 2.2-5.4 38.00 142.00 180.00 ERROR
r-release-osx-x86_64 2.2-5.4 ERROR
r-oldrel-windows-ix86+x86_64 2.2-5.4 21.00 166.00 187.00 ERROR
r-oldrel-osx-x86_64 2.2-5.4 NOTE

Check Details

Version: 2.2-5.4
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Note: break used in wrong context: no loop is visible
    See ‘/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/sm.Rcheck/00install.out’ for details.
    Information on the location(s) of code generating the ‘Note’s can be
    obtained by re-running with environment variable R_KEEP_PKG_SOURCE set
    to ‘yes’.
Flavor: r-devel-linux-x86_64-debian-clang

Version: 2.2-5.4
Check: dependencies in R code
Result: 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.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-ix86+x86_64, r-patched-linux-x86_64, r-patched-solaris-x86, r-release-linux-x86_64, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64

Version: 2.2-5.4
Check: R code for possible problems
Result: 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 : <anonymous>: 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.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-ix86+x86_64, r-patched-linux-x86_64, r-patched-solaris-x86, r-release-linux-x86_64, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64

Version: 2.2-5.4
Check: compiled code
Result: NOTE
    File ‘sm/libs/sm.so’:
     Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’
    
    It is good practice to register native routines and to disable symbol
    search.
    
    See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-linux-x86_64, r-release-linux-x86_64

Version: 2.2-5.4
Check: tests
Result: ERROR
     Running ‘test_scripts.R’ [17s/24s]
    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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 2.2-5.4
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Note: break used in wrong context: no loop is visible
    See ‘/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/sm.Rcheck/00install.out’ for details.
    Information on the location(s) of code generating the ‘Note’s can be
    obtained by re-running with environment variable R_KEEP_PKG_SOURCE set
    to ‘yes’.
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 2.2-5.4
Check: tests
Result: ERROR
     Running ‘test_scripts.R’ [12s/19s]
    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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 2.2-5.4
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Note: break used in wrong context: no loop is visible
    See ‘/data/gannet/ripley/R/packages/tests-clang/sm.Rcheck/00install.out’ for details.
    Information on the location(s) of code generating the ‘Note’s can be
    obtained by re-running with environment variable R_KEEP_PKG_SOURCE set
    to ‘yes’.
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 2.2-5.4
Check: tests
Result: ERROR
     Running ‘test_scripts.R’ [20s/25s]
    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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 2.2-5.4
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Note: break used in wrong context: no loop is visible
    See ‘/data/gannet/ripley/R/packages/tests-devel/sm.Rcheck/00install.out’ for details.
    Information on the location(s) of code generating the ‘Note’s can be
    obtained by re-running with environment variable R_KEEP_PKG_SOURCE set
    to ‘yes’.
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 2.2-5.4
Check: tests
Result: ERROR
     Running ‘test_scripts.R’ [20s/24s]
    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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 2.2-5.4
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Note: break used in wrong context: no loop is visible
    See 'd:/Rcompile/CRANpkg/local/3.5/sm.Rcheck/00install.out' for details.
    Information on the location(s) of code generating the 'Note's can be
    obtained by re-running with environment variable R_KEEP_PKG_SOURCE set
    to 'yes'.
Flavors: r-devel-windows-ix86+x86_64, r-release-windows-ix86+x86_64

Version: 2.2-5.4
Check: running tests for arch ‘i386’
Result: ERROR
     Running 'test_scripts.R' [16s]
    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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     Execution halted
Flavors: r-devel-windows-ix86+x86_64, r-release-windows-ix86+x86_64

Version: 2.2-5.4
Check: running tests for arch ‘x64’
Result: ERROR
     Running 'test_scripts.R' [17s]
    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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     Execution halted
Flavors: r-devel-windows-ix86+x86_64, r-release-windows-ix86+x86_64

Version: 2.2-5.4
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Note: break used in wrong context: no loop is visible
    See ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/sm.Rcheck/00install.out’ for details.
    Information on the location(s) of code generating the ‘Note’s can be
    obtained by re-running with environment variable R_KEEP_PKG_SOURCE set
    to ‘yes’.
Flavor: r-patched-linux-x86_64

Version: 2.2-5.4
Check: tests
Result: ERROR
     Running ‘test_scripts.R’ [16s/23s]
    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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     Execution halted
Flavors: r-patched-linux-x86_64, r-release-linux-x86_64

Version: 2.2-5.4
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Note: break used in wrong context: no loop is visible
    See ‘/home/ripley/R/packages/tests32/sm.Rcheck/00install.out’ for details.
    Information on the location(s) of code generating the ‘Note’s can be
    obtained by re-running with environment variable R_KEEP_PKG_SOURCE set
    to ‘yes’.
Flavor: r-patched-solaris-x86

Version: 2.2-5.4
Check: tests
Result: ERROR
     Running ‘test_scripts.R’ [39s/62s]
    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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     Execution halted
Flavor: r-patched-solaris-x86

Version: 2.2-5.4
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Note: break used in wrong context: no loop is visible
    See ‘/home/hornik/tmp/R.check/r-release-gcc/Work/PKGS/sm.Rcheck/00install.out’ for details.
    Information on the location(s) of code generating the ‘Note’s can be
    obtained by re-running with environment variable R_KEEP_PKG_SOURCE set
    to ‘yes’.
Flavor: r-release-linux-x86_64

Version: 2.2-5.4
Check: package dependencies
Result: NOTE
    Package suggested but not available for checking: ‘rpanel’
Flavor: r-release-osx-x86_64

Version: 2.2-5.4
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Note: break used in wrong context: no loop is visible
    See ‘/Volumes/SSD-Data/Builds/R-dev-web/QA/Simon/packages/el-capitan-x86_64/results/3.5/sm.Rcheck/00install.out’ for details.
    Information on the location(s) of code generating the ‘Note’s can be
    obtained by re-running with environment variable R_KEEP_PKG_SOURCE set
    to ‘yes’.
Flavor: r-release-osx-x86_64

Version: 2.2-5.4
Check: examples
Result: ERROR
    Running examples in ‘sm-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: sm.surface3d
    > ### Title: Adding a regression surface to an rgl plot.
    > ### Aliases: sm.surface3d
    > ### Keywords: nonparametric regression smooth
    >
    > ### ** Examples
    >
    > with(trawl, {
    + Zone93 <- (Year == 1 & Zone == 1)
    + Position <- cbind(Longitude - 143, Latitude)
    + model1 <- sm.regression(Position[Zone93,], Score1[Zone93],
    + h= c(0.1, 0.1), display = "rgl", xlab="Longitude - 143")
    + model2 <- sm.regression(Position[Zone93,], Score1[Zone93],
    + h= c(0.2, 0.2), display = "none")
    + sm.surface3d(model2$eval.points, model2$est, model1$scaling, col = "red")
    + })
    Loading required package: rgl
    Loading required package: rpanel
    Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
     there is no package called ‘rpanel’
    Error in sm.surface3d(model2$eval.points, model2$est, model1$scaling, :
     a scaling must be specified.
    Calls: with -> with.default -> eval -> eval -> sm.surface3d
    Execution halted
Flavor: r-release-osx-x86_64

Version: 2.2-5.4
Check: tests
Result: ERROR
     Running ‘test_scripts.R’ [18s/44s]
    Running the tests in ‘tests/test_scripts.R’ failed.
    Last 13 lines of output:
     + 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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     In addition: There were 50 or more warnings (use warnings() to see the first 50)
     Execution halted
Flavor: r-release-osx-x86_64

Version: 2.2-5.4
Check: running tests for arch ‘i386’
Result: ERROR
     Running 'test_scripts.R' [21s]
    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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 2.2-5.4
Check: running tests for arch ‘x64’
Result: ERROR
     Running 'test_scripts.R' [27s]
    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 plot.gam(model1, se = TRUE) : could not find function "plot.gam"
     Calls: source -> withVisible -> eval -> eval
     Execution halted
Flavor: r-oldrel-windows-ix86+x86_64