CRAN Package Check Results for Package GSIF

Last updated on 2016-04-30 21:47:01.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-gcc 0.4-7 8.26 99.65 107.91 ERROR
r-devel-linux-x86_64-fedora-clang 0.4-7 243.75 OK
r-devel-linux-x86_64-fedora-gcc 0.4-7 214.73 ERROR
r-devel-osx-x86_64-clang 0.4-7 248.55 OK
r-devel-windows-ix86+x86_64 0.4-7 21.00 199.00 220.00 OK
r-patched-linux-x86_64 0.4-7 7.60 98.81 106.40 ERROR
r-patched-solaris-sparc 0.4-7 1307.50 OK
r-patched-solaris-x86 0.4-7 264.70 ERROR
r-release-linux-x86_64 0.4-7 7.97 121.17 129.15 OK
r-release-osx-x86_64-mavericks 0.4-7 OK
r-release-windows-ix86+x86_64 0.4-7 35.00 180.00 215.00 ERROR
r-oldrel-windows-ix86+x86_64 0.4-7 38.00 352.00 390.00 ERROR

Check Details

Version: 0.4-7
Check: examples
Result: ERROR
    Running examples in ‘GSIF-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: fit.gstatModel-methods
    > ### Title: Methods to fit a regression-kriging model
    > ### Aliases: fit.gstatModel-method fit.gstatModel
    > ### fit.gstatModel,SpatialPointsDataFrame,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,list-method
    > ### fit.gstatModel,geosamples,list,list-method
    > ### Keywords: methods
    >
    > ### ** Examples
    >
    > # 2D model:
    > library(sp)
    > library(boot)
    > library(aqp)
    This is aqp 1.9.3
    > library(plyr)
    > library(rpart)
    > library(splines)
    > library(gstat)
    > library(randomForest)
    randomForest 4.6-12
    Type rfNews() to see new features/changes/bug fixes.
    > library(quantregForest)
    > library(plotKML)
    plotKML version 0.5-5 (2015-12-24)
    URL: http://plotkml.r-forge.r-project.org/
    >
    > ## load the Meuse data set:
    > demo(meuse, echo=FALSE)
    >
    > ## simple model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + family = gaussian(log))
    Fitting a linear model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## it was succesful!
    >
    > ## fit a GLM with a gaussian log-link:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + fit.family = gaussian(log))
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    
    Call:
    glm(formula = om ~ dist + ffreq, family = fit.family, data = rmatrix)
    
    Deviance Residuals:
     Min 1Q Median 3Q Max
    -7.5173 -1.9150 0.2131 1.7337 8.0391
    
    Coefficients:
     Estimate Std. Error t value Pr(>|t|)
    (Intercept) 2.42319 0.03958 61.215 < 2e-16 ***
    dist -1.73313 0.20995 -8.255 7.49e-14 ***
    ffreq2 -0.13713 0.06780 -2.023 0.0449 *
    ffreq3 -0.11240 0.09236 -1.217 0.2255
    ---
    Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
    
    (Dispersion parameter for gaussian family taken to be 6.988786)
    
     Null deviance: 1791.4 on 152 degrees of freedom
    Residual deviance: 1041.3 on 149 degrees of freedom
     (2 observations deleted due to missingness)
    AIC: 737.62
    
    Number of Fisher Scoring iterations: 7
    
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
     82% done
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    >
    > ## fit a regression-tree:
    > omm <- fit.gstatModel(meuse, log1p(om)~dist+ffreq, meuse.grid,
    + method="rpart")
    Fitting a regression tree model...
    Estimated Complexity Parameter (for prunning): 0.0371
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    Call:
    rpart::rpart(formula = formulaString, data = rmatrix.s)
     n=153 (2 observations deleted due to missingness)
    
     CP nsplit rel error xerror xstd
    1 0.40702329 0 1.0000000 1.0086389 0.13328844
    2 0.03709721 1 0.5929767 0.6074234 0.09312747
    
    Variable importance
    dist
     100
    
    Node number 1: 153 observations, complexity param=0.4070233
     mean=2.05616, MSE=0.1702532
     left son=2 (116 obs) right son=3 (37 obs)
     Primary splits:
     dist < 0.07302095 to the right, improve=0.40702330, (0 missing)
     ffreq splits as RLL, improve=0.07840131, (0 missing)
    
    Node number 2: 116 observations
     mean=1.907488, MSE=0.1125991
    
    Node number 3: 37 observations
     mean=2.522267, MSE=0.06445407
    
    > ## plot a regression-tree:
    > plot(omm@regModel, uniform=TRUE)
    > text(omm@regModel, use.n=TRUE, all=TRUE, cex=.8)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 3.684982 0.000 0.0 0 0 0 1 1
    2 Exp 9.090300 498.053 0.5 0 0 0 1 1
    >
    > ## fit a randomForest model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="randomForest")
    Fitting a randomForest model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > ## plot to see how good is the fit:
    > plot(omm)
    dev.new(): using pdf(file="Rplots2.pdf")
    > ## plot the estimated error for number of bootstrapped trees:
    > plot(omm@regModel)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 2.791737 0.000 0.0 0 0 0 1 1
    2 Exp 8.501099 6075.288 0.5 0 0 0 1 1
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## Compare with "quantregForest" package:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="quantregForest")
    Fitting a randomForest model...
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Error: length(psill) == 1 is not TRUE
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.4-7
Check: examples
Result: ERROR
    Running examples in ‘GSIF-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: fit.gstatModel-methods
    > ### Title: Methods to fit a regression-kriging model
    > ### Aliases: fit.gstatModel-method fit.gstatModel
    > ### fit.gstatModel,SpatialPointsDataFrame,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,list-method
    > ### fit.gstatModel,geosamples,list,list-method
    > ### Keywords: methods
    >
    > ### ** Examples
    >
    > # 2D model:
    > library(sp)
    > library(boot)
    > library(aqp)
    This is aqp 1.9.3
    > library(plyr)
    > library(rpart)
    > library(splines)
    > library(gstat)
    > library(randomForest)
    randomForest 4.6-12
    Type rfNews() to see new features/changes/bug fixes.
    > library(quantregForest)
    > library(plotKML)
    plotKML version 0.5-5 (2015-12-24)
    URL: http://plotkml.r-forge.r-project.org/
    >
    > ## load the Meuse data set:
    > demo(meuse, echo=FALSE)
    >
    > ## simple model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + family = gaussian(log))
    Fitting a linear model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## it was succesful!
    >
    > ## fit a GLM with a gaussian log-link:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + fit.family = gaussian(log))
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    
    Call:
    glm(formula = om ~ dist + ffreq, family = fit.family, data = rmatrix)
    
    Deviance Residuals:
     Min 1Q Median 3Q Max
    -7.5173 -1.9150 0.2131 1.7337 8.0391
    
    Coefficients:
     Estimate Std. Error t value Pr(>|t|)
    (Intercept) 2.42319 0.03958 61.215 < 2e-16 ***
    dist -1.73313 0.20995 -8.255 7.49e-14 ***
    ffreq2 -0.13713 0.06780 -2.023 0.0449 *
    ffreq3 -0.11240 0.09236 -1.217 0.2255
    ---
    Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
    
    (Dispersion parameter for gaussian family taken to be 6.988786)
    
     Null deviance: 1791.4 on 152 degrees of freedom
    Residual deviance: 1041.3 on 149 degrees of freedom
     (2 observations deleted due to missingness)
    AIC: 737.62
    
    Number of Fisher Scoring iterations: 7
    
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    >
    > ## fit a regression-tree:
    > omm <- fit.gstatModel(meuse, log1p(om)~dist+ffreq, meuse.grid,
    + method="rpart")
    Fitting a regression tree model...
    Estimated Complexity Parameter (for prunning): 0.0371
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    Call:
    rpart::rpart(formula = formulaString, data = rmatrix.s)
     n=153 (2 observations deleted due to missingness)
    
     CP nsplit rel error xerror xstd
    1 0.40702329 0 1.0000000 1.0086389 0.13328844
    2 0.03709721 1 0.5929767 0.6074234 0.09312747
    
    Variable importance
    dist
     100
    
    Node number 1: 153 observations, complexity param=0.4070233
     mean=2.05616, MSE=0.1702532
     left son=2 (116 obs) right son=3 (37 obs)
     Primary splits:
     dist < 0.07302095 to the right, improve=0.40702330, (0 missing)
     ffreq splits as RLL, improve=0.07840131, (0 missing)
    
    Node number 2: 116 observations
     mean=1.907488, MSE=0.1125991
    
    Node number 3: 37 observations
     mean=2.522267, MSE=0.06445407
    
    > ## plot a regression-tree:
    > plot(omm@regModel, uniform=TRUE)
    > text(omm@regModel, use.n=TRUE, all=TRUE, cex=.8)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 3.684982 0.000 0.0 0 0 0 1 1
    2 Exp 9.090300 498.053 0.5 0 0 0 1 1
    >
    > ## fit a randomForest model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="randomForest")
    Fitting a randomForest model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > ## plot to see how good is the fit:
    > plot(omm)
    dev.new(): using pdf(file="Rplots2.pdf")
    > ## plot the estimated error for number of bootstrapped trees:
    > plot(omm@regModel)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 2.791737 0.000 0.0 0 0 0 1 1
    2 Exp 8.501099 6075.288 0.5 0 0 0 1 1
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
     64% done
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## Compare with "quantregForest" package:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="quantregForest")
    Fitting a randomForest model...
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Error: length(psill) == 1 is not TRUE
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.4-7
Check: examples
Result: ERROR
    Running examples in ‘GSIF-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: fit.gstatModel-methods
    > ### Title: Methods to fit a regression-kriging model
    > ### Aliases: fit.gstatModel-method fit.gstatModel
    > ### fit.gstatModel,SpatialPointsDataFrame,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,list-method
    > ### fit.gstatModel,geosamples,list,list-method
    > ### Keywords: methods
    >
    > ### ** Examples
    >
    > # 2D model:
    > library(sp)
    > library(boot)
    > library(aqp)
    This is aqp 1.9.3
    > library(plyr)
    > library(rpart)
    > library(splines)
    > library(gstat)
    > library(randomForest)
    randomForest 4.6-12
    Type rfNews() to see new features/changes/bug fixes.
    > library(quantregForest)
    > library(plotKML)
    plotKML version 0.5-5 (2015-12-24)
    URL: http://plotkml.r-forge.r-project.org/
    >
    > ## load the Meuse data set:
    > demo(meuse, echo=FALSE)
    >
    > ## simple model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + family = gaussian(log))
    Fitting a linear model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## it was succesful!
    >
    > ## fit a GLM with a gaussian log-link:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + fit.family = gaussian(log))
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    
    Call:
    glm(formula = om ~ dist + ffreq, family = fit.family, data = rmatrix)
    
    Deviance Residuals:
     Min 1Q Median 3Q Max
    -7.5173 -1.9150 0.2131 1.7337 8.0391
    
    Coefficients:
     Estimate Std. Error t value Pr(>|t|)
    (Intercept) 2.42319 0.03958 61.215 < 2e-16 ***
    dist -1.73313 0.20995 -8.255 7.49e-14 ***
    ffreq2 -0.13713 0.06780 -2.023 0.0449 *
    ffreq3 -0.11240 0.09236 -1.217 0.2255
    ---
    Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
    
    (Dispersion parameter for gaussian family taken to be 6.988786)
    
     Null deviance: 1791.4 on 152 degrees of freedom
    Residual deviance: 1041.3 on 149 degrees of freedom
     (2 observations deleted due to missingness)
    AIC: 737.62
    
    Number of Fisher Scoring iterations: 7
    
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
     49% done
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    >
    > ## fit a regression-tree:
    > omm <- fit.gstatModel(meuse, log1p(om)~dist+ffreq, meuse.grid,
    + method="rpart")
    Fitting a regression tree model...
    Estimated Complexity Parameter (for prunning): 0.0371
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    Call:
    rpart::rpart(formula = formulaString, data = rmatrix.s)
     n=153 (2 observations deleted due to missingness)
    
     CP nsplit rel error xerror xstd
    1 0.40702329 0 1.0000000 1.0086389 0.13328844
    2 0.03709721 1 0.5929767 0.6074234 0.09312747
    
    Variable importance
    dist
     100
    
    Node number 1: 153 observations, complexity param=0.4070233
     mean=2.05616, MSE=0.1702532
     left son=2 (116 obs) right son=3 (37 obs)
     Primary splits:
     dist < 0.07302095 to the right, improve=0.40702330, (0 missing)
     ffreq splits as RLL, improve=0.07840131, (0 missing)
    
    Node number 2: 116 observations
     mean=1.907488, MSE=0.1125991
    
    Node number 3: 37 observations
     mean=2.522267, MSE=0.06445407
    
    > ## plot a regression-tree:
    > plot(omm@regModel, uniform=TRUE)
    > text(omm@regModel, use.n=TRUE, all=TRUE, cex=.8)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 3.684982 0.000 0.0 0 0 0 1 1
    2 Exp 9.090300 498.053 0.5 0 0 0 1 1
    >
    > ## fit a randomForest model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="randomForest")
    Fitting a randomForest model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > ## plot to see how good is the fit:
    > plot(omm)
    dev.new(): using pdf(file="Rplots2.pdf")
    > ## plot the estimated error for number of bootstrapped trees:
    > plot(omm@regModel)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 2.791737 0.000 0.0 0 0 0 1 1
    2 Exp 8.501099 6075.288 0.5 0 0 0 1 1
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## Compare with "quantregForest" package:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="quantregForest")
    Fitting a randomForest model...
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Error: length(psill) == 1 is not TRUE
    Execution halted
Flavor: r-patched-linux-x86_64

Version: 0.4-7
Check: examples
Result: ERROR
    Running examples in ‘GSIF-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: fit.gstatModel-methods
    > ### Title: Methods to fit a regression-kriging model
    > ### Aliases: fit.gstatModel-method fit.gstatModel
    > ### fit.gstatModel,SpatialPointsDataFrame,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,list-method
    > ### fit.gstatModel,geosamples,list,list-method
    > ### Keywords: methods
    >
    > ### ** Examples
    >
    > # 2D model:
    > library(sp)
    > library(boot)
    > library(aqp)
    This is aqp 1.9.3
    > library(plyr)
    > library(rpart)
    > library(splines)
    > library(gstat)
    > library(randomForest)
    randomForest 4.6-12
    Type rfNews() to see new features/changes/bug fixes.
    > library(quantregForest)
    > library(plotKML)
    plotKML version 0.5-5 (2015-12-24)
    URL: http://plotkml.r-forge.r-project.org/
    >
    > ## load the Meuse data set:
    > demo(meuse, echo=FALSE)
    >
    > ## simple model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + family = gaussian(log))
    Fitting a linear model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
     78% done
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## it was succesful!
    >
    > ## fit a GLM with a gaussian log-link:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + fit.family = gaussian(log))
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    
    Call:
    glm(formula = om ~ dist + ffreq, family = fit.family, data = rmatrix)
    
    Deviance Residuals:
     Min 1Q Median 3Q Max
    -7.5173 -1.9150 0.2131 1.7337 8.0391
    
    Coefficients:
     Estimate Std. Error t value Pr(>|t|)
    (Intercept) 2.42319 0.03958 61.215 < 2e-16 ***
    dist -1.73313 0.20995 -8.255 7.49e-14 ***
    ffreq2 -0.13713 0.06780 -2.023 0.0449 *
    ffreq3 -0.11240 0.09236 -1.217 0.2255
    ---
    Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
    
    (Dispersion parameter for gaussian family taken to be 6.988786)
    
     Null deviance: 1791.4 on 152 degrees of freedom
    Residual deviance: 1041.3 on 149 degrees of freedom
     (2 observations deleted due to missingness)
    AIC: 737.62
    
    Number of Fisher Scoring iterations: 7
    
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
     54% done
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    >
    > ## fit a regression-tree:
    > omm <- fit.gstatModel(meuse, log1p(om)~dist+ffreq, meuse.grid,
    + method="rpart")
    Fitting a regression tree model...
    Estimated Complexity Parameter (for prunning): 0.0371
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    Call:
    rpart::rpart(formula = formulaString, data = rmatrix.s)
     n=153 (2 observations deleted due to missingness)
    
     CP nsplit rel error xerror xstd
    1 0.40702329 0 1.0000000 1.0086389 0.13328844
    2 0.03709721 1 0.5929767 0.6074234 0.09312747
    
    Variable importance
    dist
     100
    
    Node number 1: 153 observations, complexity param=0.4070233
     mean=2.05616, MSE=0.1702532
     left son=2 (116 obs) right son=3 (37 obs)
     Primary splits:
     dist < 0.07302095 to the right, improve=0.40702330, (0 missing)
     ffreq splits as RLL, improve=0.07840131, (0 missing)
    
    Node number 2: 116 observations
     mean=1.907488, MSE=0.1125991
    
    Node number 3: 37 observations
     mean=2.522267, MSE=0.06445407
    
    > ## plot a regression-tree:
    > plot(omm@regModel, uniform=TRUE)
    > text(omm@regModel, use.n=TRUE, all=TRUE, cex=.8)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 3.684982 0.000 0.0 0 0 0 1 1
    2 Exp 9.090300 498.053 0.5 0 0 0 1 1
    >
    > ## fit a randomForest model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="randomForest")
    Fitting a randomForest model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > ## plot to see how good is the fit:
    > plot(omm)
    dev.new(): using pdf(file="Rplots2.pdf")
    > ## plot the estimated error for number of bootstrapped trees:
    > plot(omm@regModel)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 2.791737 0.000 0.0 0 0 0 1 1
    2 Exp 8.501099 6075.288 0.5 0 0 0 1 1
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## Compare with "quantregForest" package:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="quantregForest")
    Fitting a randomForest model...
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Error: length(psill) == 1 is not TRUE
    Execution halted
Flavor: r-patched-solaris-x86

Version: 0.4-7
Check: examples
Result: ERROR
    Running examples in 'GSIF-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: fit.gstatModel-methods
    > ### Title: Methods to fit a regression-kriging model
    > ### Aliases: fit.gstatModel-method fit.gstatModel
    > ### fit.gstatModel,SpatialPointsDataFrame,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,list-method
    > ### fit.gstatModel,geosamples,list,list-method
    > ### Keywords: methods
    >
    > ### ** Examples
    >
    > # 2D model:
    > library(sp)
    > library(boot)
    > library(aqp)
    This is aqp 1.9.3
    > library(plyr)
    > library(rpart)
    > library(splines)
    > library(gstat)
    > library(randomForest)
    randomForest 4.6-12
    Type rfNews() to see new features/changes/bug fixes.
    > library(quantregForest)
    > library(plotKML)
    plotKML version 0.5-5 (2015-12-24)
    URL: http://plotkml.r-forge.r-project.org/
    >
    > ## load the Meuse data set:
    > demo(meuse, echo=FALSE)
    >
    > ## simple model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + family = gaussian(log))
    Fitting a linear model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## it was succesful!
    >
    > ## fit a GLM with a gaussian log-link:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + fit.family = gaussian(log))
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    
    Call:
    glm(formula = om ~ dist + ffreq, family = fit.family, data = rmatrix)
    
    Deviance Residuals:
     Min 1Q Median 3Q Max
    -7.5173 -1.9150 0.2131 1.7337 8.0391
    
    Coefficients:
     Estimate Std. Error t value Pr(>|t|)
    (Intercept) 2.42319 0.03958 61.215 < 2e-16 ***
    dist -1.73313 0.20995 -8.255 7.49e-14 ***
    ffreq2 -0.13713 0.06780 -2.023 0.0449 *
    ffreq3 -0.11240 0.09236 -1.217 0.2255
    ---
    Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
    
    (Dispersion parameter for gaussian family taken to be 6.988786)
    
     Null deviance: 1791.4 on 152 degrees of freedom
    Residual deviance: 1041.3 on 149 degrees of freedom
     (2 observations deleted due to missingness)
    AIC: 737.62
    
    Number of Fisher Scoring iterations: 7
    
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    >
    > ## fit a regression-tree:
    > omm <- fit.gstatModel(meuse, log1p(om)~dist+ffreq, meuse.grid,
    + method="rpart")
    Fitting a regression tree model...
    Estimated Complexity Parameter (for prunning): 0.0371
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    Call:
    rpart::rpart(formula = formulaString, data = rmatrix.s)
     n=153 (2 observations deleted due to missingness)
    
     CP nsplit rel error xerror xstd
    1 0.40702329 0 1.0000000 1.0086389 0.13328844
    2 0.03709721 1 0.5929767 0.6074234 0.09312747
    
    Variable importance
    dist
     100
    
    Node number 1: 153 observations, complexity param=0.4070233
     mean=2.05616, MSE=0.1702532
     left son=2 (116 obs) right son=3 (37 obs)
     Primary splits:
     dist < 0.07302095 to the right, improve=0.40702330, (0 missing)
     ffreq splits as RLL, improve=0.07840131, (0 missing)
    
    Node number 2: 116 observations
     mean=1.907488, MSE=0.1125991
    
    Node number 3: 37 observations
     mean=2.522267, MSE=0.06445407
    
    > ## plot a regression-tree:
    > plot(omm@regModel, uniform=TRUE)
    > text(omm@regModel, use.n=TRUE, all=TRUE, cex=.8)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 3.684982 0.000 0.0 0 0 0 1 1
    2 Exp 9.090300 498.053 0.5 0 0 0 1 1
    >
    > ## fit a randomForest model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="randomForest")
    Fitting a randomForest model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > ## plot to see how good is the fit:
    > plot(omm)
    dev.new(): using pdf(file="Rplots2.pdf")
    > ## plot the estimated error for number of bootstrapped trees:
    > plot(omm@regModel)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 2.791737 0.000 0.0 0 0 0 1 1
    2 Exp 8.501099 6075.288 0.5 0 0 0 1 1
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
     21% done
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## Compare with "quantregForest" package:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="quantregForest")
    Fitting a randomForest model...
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Error: length(psill) == 1 is not TRUE
    Execution halted
Flavor: r-release-windows-ix86+x86_64

Version: 0.4-7
Check: examples
Result: ERROR
    Running examples in 'GSIF-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: fit.gstatModel-methods
    > ### Title: Methods to fit a regression-kriging model
    > ### Aliases: fit.gstatModel-method fit.gstatModel
    > ### fit.gstatModel,SpatialPointsDataFrame,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,SpatialPixelsDataFrame-method
    > ### fit.gstatModel,geosamples,formula,list-method
    > ### fit.gstatModel,geosamples,list,list-method
    > ### Keywords: methods
    >
    > ### ** Examples
    >
    > # 2D model:
    > library(sp)
    > library(boot)
    > library(aqp)
    This is aqp 1.9.3
    > library(plyr)
    > library(rpart)
    > library(splines)
    > library(gstat)
    > library(randomForest)
    randomForest 4.6-12
    Type rfNews() to see new features/changes/bug fixes.
    > library(quantregForest)
    > library(plotKML)
    plotKML version 0.5-5 (2015-12-24)
    URL: http://plotkml.r-forge.r-project.org/
    >
    > ## load the Meuse data set:
    > demo(meuse, echo=FALSE)
    >
    > ## simple model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + family = gaussian(log))
    Fitting a linear model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## it was succesful!
    >
    > ## fit a GLM with a gaussian log-link:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + fit.family = gaussian(log))
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    
    Call:
    glm(formula = om ~ dist + ffreq, family = fit.family, data = rmatrix)
    
    Deviance Residuals:
     Min 1Q Median 3Q Max
    -7.5173 -1.9150 0.2131 1.7337 8.0391
    
    Coefficients:
     Estimate Std. Error t value Pr(>|t|)
    (Intercept) 2.42319 0.03958 61.215 < 2e-16 ***
    dist -1.73313 0.20995 -8.255 7.49e-14 ***
    ffreq2 -0.13713 0.06780 -2.023 0.0449 *
    ffreq3 -0.11240 0.09236 -1.217 0.2255
    ---
    Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
    
    (Dispersion parameter for gaussian family taken to be 6.988786)
    
     Null deviance: 1791.4 on 152 degrees of freedom
    Residual deviance: 1041.3 on 149 degrees of freedom
     (2 observations deleted due to missingness)
    AIC: 737.62
    
    Number of Fisher Scoring iterations: 7
    
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    >
    > ## fit a regression-tree:
    > omm <- fit.gstatModel(meuse, log1p(om)~dist+ffreq, meuse.grid,
    + method="rpart")
    Fitting a regression tree model...
    Estimated Complexity Parameter (for prunning): 0.0371
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > summary(omm@regModel)
    Call:
    rpart::rpart(formula = formulaString, data = rmatrix.s)
     n=153 (2 observations deleted due to missingness)
    
     CP nsplit rel error xerror xstd
    1 0.40702329 0 1.0000000 1.0086389 0.13328844
    2 0.03709721 1 0.5929767 0.6074234 0.09312747
    
    Variable importance
    dist
     100
    
    Node number 1: 153 observations, complexity param=0.4070233
     mean=2.05616, MSE=0.1702532
     left son=2 (116 obs) right son=3 (37 obs)
     Primary splits:
     dist < 0.07302095 to the right, improve=0.40702330, (0 missing)
     ffreq splits as RLL, improve=0.07840131, (0 missing)
    
    Node number 2: 116 observations
     mean=1.907488, MSE=0.1125991
    
    Node number 3: 37 observations
     mean=2.522267, MSE=0.06445407
    
    > ## plot a regression-tree:
    > plot(omm@regModel, uniform=TRUE)
    > text(omm@regModel, use.n=TRUE, all=TRUE, cex=.8)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 3.684982 0.000 0.0 0 0 0 1 1
    2 Exp 9.090300 498.053 0.5 0 0 0 1 1
    >
    > ## fit a randomForest model:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="randomForest")
    Fitting a randomForest model...
    Fitting a 2D variogram...
    Saving an object of class 'gstatModel'...
    > ## plot to see how good is the fit:
    > plot(omm)
    dev.new(): using pdf(file="Rplots2.pdf")
    > ## plot the estimated error for number of bootstrapped trees:
    > plot(omm@regModel)
    > omm@vgmModel
     model psill range kappa ang1 ang2 ang3 anis1 anis2
    1 Nug 2.791737 0.000 0.0 0 0 0 1 1
    2 Exp 8.501099 6075.288 0.5 0 0 0 1 1
    > om.rk <- predict(omm, meuse.grid)
    Subsetting observations to fit the prediction domain in 2D...
    Generating predictions using the trend model (RK method)...
    [using ordinary kriging]
    
     47% done
    100% done
    Running 5-fold cross validation using 'krige.cv'...
    Creating an object of class "SpatialPredictions"
    > plot(om.rk)
    > ## Compare with "quantregForest" package:
    > omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
    + method="quantregForest")
    Fitting a randomForest model...
    Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
    Fitting a 2D variogram...
    Error: length(psill) == 1 is not TRUE
    Execution halted
Flavor: r-oldrel-windows-ix86+x86_64