CRAN Package Check Results for Package spatstat.core

Last updated on 2021-11-29 20:50:57 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2.3-1 97.71 809.37 907.08 OK
r-devel-linux-x86_64-debian-gcc 2.3-2 91.39 596.27 687.66 OK
r-devel-linux-x86_64-fedora-clang 2.3-2 1101.10 NOTE
r-devel-linux-x86_64-fedora-gcc 2.3-2 1086.44 OK
r-devel-windows-x86_64-new-UL 2.3-1 240.00 253.00 493.00 NOTE --no-examples --no-tests --no-vignettes
r-devel-windows-x86_64-new-TK 2.3-2 OK
r-devel-windows-x86_64-old 2.3-2 163.00 266.00 429.00 NOTE --no-examples --no-tests --no-vignettes
r-patched-linux-x86_64 2.3-1 126.55 769.84 896.39 OK
r-patched-solaris-x86 2.3-2 1468.10 NOTE
r-release-linux-x86_64 2.3-2 96.56 792.69 889.25 OK
r-release-macos-arm64 2.3-2 NOTE
r-release-macos-x86_64 2.3-2 ERROR
r-release-windows-ix86+x86_64 2.3-2 190.00 336.00 526.00 NOTE --no-examples --no-tests --no-vignettes
r-oldrel-macos-x86_64 2.3-2 ERROR
r-oldrel-windows-ix86+x86_64 2.3-2 212.00 375.00 587.00 NOTE --no-examples --no-tests --no-vignettes

Check Details

Version: 2.3-2
Check: installed package size
Result: NOTE
     installed size is 7.9Mb
     sub-directories of 1Mb or more:
     R 3.2Mb
     help 3.2Mb
     libs 1.1Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-patched-solaris-x86, r-release-macos-arm64, r-release-macos-x86_64, r-oldrel-macos-x86_64

Version: 2.3-1
Flags: --no-examples --no-tests --no-vignettes
Check: installed package size
Result: NOTE
     installed size is 7.0Mb
     sub-directories of 1Mb or more:
     R 3.2Mb
     help 3.1Mb
Flavor: r-devel-windows-x86_64-new-UL

Version: 2.3-2
Flags: --no-examples --no-tests --no-vignettes
Check: installed package size
Result: NOTE
     installed size is 7.1Mb
     sub-directories of 1Mb or more:
     R 3.2Mb
     help 3.2Mb
Flavors: r-devel-windows-x86_64-old, r-release-windows-ix86+x86_64, r-oldrel-windows-ix86+x86_64

Version: 2.3-2
Check: examples
Result: ERROR
    Running examples in ‘spatstat.core-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: kppm
    > ### Title: Fit Cluster or Cox Point Process Model
    > ### Aliases: kppm kppm.formula kppm.ppp kppm.quad
    > ### Keywords: spatial models
    >
    > ### ** Examples
    >
    > online <- interactive()
    > if(!online) op <- spatstat.options(npixel=32, ndummy.min=16)
    >
    > # method for point patterns
    > kppm(redwood, ~1, "Thomas")
    Stationary cluster point process model
    Fitted to point pattern dataset ‘redwood’
    Fitted by minimum contrast
     Summary statistic: K-function
    
    Uniform intensity: 62
    
    Cluster model: Thomas process
    Fitted cluster parameters:
     kappa scale
    23.54856848 0.04705148
    Mean cluster size: 2.632856 points
    > # method for formulas
    > kppm(redwood ~ 1, "Thomas")
    Stationary cluster point process model
    Fitted to point pattern dataset ‘redwood’
    Fitted by minimum contrast
     Summary statistic: K-function
    
    Uniform intensity: 62
    
    Cluster model: Thomas process
    Fitted cluster parameters:
     kappa scale
    23.54856848 0.04705148
    Mean cluster size: 2.632856 points
    >
    > # different models for clustering
    > if(online) kppm(redwood ~ x, "MatClust")
    > kppm(redwood ~ x, "MatClust", statistic="pcf", statargs=list(stoyan=0.2))
    Warning: The value of the empirical function ‘pcf’ for r= 0 was Inf. Range of r values was reset to [0.00048828125, 0.25]
    Inhomogeneous cluster point process model
    Fitted to point pattern dataset ‘redwood’
    Fitted by minimum contrast
     Summary statistic: inhomogeneous pair correlation function
    
    Log intensity: ~x
    
    Fitted trend coefficients:
    (Intercept) x
     3.9773391 0.2921823
    
    Cluster model: Matern cluster process
    Fitted cluster parameters:
     kappa scale
    22.81422686 0.06600591
    Mean cluster size: [pixel image]
    > kppm(redwood ~ x, cluster="Cauchy", statistic="K")
    Inhomogeneous cluster point process model
    Fitted to point pattern dataset ‘redwood’
    Fitted by minimum contrast
     Summary statistic: inhomogeneous K-function
    
    Log intensity: ~x
    
    Fitted trend coefficients:
    (Intercept) x
     3.9773391 0.2921823
    
    Cluster model: Cauchy process
    Fitted cluster parameters:
     kappa scale
    12.20468015 0.04507445
    Mean cluster size: [pixel image]
    > kppm(redwood, cluster="VarGamma", nu = 0.5, statistic="pcf")
    Warning: The value of the empirical function ‘pcf’ for r= 0 was Inf. Range of r values was reset to [0.00048828125, 0.25]
    Stationary cluster point process model
    Fitted to point pattern dataset ‘redwood’
    Fitted by minimum contrast
     Summary statistic: pair correlation function
    
    Uniform intensity: 62
    
    Cluster model: Variance Gamma process (nu=0.5)
    Fitted cluster parameters:
     kappa scale
    24.38660373 0.02748183
    Mean cluster size: 2.542379 points
    >
    > # log-Gaussian Cox process (LGCP) models
    > kppm(redwood ~ 1, "LGCP", statistic="pcf")
    Warning: The value of the empirical function ‘pcf’ for r= 0 was Inf. Range of r values was reset to [0.00048828125, 0.25]
    Stationary Cox point process model
    Fitted to point pattern dataset ‘redwood’
    Fitted by minimum contrast
     Summary statistic: pair correlation function
    
    Uniform intensity: 62
    
    Cox model: log-Gaussian Cox process
     Covariance model: exponential
    Fitted covariance parameters:
     var scale
    1.29734060 0.07112718
    Fitted mean of log of random intensity: 3.478464
    > if(require("RandomFields")) {
    + # Random Fields package is needed for non-default choice of covariance model
    + kppm(redwood ~ x, "LGCP", statistic="pcf",
    + model="matern", nu=0.3,
    + control=list(maxit=10))
    + }
    Loading required package: RandomFields
    Loading required package: sp
    Loading required package: RandomFieldsUtils
    Consider immediate use of one of
     RFoptions(install.control=list(force=FALSE)) # beginners
     RFoptions(install.control=list(repos=NULL)) # advanced user
     RFoptions(install.control=NULL) # advanced user, alternative
    
    
    Attaching package: ‘RandomFields’
    
    The following objects are masked from ‘package:RandomFieldsUtils’:
    
     RFoptions, checkExamples
    
    The following object is masked from ‘package:nlme’:
    
     Variogram
    
    Warning: The value of the empirical function ‘pcf’ for r= 0 was Inf. Range of r values was reset to [0.00048828125, 0.25]
    
     *** caught segfault ***
    address 0x10f00001640, cause 'memory not mapped'
    
    Traceback:
     1: RandomFieldsUtils::RFoptions()
     2: internal.rfoptions(..., RELAX = is(model, "formula"))
     3: rfeval(model = model, x = x, y = y, z = z, T = T, grid = grid, params = params, distances = distances, dim = dim, ..., fctcall = "Cov", reg = MODEL_COV)
     4: RandomFields::RFcov(model = mod, x = rvals)
     5: theoretical(par = par, rvals, ...)
     6: eval(substitute(expr), data, enclos = parent.frame())
     7: eval(substitute(expr), data, enclos = parent.frame())
     8: with.default(objargs, { theo <- theoretical(par = par, rvals, ...) if (!is.vector(theo) || !is.numeric(theo)) stop("theoretical function did not return a numeric vector") if (length(theo) != nrvals) stop("theoretical function did not return the correct number of values") discrep <- (abs(theo^qq - obsq))^pp bigvalue <- BIGVALUE + sqrt(sum(par^2)) discrep <- safePositiveValue(discrep, default = bigvalue) value <- mean(discrep) return(value)})
     9: with(objargs, { theo <- theoretical(par = par, rvals, ...) if (!is.vector(theo) || !is.numeric(theo)) stop("theoretical function did not return a numeric vector") if (length(theo) != nrvals) stop("theoretical function did not return the correct number of values") discrep <- (abs(theo^qq - obsq))^pp bigvalue <- BIGVALUE + sqrt(sum(par^2)) discrep <- safePositiveValue(discrep, default = bigvalue) value <- mean(discrep) return(value)})
    10: (function (par, objargs, ...) { with(objargs, { theo <- theoretical(par = par, rvals, ...) if (!is.vector(theo) || !is.numeric(theo)) stop("theoretical function did not return a numeric vector") if (length(theo) != nrvals) stop("theoretical function did not return the correct number of values") discrep <- (abs(theo^qq - obsq))^pp bigvalue <- BIGVALUE + sqrt(sum(par^2)) discrep <- safePositiveValue(discrep, default = bigvalue) value <- mean(discrep) return(value) })})(par = c(sigma2 = 1, alpha = 0.0785686485446763), objargs = list( theoretical = function (par, rvals, ..., model, margs) { if (any(par <= 0)) return(rep.int(Inf, length(rvals))) if (model == "exponential") { gtheo <- exp(par[1L] * exp(-rvals/par[2L])) } else { kraeverRandomFields() modgen <- attr(model, "modgen") if (length(margs) == 0) { mod <- modgen(var = par[1L], scale = par[2L]) } else { mod <- do.call(modgen, append(list(var = par[1L], scale = par[2L]), margs)) } gtheo <- exp(RandomFields::RFcov(model = mod, x = rvals)) } return(gtheo) }, rvals = c(0.00048828125, 0.0009765625, 0.00146484375, 0.001953125, 0.00244140625, 0.0029296875, 0.00341796875, 0.00390625, 0.00439453125, 0.0048828125, 0.00537109375, 0.005859375, 0.00634765625, 0.0068359375, 0.00732421875, 0.0078125, 0.00830078125, 0.0087890625, 0.00927734375, 0.009765625, 0.01025390625, 0.0107421875, 0.01123046875, 0.01171875, 0.01220703125, 0.0126953125, 0.01318359375, 0.013671875, 0.01416015625, 0.0146484375, 0.01513671875, 0.015625, 0.01611328125, 0.0166015625, 0.01708984375, 0.017578125, 0.01806640625, 0.0185546875, 0.01904296875, 0.01953125, 0.02001953125, 0.0205078125, 0.02099609375, 0.021484375, 0.02197265625, 0.0224609375, 0.02294921875, 0.0234375, 0.02392578125, 0.0244140625, 0.02490234375, 0.025390625, 0.02587890625, 0.0263671875, 0.02685546875, 0.02734375, 0.02783203125, 0.0283203125, 0.02880859375, 0.029296875, 0.02978515625, 0.0302734375, 0.03076171875, 0.03125, 0.03173828125, 0.0322265625, 0.03271484375, 0.033203125, 0.03369140625, 0.0341796875, 0.03466796875, 0.03515625, 0.03564453125, 0.0361328125, 0.03662109375, 0.037109375, 0.03759765625, 0.0380859375, 0.03857421875, 0.0390625, 0.03955078125, 0.0400390625, 0.04052734375, 0.041015625, 0.04150390625, 0.0419921875, 0.04248046875, 0.04296875, 0.04345703125, 0.0439453125, 0.04443359375, 0.044921875, 0.04541015625, 0.0458984375, 0.04638671875, 0.046875, 0.04736328125, 0.0478515625, 0.04833984375, 0.048828125, 0.04931640625, 0.0498046875, 0.05029296875, 0.05078125, 0.05126953125, 0.0517578125, 0.05224609375, 0.052734375, 0.05322265625, 0.0537109375, 0.05419921875, 0.0546875, 0.05517578125, 0.0556640625, 0.05615234375, 0.056640625, 0.05712890625, 0.0576171875, 0.05810546875, 0.05859375, 0.05908203125, 0.0595703125, 0.06005859375, 0.060546875, 0.06103515625, 0.0615234375, 0.06201171875, 0.0625, 0.06298828125, 0.0634765625, 0.06396484375, 0.064453125, 0.06494140625, 0.0654296875, 0.06591796875, 0.06640625, 0.06689453125, 0.0673828125, 0.06787109375, 0.068359375, 0.06884765625, 0.0693359375, 0.06982421875, 0.0703125, 0.07080078125, 0.0712890625, 0.07177734375, 0.072265625, 0.07275390625, 0.0732421875, 0.07373046875, 0.07421875, 0.07470703125, 0.0751953125, 0.07568359375, 0.076171875, 0.07666015625, 0.0771484375, 0.07763671875, 0.078125, 0.07861328125, 0.0791015625, 0.07958984375, 0.080078125, 0.08056640625, 0.0810546875, 0.08154296875, 0.08203125, 0.08251953125, 0.0830078125, 0.08349609375, 0.083984375, 0.08447265625, 0.0849609375, 0.08544921875, 0.0859375, 0.08642578125, 0.0869140625, 0.08740234375, 0.087890625, 0.08837890625, 0.0888671875, 0.08935546875, 0.08984375, 0.09033203125, 0.0908203125, 0.09130859375, 0.091796875, 0.09228515625, 0.0927734375, 0.09326171875, 0.09375, 0.09423828125, 0.0947265625, 0.09521484375, 0.095703125, 0.09619140625, 0.0966796875, 0.09716796875, 0.09765625, 0.09814453125, 0.0986328125, 0.09912109375, 0.099609375, 0.10009765625, 0.1005859375, 0.10107421875, 0.1015625, 0.10205078125, 0.1025390625, 0.10302734375, 0.103515625, 0.10400390625, 0.1044921875, 0.10498046875, 0.10546875, 0.10595703125, 0.1064453125, 0.10693359375, 0.107421875, 0.10791015625, 0.1083984375, 0.10888671875, 0.109375, 0.10986328125, 0.1103515625, 0.11083984375, 0.111328125, 0.11181640625, 0.1123046875, 0.11279296875, 0.11328125, 0.11376953125, 0.1142578125, 0.11474609375, 0.115234375, 0.11572265625, 0.1162109375, 0.11669921875, 0.1171875, 0.11767578125, 0.1181640625, 0.11865234375, 0.119140625, 0.11962890625, 0.1201171875, 0.12060546875, 0.12109375, 0.12158203125, 0.1220703125, 0.12255859375, 0.123046875, 0.12353515625, 0.1240234375, 0.12451171875, 0.125, 0.12548828125, 0.1259765625, 0.12646484375, 0.126953125, 0.12744140625, 0.1279296875, 0.12841796875, 0.12890625, 0.12939453125, 0.1298828125, 0.13037109375, 0.130859375, 0.13134765625, 0.1318359375, 0.13232421875, 0.1328125, 0.13330078125, 0.1337890625, 0.13427734375, 0.134765625, 0.13525390625, 0.1357421875, 0.13623046875, 0.13671875, 0.13720703125, 0.1376953125, 0.13818359375, 0.138671875, 0.13916015625, 0.1396484375, 0.14013671875, 0.140625, 0.14111328125, 0.1416015625, 0.14208984375, 0.142578125, 0.14306640625, 0.1435546875, 0.14404296875, 0.14453125, 0.14501953125, 0.1455078125, 0.14599609375, 0.146484375, 0.14697265625, 0.1474609375, 0.14794921875, 0.1484375, 0.14892578125, 0.1494140625, 0.14990234375, 0.150390625, 0.15087890625, 0.1513671875, 0.15185546875, 0.15234375, 0.15283203125, 0.1533203125, 0.15380859375, 0.154296875, 0.15478515625, 0.1552734375, 0.15576171875, 0.15625, 0.15673828125, 0.1572265625, 0.15771484375, 0.158203125, 0.15869140625, 0.1591796875, 0.15966796875, 0.16015625, 0.16064453125, 0.1611328125, 0.16162109375, 0.162109375, 0.16259765625, 0.1630859375, 0.16357421875, 0.1640625, 0.16455078125, 0.1650390625, 0.16552734375, 0.166015625, 0.16650390625, 0.1669921875, 0.16748046875, 0.16796875, 0.16845703125, 0.1689453125, 0.16943359375, 0.169921875, 0.17041015625, 0.1708984375, 0.17138671875, 0.171875, 0.17236328125, 0.1728515625, 0.17333984375, 0.173828125, 0.17431640625, 0.1748046875, 0.17529296875, 0.17578125, 0.17626953125, 0.1767578125, 0.17724609375, 0.177734375, 0.17822265625, 0.1787109375, 0.17919921875, 0.1796875, 0.18017578125, 0.1806640625, 0.18115234375, 0.181640625, 0.18212890625, 0.1826171875, 0.18310546875, 0.18359375, 0.18408203125, 0.1845703125, 0.18505859375, 0.185546875, 0.18603515625, 0.1865234375, 0.18701171875, 0.1875, 0.18798828125, 0.1884765625, 0.18896484375, 0.189453125, 0.18994140625, 0.1904296875, 0.19091796875, 0.19140625, 0.19189453125, 0.1923828125, 0.19287109375, 0.193359375, 0.19384765625, 0.1943359375, 0.19482421875, 0.1953125, 0.19580078125, 0.1962890625, 0.19677734375, 0.197265625, 0.19775390625, 0.1982421875, 0.19873046875, 0.19921875, 0.19970703125, 0.2001953125, 0.20068359375, 0.201171875, 0.20166015625, 0.2021484375, 0.20263671875, 0.203125, 0.20361328125, 0.2041015625, 0.20458984375, 0.205078125, 0.20556640625, 0.2060546875, 0.20654296875, 0.20703125, 0.20751953125, 0.2080078125, 0.20849609375, 0.208984375, 0.20947265625, 0.2099609375, 0.21044921875, 0.2109375, 0.21142578125, 0.2119140625, 0.21240234375, 0.212890625, 0.21337890625, 0.2138671875, 0.21435546875, 0.21484375, 0.21533203125, 0.2158203125, 0.21630859375, 0.216796875, 0.21728515625, 0.2177734375, 0.21826171875, 0.21875, 0.21923828125, 0.2197265625, 0.22021484375, 0.220703125, 0.22119140625, 0.2216796875, 0.22216796875, 0.22265625, 0.22314453125, 0.2236328125, 0.22412109375, 0.224609375, 0.22509765625, 0.2255859375, 0.22607421875, 0.2265625, 0.22705078125, 0.2275390625, 0.22802734375, 0.228515625, 0.22900390625, 0.2294921875, 0.22998046875, 0.23046875, 0.23095703125, 0.2314453125, 0.23193359375, 0.232421875, 0.23291015625, 0.2333984375, 0.23388671875, 0.234375, 0.23486328125, 0.2353515625, 0.23583984375, 0.236328125, 0.23681640625, 0.2373046875, 0.23779296875, 0.23828125, 0.23876953125, 0.2392578125, 0.23974609375, 0.240234375, 0.24072265625, 0.2412109375, 0.24169921875, 0.2421875, 0.24267578125, 0.2431640625, 0.24365234375, 0.244140625, 0.24462890625, 0.2451171875, 0.24560546875, 0.24609375, 0.24658203125, 0.2470703125, 0.24755859375, 0.248046875, 0.24853515625, 0.2490234375, 0.24951171875, 0.25), nrvals = 512L, obsq = c(0.318711199392782, 0.750115124484581, 1.04420227147204, 1.14210388049369, 1.187871522655, 1.21380995020075, 1.22954959838517, 1.23966007802979, 1.24606124033211, 1.25003001703707, 1.252261881626, 1.25316567646277, 1.25314289005887, 1.25226517958179, 1.25082264889358, 1.24882952120978, 1.24642316300504, 1.24365361443664, 1.24748231421559, 1.26580213745308, 1.28383569182614, 1.29867526473216, 1.31081986896961, 1.32082163763466, 1.32901322291379, 1.33564714136946, 1.34101121759994, 1.34517216829868, 1.34838809996971, 1.35068365173212, 1.35221555951002, 1.3530421358444, 1.35321685962362, 1.35284401182056, 1.35189295608427, 1.35049278241274, 1.34860381460323, 1.34630884179633, 1.34361175385054, 1.3405268097137, 1.33710904430343, 1.333310830309, 1.33059928416575, 1.33249479614341, 1.33424399787801, 1.33529821035578, 1.33570150193226, 1.33553398131213, 1.33476049148192, 1.33349750501313, 1.33169007835248, 1.32980711277556, 1.33400851995795, 1.3446682130557, 1.3544109566838, 1.36273859660616, 1.36990194241133, 1.37589207144211, 1.38089762975612, 1.3849479437466, 1.38811738242975, 1.39049850340368, 1.39206778599108, 1.39296459524955, 1.39312355629824, 1.39266304101849, 1.39156241737031, 1.38985553532106, 1.38758775144636, 1.38471387050522, 1.38133204585775, 1.37735576314561, 1.3728774805504, 1.36785240595104, 1.36229751970415, 1.35623267943092, 1.35069232774945, 1.34681580488222, 1.34266786187157, 1.33854086076814, 1.33701391837405, 1.33551221482621, 1.33348809334838, 1.33181023887919, 1.33154801586531, 1.33099911265114, 1.32987306439098, 1.32812475999224, 1.32579256394485, 1.32295579525697, 1.32221653871018, 1.32360909548006, 1.32416291079081, 1.32402554138231, 1.32314257576264, 1.32156724748726, 1.32020180755036, 1.32120130635117, 1.32231119973433, 1.32276753221271, 1.32268790871326, 1.32202440951954, 1.32082265136546, 1.31909435929314, 1.31681631043835, 1.31405868413437, 1.31073116868686, 1.30698262794764, 1.30410090895661, 1.30266412132726, 1.30083732710385, 1.29837734178599, 1.2953577124986, 1.2916775422046, 1.28744394937836, 1.2825759524875, 1.27711317825649, 1.27103723909396, 1.26430883163562, 1.25697602968796, 1.24954366644034, 1.24352008735067, 1.2373710030402, 1.23066991648994, 1.22380109642997, 1.21752708754046, 1.21075877935743, 1.20326485520981, 1.19514684356813, 1.1871566708065, 1.18456478185605, 1.18634301353798, 1.18797447561448, 1.18907893960639, 1.19034902855083, 1.19231912931433, 1.19384450462225, 1.19480369495536, 1.19519134795878, 1.19501145084598, 1.19431627564311, 1.19304228139254, 1.19127930440837, 1.18921686401002, 1.18836429227352, 1.18755837231462, 1.1861487615759, 1.1841814804661, 1.18158495310039, 1.17844902381961, 1.17468478754689, 1.1703539297921, 1.1654146969305, 1.15985382627008, 1.15436984310167, 1.15023387445467, 1.14593373001952, 1.14104759356629, 1.13562996928154, 1.12963191818829, 1.12303902211822, 1.11646994434115, 1.11123364151472, 1.10587683534262, 1.09995346671762, 1.09530268720816, 1.0944668225125, 1.09328291443333, 1.09379290583184, 1.09724845689746, 1.10160964921052, 1.1055215691584, 1.10881391310915, 1.11146883331565, 1.11352230615039, 1.11501320086953, 1.11590781045045, 1.11629209858637, 1.11609094038365, 1.11538983879277, 1.11418169886026, 1.11335709945657, 1.11317693566829, 1.1123863868871, 1.11106638994452, 1.10912529246817, 1.10789506360991, 1.10819433536297, 1.10824050331538, 1.10781780323488, 1.10689566202814, 1.10553968595337, 1.10396116414909, 1.10233748343635, 1.1002589388416, 1.09769705321427, 1.09465439145801, 1.09115611752025, 1.0874558721538, 1.08406883017925, 1.08173147596888, 1.07907525809279, 1.07622373346275, 1.0739115447497, 1.07120349698054, 1.06799024546861, 1.06500374683794, 1.06341325961422, 1.0635947383798, 1.06385764605672, 1.06481200204475, 1.06564363516604, 1.06645704871361, 1.06793912817394, 1.06907935094602, 1.06967633749424, 1.06977538245485, 1.0693772597311, 1.06849618012916, 1.06778222465339, 1.0686358025433, 1.06956409076078, 1.07205301441776, 1.07624021489691, 1.08070048086724, 1.08448760933195, 1.0876818654669, 1.0902236582794, 1.09222279072715, 1.09362472964266, 1.09448988464454, 1.09481352003112, 1.09458919699685, 1.09386786973775, 1.09258207897822, 1.09114176744712, 1.09006526115537, 1.08845272707992, 1.08628297066145, 1.08354160892858, 1.0802661690898, 1.07637219906606, 1.07193563864882, 1.06814788985551, 1.06690930604373, 1.06569288978116, 1.06403454995867, 1.06264221854888, 1.0626350457957, 1.06247668826273, 1.06297990243952, 1.06435122591158, 1.06533792261488, 1.06582136252397, 1.06583893815654, 1.06547474943767, 1.0658224233544, 1.06645339049451, 1.06672900753839, 1.06793231938534, 1.06986213667216, 1.07134096315781, 1.07226605196883, 1.07271902047001, 1.07263215874931, 1.07207368769671, 1.07101250291842, 1.0694557059979, 1.06742467252335, 1.06486562153609, 1.0620884011548, 1.0594083032906, 1.05665992306228, 1.05433847170668, 1.05165467022246, 1.048472454148, 1.04494988011978, 1.04147184796867, 1.03889358218085, 1.03606408296447, 1.03294342546606, 1.03003092551543, 1.02670509256962, 1.02281011971333, 1.01895453194429, 1.0158011370873, 1.01232586337255, 1.00847545341107, 1.00584601564302, 1.00425661946679, 1.00232440153947, 1.00122745032231, 1.00009222640563, 0.998445883865906, 0.996230234042583, 0.993463994822979, 0.990146054255759, 0.986910060161997, 0.985184114446043, 0.984367035572879, 0.983429836124651, 0.983746949219676, 0.984501501891972, 0.984878997900438, 0.984810466136443, 0.984350123611072, 0.983426395197983, 0.98213501548681, 0.980927376055971, 0.979819378936319, 0.978409722963663, 0.977062222432679, 0.975352247444567, 0.97375837961279, 0.972773318057651, 0.971423021723179, 0.969633530961774, 0.967396663361624, 0.964686321688784, 0.961542013460591, 0.95788101712449, 0.953768284531205, 0.949131092425064, 0.943987340482611, 0.938307433143974, 0.932404452472185, 0.926706356757806, 0.921643931863854, 0.917965582893556, 0.915701851699538, 0.913351556755182, 0.910767340510621, 0.908524098523627, 0.905887707827853, 0.904407910913775, 0.90345854066656, 0.902243546904639, 0.901683957157113, 0.902406615777216, 0.904300954097203, 0.905852910415263, 0.906888276304943, 0.907488198143639, 0.907596085194327, 0.907262450741937, 0.906470016706191, 0.905336217878408, 0.905052005674077, 0.905415904630412, 0.906756733054285, 0.909660150773561, 0.913089066395028, 0.916240871543088, 0.918828612110633, 0.920902315207334, 0.922416795354474, 0.923457638784906, 0.923962017238795, 0.924199232495924, 0.924757378541001, 0.924983290446094, 0.924770749464066, 0.924071471860647, 0.923002882928972, 0.922630042140951, 0.922611503342761, 0.92266820688912, 0.923300314683583, 0.923576773798786, 0.92491019294693, 0.926667942359076, 0.928444307855914, 0.929809118478242, 0.930740160596966, 0.931252115897041, 0.931366266007332, 0.931320488291976, 0.931518093482295, 0.931796291269784, 0.932292237906859, 0.932444390767857, 0.932212889756276, 0.931949999489382, 0.931955881623384, 0.931599361475122, 0.930775292525074, 0.930021076857394, 0.929393711890077, 0.929000376913659, 0.929458907287829, 0.929581306774581, 0.929530291563241, 0.929209369829425, 0.928510682664433, 0.927394432283946, 0.925950402355627, 0.92499677590875, 0.924242689948825, 0.923091515473161, 0.921448198438477, 0.919382642281388, 0.917009350473946, 0.915239207524299, 0.913476083196233, 0.912004656194516, 0.911046571208035, 0.910262959758965, 0.90916029807296, 0.907750120159283, 0.906054584423601, 0.904572739952412, 0.90272593761968, 0.900486008480087, 0.898728896775926, 0.897218942598446, 0.895173846779444, 0.893638574878908, 0.893027622933425, 0.892601915660729, 0.89301450802736, 0.893194328045442, 0.89291363553641, 0.89211267466312, 0.890844576816176, 0.889306543256794, 0.888652211605949, 0.888408546773779, 0.889557339526727, 0.893956444688896, 0.898516351131929, 0.902542999492101, 0.906048899426184, 0.909040628203369, 0.911575404143428, 0.913603771961893, 0.915208445946074, 0.916341885796159, 0.917071042027, 0.917716216599056, 0.918536665257522, 0.91986941278298, 0.921445969302866, 0.92347866219345, 0.925795380060954, 0.927668367131096, 0.929090872862326, 0.930065205050217, 0.930629450718687, 0.93101362346388, 0.931354141440229, 0.931299061017055, 0.930856305227724, 0.930006993765815, 0.928819624768833, 0.927792807108597, 0.926922997988022, 0.926863826987006, 0.927102465593013, 0.927072113177721, 0.927497743634539, 0.928506872125313, 0.930335313113899, 0.931902236837028, 0.933020329068929, 0.933627982262091, 0.933791132444073, 0.933872585495074, 0.934520295473983, 0.935359597167191, 0.935712321155125, 0.935640686547508, 0.935077645865691, 0.934082957273804, 0.93275470671382, 0.932672266239284, 0.933104070170362, 0.933076002785248, 0.932624429422763, 0.931730558436757, 0.93082420571114, 0.930417892594035, 0.930027761522493, 0.930320970864521, 0.930629067187168, 0.930543344630598, 0.930405160506543, 0.930241847161048, 0.929628493150535, 0.928561315839529, 0.92704978592554, 0.925086336543193, 0.923378333421593, 0.92190667534761, 0.920631757026667, 0.919748303461565, 0.919645486657615, 0.919587906470739, 0.920100312268019, 0.92043342686337, 0.920741559317022, 0.921334202827165, 0.921519461776672, 0.921401599979491, 0.920939078651813, 0.91999836064205, 0.919070463386733, 0.920027529596206, 0.921168722144566, 0.922044912836215, 0.922526771149682, 0.922952489595848, 0.923312051382809), qq = 0.25, pp = 2, rmin = 0.00048828125, rmax = 0.25, BIGVALUE = 1), method = "Nelder-Mead", margs = list(nu = 0.3), model = "matern", funaux = NULL, dataname = "redwood", nu = 0.3)
    11: do.call(objfun, list(par = startpar, objargs = objargs, ...))
    12: bigvaluerule(contrast.objective, objargs, startpar, ...)
    13: (function (observed, theoretical, startpar, ..., ctrl = list(q = 1/4, p = 2, rmin = NULL, rmax = NULL), fvlab = list(label = NULL, desc = "minimum contrast fit"), explain = list(dataname = NULL, modelname = NULL, fname = NULL), action.bad.values = c("warn", "stop", "silent"), control = list(), stabilize = TRUE, pspace = NULL) { verifyclass(observed, "fv") action.bad.values <- match.arg(action.bad.values) stopifnot(is.function(theoretical)) if (!any("par" %in% names(formals(theoretical)))) stop(paste("Theoretical function does not include an argument called", sQuote("par"))) ctrl <- resolve.defaults(ctrl, list(q = 1/4, p = 2, rmin = NULL, rmax = NULL)) fvlab <- resolve.defaults(fvlab, list(label = NULL, desc = "minimum contrast fit")) explain <- resolve.defaults(explain, list(dataname = NULL, modelname = NULL, fname = NULL)) argu <- fvnames(observed, ".x") rvals <- observed[[argu]] rmin <- ctrl$rmin rmax <- ctrl$rmax if (!is.null(rmin) && !is.null(rmax)) stopifnot(rmin < rmax && rmin >= 0) else { alim <- attr(observed, "alim") %orifnull% range(rvals) if (is.null(rmax)) rmax <- alim[2] if (is.null(rmin)) { rmin <- alim[1] if (rmin == 0 && identical(explain$fname, "g")) rmin <- rmax/1000 } } valu <- fvnames(observed, ".y") obs <- observed[[valu]] if (max(rvals) < rmax) stop(paste("rmax=", signif(rmax, 4), "exceeds the range of available data", "= [", signif(min(rvals), 4), ",", signif(max(rvals), 4), "]"), call. = FALSE) sub <- (rvals >= rmin) & (rvals <= rmax) rvals <- rvals[sub] obs <- obs[sub] if (!all(ok <- is.finite(obs))) { doomed <- !any(ok) if (!doomed && all(ok[-1])) { whinge <- paste("The value of the empirical function", sQuote(explain$fname), "for r=", rvals[1], "was", paste0(obs[1], ".")) if (action.bad.values == "stop") stop(whinge, call. = FALSE) iMIN <- 2 iMAX <- length(obs) success <- TRUE } else { whinge <- paste(if (doomed) "All" else "Some", "values of the empirical function", sQuote(explain$fname), "were infinite, NA or NaN.") if (doomed || action.bad.values == "stop") stop(whinge, call. = FALSE) ra <- range(which(ok)) iMIN <- ra[1] iMAX <- ra[2] success <- all(ok[iMIN:iMAX]) } if (!success) { z <- rle(ok) k <- which.max(z$lengths * z$values) if (2 * z$lengths[k] > length(ok)) { csl <- cumsum(z$lengths) iMAX <- csl[k] iMIN <- 1L + if (k == 1) 0 else csl[k - 1] success <- TRUE } } if (success) { rmin <- rvals[iMIN] rmax <- rvals[iMAX] obs <- obs[iMIN:iMAX] rvals <- rvals[iMIN:iMAX] sub[sub] <- ok if (action.bad.values == "warn") { warning(paste(whinge, "Range of r values was reset to", prange(c(rmin, rmax))), call. = FALSE) } } else stop(paste(whinge, "Unable to recover.", "Please choose a narrower range [rmin, rmax]"), call. = FALSE) } objargs <- list(theoretical = theoretical, rvals = rvals, nrvals = length(rvals), obsq = obs^(ctrl$q), qq = ctrl$q, pp = ctrl$p, rmin = rmin, rmax = rmax, BIGVALUE = 1) objargs$BIGVALUE <- bigvaluerule(contrast.objective, objargs, startpar, ...) if (stabilize) { startval <- contrast.objective(startpar, objargs, ...) smallscale <- sqrt(.Machine$double.eps) fnscale <- max(abs(startval), smallscale) parscale <- pmax(abs(startpar), smallscale) scaling <- list(fnscale = fnscale, parscale = parscale) } else { scaling <- list() } control <- resolve.defaults(control, scaling, list(trace = 0)) minimum <- optim(startpar, fn = contrast.objective, objargs = objargs, ..., control = control) signalStatus(optimStatus(minimum), errors.only = TRUE) fittheo <- theoretical(minimum$par, rvals, ...) label <- fvlab$label %orifnull% "%s[fit](r)" desc <- fvlab$desc fitfv <- bind.fv(observed[sub, ], data.frame(fit = fittheo), label, desc) result <- list(par = minimum$par, fit = fitfv, opt = minimum, ctrl = list(p = ctrl$p, q = ctrl$q, rmin = rmin, rmax = rmax), info = explain, startpar = startpar, objfun = contrast.objective, objargs = objargs, dotargs = list(...)) class(result) <- c("minconfit", class(result)) return(result)})(observed = list(r = c(0, 0.00048828125, 0.0009765625, 0.00146484375, 0.001953125, 0.00244140625, 0.0029296875, 0.00341796875, 0.00390625, 0.00439453125, 0.0048828125, 0.00537109375, 0.005859375, 0.00634765625, 0.0068359375, 0.00732421875, 0.0078125, 0.00830078125, 0.0087890625, 0.00927734375, 0.009765625, 0.01025390625, 0.0107421875, 0.01123046875, 0.01171875, 0.01220703125, 0.0126953125, 0.01318359375, 0.013671875, 0.01416015625, 0.0146484375, 0.01513671875, 0.015625, 0.01611328125, 0.0166015625, 0.01708984375, 0.017578125, 0.01806640625, 0.0185546875, 0.01904296875, 0.01953125, 0.02001953125, 0.0205078125, 0.02099609375, 0.021484375, 0.02197265625, 0.0224609375, 0.02294921875, 0.0234375, 0.02392578125, 0.0244140625, 0.02490234375, 0.025390625, 0.02587890625, 0.0263671875, 0.02685546875, 0.02734375, 0.02783203125, 0.0283203125, 0.02880859375, 0.029296875, 0.02978515625, 0.0302734375, 0.03076171875, 0.03125, 0.03173828125, 0.0322265625, 0.03271484375, 0.033203125, 0.03369140625, 0.0341796875, 0.03466796875, 0.03515625, 0.03564453125, 0.0361328125, 0.03662109375, 0.037109375, 0.03759765625, 0.0380859375, 0.03857421875, 0.0390625, 0.03955078125, 0.0400390625, 0.04052734375, 0.041015625, 0.04150390625, 0.0419921875, 0.04248046875, 0.04296875, 0.04345703125, 0.0439453125, 0.04443359375, 0.044921875, 0.04541015625, 0.0458984375, 0.04638671875, 0.046875, 0.04736328125, 0.0478515625, 0.04833984375, 0.048828125, 0.04931640625, 0.0498046875, 0.05029296875, 0.05078125, 0.05126953125, 0.0517578125, 0.05224609375, 0.052734375, 0.05322265625, 0.0537109375, 0.05419921875, 0.0546875, 0.05517578125, 0.0556640625, 0.05615234375, 0.056640625, 0.05712890625, 0.0576171875, 0.05810546875, 0.05859375, 0.05908203125, 0.0595703125, 0.06005859375, 0.060546875, 0.06103515625, 0.0615234375, 0.06201171875, 0.0625, 0.06298828125, 0.0634765625, 0.06396484375, 0.064453125, 0.06494140625, 0.0654296875, 0.06591796875, 0.06640625, 0.06689453125, 0.0673828125, 0.06787109375, 0.068359375, 0.06884765625, 0.0693359375, 0.06982421875, 0.0703125, 0.07080078125, 0.0712890625, 0.07177734375, 0.072265625, 0.07275390625, 0.0732421875, 0.07373046875, 0.07421875, 0.07470703125, 0.0751953125, 0.07568359375, 0.076171875, 0.07666015625, 0.0771484375, 0.07763671875, 0.078125, 0.07861328125, 0.0791015625, 0.07958984375, 0.080078125, 0.08056640625, 0.0810546875, 0.08154296875, 0.08203125, 0.08251953125, 0.0830078125, 0.08349609375, 0.083984375, 0.08447265625, 0.0849609375, 0.08544921875, 0.0859375, 0.08642578125, 0.0869140625, 0.08740234375, 0.087890625, 0.08837890625, 0.0888671875, 0.08935546875, 0.08984375, 0.09033203125, 0.0908203125, 0.09130859375, 0.091796875, 0.09228515625, 0.0927734375, 0.09326171875, 0.09375, 0.09423828125, 0.0947265625, 0.09521484375, 0.095703125, 0.09619140625, 0.0966796875, 0.09716796875, 0.09765625, 0.09814453125, 0.0986328125, 0.09912109375, 0.099609375, 0.10009765625, 0.1005859375, 0.10107421875, 0.1015625, 0.10205078125, 0.1025390625, 0.10302734375, 0.103515625, 0.10400390625, 0.1044921875, 0.10498046875, 0.10546875, 0.10595703125, 0.1064453125, 0.10693359375, 0.107421875, 0.10791015625, 0.1083984375, 0.10888671875, 0.109375, 0.10986328125, 0.1103515625, 0.11083984375, 0.111328125, 0.11181640625, 0.1123046875, 0.11279296875, 0.11328125, 0.11376953125, 0.1142578125, 0.11474609375, 0.115234375, 0.11572265625, 0.1162109375, 0.11669921875, 0.1171875, 0.11767578125, 0.1181640625, 0.11865234375, 0.119140625, 0.11962890625, 0.1201171875, 0.12060546875, 0.12109375, 0.12158203125, 0.1220703125, 0.12255859375, 0.123046875, 0.12353515625, 0.1240234375, 0.12451171875, 0.125, 0.12548828125, 0.1259765625, 0.12646484375, 0.126953125, 0.12744140625, 0.1279296875, 0.12841796875, 0.12890625, 0.12939453125, 0.1298828125, 0.13037109375, 0.130859375, 0.13134765625, 0.1318359375, 0.13232421875, 0.1328125, 0.13330078125, 0.1337890625, 0.13427734375, 0.134765625, 0.13525390625, 0.1357421875, 0.13623046875, 0.13671875, 0.13720703125, 0.1376953125, 0.13818359375, 0.138671875, 0.13916015625, 0.1396484375, 0.14013671875, 0.140625, 0.14111328125, 0.1416015625, 0.14208984375, 0.142578125, 0.14306640625, 0.1435546875, 0.14404296875, 0.14453125, 0.14501953125, 0.1455078125, 0.14599609375, 0.146484375, 0.14697265625, 0.1474609375, 0.14794921875, 0.1484375, 0.14892578125, 0.1494140625, 0.14990234375, 0.150390625, 0.15087890625, 0.1513671875, 0.15185546875, 0.15234375, 0.15283203125, 0.1533203125, 0.15380859375, 0.154296875, 0.15478515625, 0.1552734375, 0.15576171875, 0.15625, 0.15673828125, 0.1572265625, 0.15771484375, 0.158203125, 0.15869140625, 0.1591796875, 0.15966796875, 0.16015625, 0.16064453125, 0.1611328125, 0.16162109375, 0.162109375, 0.16259765625, 0.1630859375, 0.16357421875, 0.1640625, 0.16455078125, 0.1650390625, 0.16552734375, 0.166015625, 0.16650390625, 0.1669921875, 0.16748046875, 0.16796875, 0.16845703125, 0.1689453125, 0.16943359375, 0.169921875, 0.17041015625, 0.1708984375, 0.17138671875, 0.171875, 0.17236328125, 0.1728515625, 0.17333984375, 0.173828125, 0.17431640625, 0.1748046875, 0.17529296875, 0.17578125, 0.17626953125, 0.1767578125, 0.17724609375, 0.177734375, 0.17822265625, 0.1787109375, 0.17919921875, 0.1796875, 0.18017578125, 0.1806640625, 0.18115234375, 0.181640625, 0.18212890625, 0.1826171875, 0.18310546875, 0.18359375, 0.18408203125, 0.1845703125, 0.18505859375, 0.185546875, 0.18603515625, 0.1865234375, 0.18701171875, 0.1875, 0.18798828125, 0.1884765625, 0.18896484375, 0.189453125, 0.18994140625, 0.1904296875, 0.19091796875, 0.19140625, 0.19189453125, 0.1923828125, 0.19287109375, 0.193359375, 0.19384765625, 0.1943359375, 0.19482421875, 0.1953125, 0.19580078125, 0.1962890625, 0.19677734375, 0.197265625, 0.19775390625, 0.1982421875, 0.19873046875, 0.19921875, 0.19970703125, 0.2001953125, 0.20068359375, 0.201171875, 0.20166015625, 0.2021484375, 0.20263671875, 0.203125, 0.20361328125, 0.2041015625, 0.20458984375, 0.205078125, 0.20556640625, 0.2060546875, 0.20654296875, 0.20703125, 0.20751953125, 0.2080078125, 0.20849609375, 0.208984375, 0.20947265625, 0.2099609375, 0.21044921875, 0.2109375, 0.21142578125, 0.2119140625, 0.21240234375, 0.212890625, 0.21337890625, 0.2138671875, 0.21435546875, 0.21484375, 0.21533203125, 0.2158203125, 0.21630859375, 0.216796875, 0.21728515625, 0.2177734375, 0.21826171875, 0.21875, 0.21923828125, 0.2197265625, 0.22021484375, 0.220703125, 0.22119140625, 0.2216796875, 0.22216796875, 0.22265625, 0.22314453125, 0.2236328125, 0.22412109375, 0.224609375, 0.22509765625, 0.2255859375, 0.22607421875, 0.2265625, 0.22705078125, 0.2275390625, 0.22802734375, 0.228515625, 0.22900390625, 0.2294921875, 0.22998046875, 0.23046875, 0.23095703125, 0.2314453125, 0.23193359375, 0.232421875, 0.23291015625, 0.2333984375, 0.23388671875, 0.234375, 0.23486328125, 0.2353515625, 0.23583984375, 0.236328125, 0.23681640625, 0.2373046875, 0.23779296875, 0.23828125, 0.23876953125, 0.2392578125, 0.23974609375, 0.240234375, 0.24072265625, 0.2412109375, 0.24169921875, 0.2421875, 0.24267578125, 0.2431640625, 0.24365234375, 0.244140625, 0.24462890625, 0.2451171875, 0.24560546875, 0.24609375, 0.24658203125, 0.2470703125, 0.24755859375, 0.248046875, 0.24853515625, 0.2490234375, 0.24951171875, 0.25), theo = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), iso = c(Inf, 0.0103178521121689, 0.316600567303367, 1.18888140500818, 1.70146268319213, 1.99103036623443, 2.17071482943182, 2.28551570099942, 2.36162241224896, 2.410779826944, 2.44164076654933, 2.45912522160658, 2.46623220772259, 2.46605283788653, 2.45915112710895, 2.44783954180774, 2.43227472037848, 2.41358192386165, 2.39220142957012, 2.42179617575822, 2.56722124903435, 2.7166755943628, 2.84447600930488, 2.95237869431669, 3.04352378164258, 3.11973142632972, 3.18248932751654, 3.23392276105539, 3.27424740974042, 3.30567112479741, 3.32823952104424, 3.3433644143474, 3.35154678097551, 3.35327831126387, 3.34958416330586, 3.34017499714113, 3.32635862415658, 3.30778699268825, 3.28532843068978, 3.25908117334063, 3.229252586602, 3.19644551200969, 3.16028047055338, 3.13465061526507, 3.15255074938782, 3.16913712617765, 3.17916499398009, 3.18300746578098, 3.18141094416466, 3.17404714188198, 3.1620507054175, 3.14494211489269, 3.1271924303543, 3.1669004609679, 3.2693435107635, 3.3651299012732, 3.44865877986431, 3.52174515557728, 3.58374807092579, 3.63618471320485, 3.67903398175187, 3.71282748590802, 3.73836845236533, 3.75527316748911, 3.76495953359539, 3.76667841251324, 3.76170038153846, 3.7498229615676, 3.73145874357491, 3.70716426647565, 3.67654740421101, 3.64076249712465, 3.5990221718968, 3.55244305681555, 3.50071660552014, 3.4441960446579, 3.38327125777018, 3.32832503667755, 3.29027969055551, 3.24993275526892, 3.21015891831855, 3.19553599036747, 3.18120354713958, 3.16196143687077, 3.14607736117173, 3.1436003408002, 3.13842000744056, 3.12781284735756, 3.11139746111337, 3.08960041902027, 3.06324217167331, 3.05640105286544, 3.06929739935854, 3.07443756057132, 3.07316198352388, 3.0649724641108, 3.05040193538042, 3.03781478944425, 3.04702472095025, 3.05727641062087, 3.06149888679427, 3.060761810204, 3.0546249568542, 3.0435331252732, 3.02763455204066, 3.0067740178007, 2.9816663407427, 2.95157965166734, 2.91795950405844, 2.89230967580739, 2.87958436568005, 2.86346554296499, 2.84186675622483, 2.81552158311638, 2.78366157809874, 2.74734577419414, 2.7060285331296, 2.66021994491574, 2.60995547895348, 2.55512814967779, 2.49636441603074, 2.43784309584306, 2.39117422314321, 2.34422739901117, 2.29385698726407, 2.2430727110192, 2.19742736570353, 2.14897076548294, 2.09625894254386, 2.04025793364432, 1.98624194446622, 1.9689526226211, 1.98080219248943, 1.99172070728574, 1.9991378815437, 2.00769291968083, 2.02101737372593, 2.03137946853446, 2.03791576048389, 2.04056184779012, 2.03933356475936, 2.03459232975825, 2.02592489567132, 2.01397645102243, 2.00006558404879, 1.9943362117801, 1.98893167014458, 1.97950516384351, 1.96640540508503, 1.94921528033936, 1.92860462514909, 1.90408081963457, 1.87615567329416, 1.84468392201152, 1.80972688453083, 1.7757420977387, 1.7504294593266, 1.72439998923754, 1.69517694658796, 1.66321112072688, 1.62835023120592, 1.59066742613016, 1.55377505561287, 1.52483033443823, 1.49563990564817, 1.46385227252458, 1.43925124121158, 1.43486289116159, 1.42866447064332, 1.43133209329692, 1.44950565830241, 1.4726886012004, 1.49371891671575, 1.51159228571626, 1.52612166130251, 1.53743118184435, 1.54568159788846, 1.55064816376732, 1.55278527069563, 1.55166631240823, 1.54777110622445, 1.54107609042971, 1.53651898672672, 1.53552466821051, 1.53116735680336, 1.52391253394288, 1.51329095465958, 1.50658801838539, 1.50821655515472, 1.50846790320572, 1.5061678075412, 1.50115916373782, 1.4938168327233, 1.48530342701666, 1.47658448543724, 1.46547907724716, 1.45187756147394, 1.43584676717595, 1.41757996774552, 1.39844880136334, 1.38110732924934, 1.36923460792328, 1.35583530733978, 1.34156049298789, 1.33006861151245, 1.3167033093421, 1.300975578676, 1.28648445468646, 1.27881665793297, 1.27968983675305, 1.28095560100137, 1.28555822288155, 1.28957908641751, 1.29352097729232, 1.30072652180333, 1.30629049041162, 1.30921072752733, 1.30969569192815, 1.30774713852829, 1.30344255439624, 1.29996227001411, 1.30412398114932, 1.30866128469879, 1.32088512443453, 1.34164267422277, 1.36402201203103, 1.38324267037057, 1.39961165722894, 1.41274054247459, 1.42313119269489, 1.43045199811856, 1.43498383422798, 1.43668185841785, 1.43550473814937, 1.43172452325307, 1.42500468104656, 1.41750539738993, 1.41191970071715, 1.40358360689519, 1.39242523405814, 1.37842256201637, 1.3618306414758, 1.34230092195308, 1.32030674092298, 1.30174388873381, 1.29571657092746, 1.28981752307059, 1.28180782995524, 1.27511180178857, 1.27507737451109, 1.27431747871484, 1.27673338239382, 1.28333446821965, 1.28809990188755, 1.29043960233409, 1.2905247229898, 1.28876177853929, 1.29044473992913, 1.29350322895899, 1.29484093305324, 1.30069335029761, 1.31012058653172, 1.31737932287525, 1.32193537854812, 1.32417055003639, 1.32374171168925, 1.32098701423347, 1.31576449514333, 1.30813091018178, 1.29822194934946, 1.28581718384242, 1.27245567834267, 1.25966043839746, 1.24663967189396, 1.23572039632241, 1.22318633093058, 1.20844836938412, 1.19228983664551, 1.17649514709962, 1.16488822038344, 1.15224935433908, 1.13842950531301, 1.12564398867072, 1.11117603091899, 1.09441003149867, 1.0780011420459, 1.06471844694139, 1.05022252854048, 1.03433525394696, 1.02358991830481, 1.01713549955066, 1.00933007347566, 1.00491884849453, 1.00036895665993, 0.993798012116724, 0.985005988893913, 0.974111180442976, 0.961163000649626, 0.948659377494583, 0.942040559789808, 0.938919257344219, 0.935348643171094, 0.936555662886617, 0.939432394756744, 0.940874082758895, 0.940612231177518, 0.938854734430157, 0.935335552459057, 0.930432302851351, 0.925864474642527, 0.921688351568589, 0.916395693143897, 0.911357742314506, 0.904994533892124, 0.899093446199886, 0.895460843293415, 0.890499267088568, 0.88395570239767, 0.875827022266614, 0.866053024638556, 0.854816821683068, 0.841872390144363, 0.827506678165974, 0.811530417306453, 0.794080772968919, 0.775140853909632, 0.755818216408168, 0.737511112270146, 0.721527140854214, 0.710077243030723, 0.703098820880038, 0.695908103015778, 0.688065519437301, 0.681311635124262, 0.673437764383338, 0.669048205159644, 0.666243386563628, 0.662666686276888, 0.661024217827861, 0.663145889964562, 0.668731770187268, 0.673334296629703, 0.676417991554216, 0.678209615844284, 0.678532190108734, 0.677535020013889, 0.67517099052387, 0.671799348739477, 0.670956154005173, 0.672035904288242, 0.676025621881771, 0.684725781632332, 0.695108452823189, 0.704755774944961, 0.71275133964023, 0.719207585495624, 0.723950392571359, 0.727223513206306, 0.72881360883254, 0.729562350858859, 0.731326348723571, 0.732041242743749, 0.731368646176513, 0.729159017810594, 0.725792088823023, 0.724620083924857, 0.72456184528097, 0.724739987495008, 0.726728068489844, 0.727598861448899, 0.731809869736393, 0.737388832826684, 0.743059227808061, 0.747438051501051, 0.750436267886898, 0.752088745962749, 0.752457568962093, 0.7523096432741, 0.752948339028521, 0.753848213840659, 0.755454432204208, 0.755947722571924, 0.755197275672257, 0.754345753238062, 0.75436479805727, 0.753211129880327, 0.750549578849054, 0.748119825576474, 0.746103228377165, 0.744840976466588, 0.74631260192742, 0.746705804142781, 0.746541901454927, 0.74551145638697, 0.743271736852273, 0.739703948465922, 0.735107576594441, 0.732083933809985, 0.729699581692588, 0.726070909472673, 0.720914400984453, 0.714471978478901, 0.70712315118492, 0.701678978213875, 0.696287701355426, 0.691812209479429, 0.688909719184744, 0.686542589028215, 0.683222011118417, 0.678992942615562, 0.673934126382863, 0.669536076715488, 0.664085020451309, 0.657518349093878, 0.652401307926352, 0.648027947844885, 0.642139731005738, 0.637745832393496, 0.636003594841559, 0.634791727216674, 0.635966234547452, 0.636478629385557, 0.635678935163566, 0.633401136895421, 0.629807404116404, 0.625469232226872, 0.623630438399251, 0.622946731920436, 0.626175093310384, 0.638653708754813, 0.651784366048432, 0.663546874637047, 0.673917212268528, 0.682862360800931, 0.690510671301074, 0.696677100759823, 0.70158464805662, 0.70506661963324, 0.707313456453729, 0.709305984518773, 0.711845898282038, 0.715986299798482, 0.720907424965032, 0.727289739261429, 0.734615414387783, 0.740578314231408, 0.745131245199308, 0.748261824619105, 0.750079279377695, 0.751318606147673, 0.752418387624001, 0.752240410869377, 0.750810917924929, 0.748074512191787, 0.744261461881506, 0.740975767015548, 0.738201002220962, 0.738012525249365, 0.738772879917463, 0.738676137902737, 0.740033614385601, 0.743259535598597, 0.749131439411274, 0.754191123550647, 0.757817143613174, 0.759793263733459, 0.760324494194625, 0.760589816283461, 0.762702114615609, 0.76544576851302, 0.766601019792374, 0.766366294412852, 0.764523253289271, 0.761275394636425, 0.756954537622783, 0.756686962801226, 0.758089244807305, 0.757998036876902, 0.756531732665405, 0.753635517842585, 0.750707359853597, 0.749397455851374, 0.748141334699353, 0.749085245393617, 0.750078042886126, 0.749801714857189, 0.749356436871831, 0.748830439408564, 0.746857429496798, 0.743433877308774, 0.738604980492719, 0.732367504201993, 0.726973733276452, 0.722350268444251, 0.718362754265849, 0.71560930936731, 0.71528937694567, 0.715110253017397, 0.716705458942811, 0.717743931511572, 0.718705527530852, 0.720557719713064, 0.721137444350431, 0.7207685829037, 0.719322438639319, 0.716387853820194, 0.713502068952069, 0.71647871171373, 0.720040182158455, 0.722783624017485, 0.724295708312532, 0.725633597065508, 0.726765020936449)), theoretical = function (par, rvals, ..., model, margs) { if (any(par <= 0)) return(rep.int(Inf, length(rvals))) if (model == "exponential") { gtheo <- exp(par[1L] * exp(-rvals/par[2L])) } else { kraeverRandomFields() modgen <- attr(model, "modgen") if (length(margs) == 0) { mod <- modgen(var = par[1L], scale = par[2L]) } else { mod <- do.call(modgen, append(list(var = par[1L], scale = par[2L]), margs)) } gtheo <- exp(RandomFields::RFcov(model = mod, x = rvals)) } return(gtheo)}, startpar = c(sigma2 = 1, alpha = 0.0785686485446763), ctrl = list( rmax = NULL, q = 0.25, p = 2, rmin = NULL), method = "Nelder-Mead", fvlab = list(label = "%s[fit](r)", desc = "minimum contrast fit of LGCP"), explain = list(dataname = "redwood", fname = "pcf", modelname = "Log-Gaussian Cox process"), margs = list(nu = 0.3), model = "matern", funaux = NULL, pspace = NULL, dataname = "redwood", control = list(maxit = 10), stabilize = TRUE, nu = 0.3)
    14: do.call(mincontrast, mcargs)
    15: clusterfit(X, clusters, lambda = lambda, dataname = Xname, control = control, stabilize = stabilize, statistic = statistic, statargs = statargs, algorithm = algorithm, ...)
    16: kppmMinCon(X = XX, Xname = Xname, po = po, clusters = clusters, control = control, stabilize = stabilize, statistic = statistic, statargs = statargs, rmax = rmax, algorithm = algorithm, ...)
    17: kppm.ppp(X = redwood, trend = ~x, data = NULL, clusters = "LGCP", statistic = "pcf", model = "matern", nu = 0.3, control = list( maxit = 10))
    18: kppm(X = redwood, trend = ~x, data = NULL, clusters = "LGCP", statistic = "pcf", model = "matern", nu = 0.3, control = list( maxit = 10))
    19: eval(thecall, envir = callenv, enclos = baseenv())
    20: eval(thecall, envir = callenv, enclos = baseenv())
    21: kppm.formula(redwood ~ x, "LGCP", statistic = "pcf", model = "matern", nu = 0.3, control = list(maxit = 10))
    22: kppm(redwood ~ x, "LGCP", statistic = "pcf", model = "matern", nu = 0.3, control = list(maxit = 10))
    An irrecoverable exception occurred. R is aborting now ...
Flavors: r-release-macos-x86_64, r-oldrel-macos-x86_64

Version: 2.3-2
Check: tests
Result: ERROR
     Running ‘testsAtoC.R’ [2s/2s]
     Running ‘testsD.R’ [14s/14s]
     Running ‘testsEtoF.R’ [9s/9s]
     Running ‘testsGtoJ.R’ [2s/2s]
     Running ‘testsK.R’ [3s/3s]
    Running the tests in ‘tests/testsK.R’ failed.
    Last 13 lines of output:
     6: eval(cmd)
     7: doTryCatch(return(expr), name, parentenv, handler)
     8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     9: tryCatchList(expr, classes, parentenv, handlers)
     10: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
     11: try(eval(cmd))
     12: simulate.kppm(fit0, saveLambda = TRUE)
     13: simulate(fit0, saveLambda = TRUE)
     14: eval(quote({ fit <- kppm(redwood ~ 1, "Thomas") fitx <- kppm(redwood ~ x, "Thomas", verbose = TRUE) if (FULLTEST) { fitx <- update(fit, ~. + x) fitM <- update(fit, clusters = "MatClust") fitC <- update(fit, cells) fitCx <- update(fit, cells ~ x) Wsub <- owin(c(0, 0.5), c(-0.5, 0)) Zsub <- (bdist.pixels(Window(redwood)) > 0.1) fitWsub <- kppm(redwood ~ 1, "Thomas", subset = Wsub) fitZsub <- kppm(redwood ~ 1, "Thomas", subset = Zsub) fitWsub ff <- as.fv(fitx) uu <- unitname(fitx) unitname(fitCx) <- "furlong" mo <- model.images(fitCx) p <- psib(fit) px <- psib(fitx) } if (ALWAYS) { Y <- simulate(fitx, seed = 42, saveLambda = TRUE)[[1]] } if (FULLTEST) { vc <- vcov(fitx) vc2 <- vcov(fitx, fast = TRUE) vc3 <- vcov(fitx, fast = TRUE, splitup = TRUE) vc4 <- vcov(fitx, splitup = TRUE) a <- varcount(fitx, function(x, y) { x + 1 }) a <- varcount(fitx, function(x, y) { y - 1 }) a <- varcount(fitx, function(x, y) { x + y }) fitI <- update(fit, improve.type = "quasi") fitxI <- update(fitx, improve.type = "quasi") fitxIs <- update(fitx, improve.type = "quasi", fast = FALSE) vcI <- vcov(fitxI) } if (ALWAYS) { fitMC <- kppm(redwood ~ x, "Thomas") plot(fitMC) } if (FULLTEST) { fitCL <- kppm(redwood ~ x, "Thomas", method = "c") fitPA <- kppm(redwood ~ x, "Thomas", method = "p") plot(fitCL) plot(fitPA) fut <- kppm(redwood ~ x, "VarGamma", method = "clik2", nu.ker = -3/8) kfut <- as.fv(fut) } if (require(RandomFields)) { fit0 <- kppm(redwood ~ 1, "LGCP") is.poisson(fit0) Y0 <- simulate(fit0, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y0)) p0 <- psib(fit0) if (FULLTEST) { fit1 <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), control = list(maxit = 3)) Y1 <- simulate(fit1, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1)) } fit1p <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1p <- simulate(fit1p, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1p)) if (FULLTEST) { fit1pClik <- update(fit1p, method = "clik") fit1pPalm <- update(fit1p, method = "palm") } xx <- as.im(function(x, y) x, Window(redwood)) fit1xx <- update(fit1p, . ~ xx, data = solist(xx = xx)) Y1xx <- simulate(fit1xx, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xx)) if (FULLTEST) { fit1xxVG <- update(fit1xx, clusters = "VarGamma", nu = -1/4) Y1xxVG <- simulate(fit1xxVG, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xxVG)) } fit1xxLG <- update(fit1xx, clusters = "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1xxLG <- simulate(fit1xxLG, saveLambda = TRUE, drop = TRUE) stopifnot(is.ppp(Y1xxLG)) if (FULLTEST) { fit2 <- kppm(redwood ~ x, cluster = "Cauchy", statistic = "K") Y2 <- simulate(fit2, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y2)) } kraever("RandomFields") }}), new.env())
     15: eval(quote({ fit <- kppm(redwood ~ 1, "Thomas") fitx <- kppm(redwood ~ x, "Thomas", verbose = TRUE) if (FULLTEST) { fitx <- update(fit, ~. + x) fitM <- update(fit, clusters = "MatClust") fitC <- update(fit, cells) fitCx <- update(fit, cells ~ x) Wsub <- owin(c(0, 0.5), c(-0.5, 0)) Zsub <- (bdist.pixels(Window(redwood)) > 0.1) fitWsub <- kppm(redwood ~ 1, "Thomas", subset = Wsub) fitZsub <- kppm(redwood ~ 1, "Thomas", subset = Zsub) fitWsub ff <- as.fv(fitx) uu <- unitname(fitx) unitname(fitCx) <- "furlong" mo <- model.images(fitCx) p <- psib(fit) px <- psib(fitx) } if (ALWAYS) { Y <- simulate(fitx, seed = 42, saveLambda = TRUE)[[1]] } if (FULLTEST) { vc <- vcov(fitx) vc2 <- vcov(fitx, fast = TRUE) vc3 <- vcov(fitx, fast = TRUE, splitup = TRUE) vc4 <- vcov(fitx, splitup = TRUE) a <- varcount(fitx, function(x, y) { x + 1 }) a <- varcount(fitx, function(x, y) { y - 1 }) a <- varcount(fitx, function(x, y) { x + y }) fitI <- update(fit, improve.type = "quasi") fitxI <- update(fitx, improve.type = "quasi") fitxIs <- update(fitx, improve.type = "quasi", fast = FALSE) vcI <- vcov(fitxI) } if (ALWAYS) { fitMC <- kppm(redwood ~ x, "Thomas") plot(fitMC) } if (FULLTEST) { fitCL <- kppm(redwood ~ x, "Thomas", method = "c") fitPA <- kppm(redwood ~ x, "Thomas", method = "p") plot(fitCL) plot(fitPA) fut <- kppm(redwood ~ x, "VarGamma", method = "clik2", nu.ker = -3/8) kfut <- as.fv(fut) } if (require(RandomFields)) { fit0 <- kppm(redwood ~ 1, "LGCP") is.poisson(fit0) Y0 <- simulate(fit0, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y0)) p0 <- psib(fit0) if (FULLTEST) { fit1 <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), control = list(maxit = 3)) Y1 <- simulate(fit1, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1)) } fit1p <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1p <- simulate(fit1p, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1p)) if (FULLTEST) { fit1pClik <- update(fit1p, method = "clik") fit1pPalm <- update(fit1p, method = "palm") } xx <- as.im(function(x, y) x, Window(redwood)) fit1xx <- update(fit1p, . ~ xx, data = solist(xx = xx)) Y1xx <- simulate(fit1xx, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xx)) if (FULLTEST) { fit1xxVG <- update(fit1xx, clusters = "VarGamma", nu = -1/4) Y1xxVG <- simulate(fit1xxVG, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xxVG)) } fit1xxLG <- update(fit1xx, clusters = "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1xxLG <- simulate(fit1xxLG, saveLambda = TRUE, drop = TRUE) stopifnot(is.ppp(Y1xxLG)) if (FULLTEST) { fit2 <- kppm(redwood ~ x, cluster = "Cauchy", statistic = "K") Y2 <- simulate(fit2, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y2)) } kraever("RandomFields") }}), new.env())
     16: eval(expr, p)
     17: eval(expr, p)
     18: eval.parent(substitute(eval(quote(expr), envir)))
     19: local({ fit <- kppm(redwood ~ 1, "Thomas") fitx <- kppm(redwood ~ x, "Thomas", verbose = TRUE) if (FULLTEST) { fitx <- update(fit, ~. + x) fitM <- update(fit, clusters = "MatClust") fitC <- update(fit, cells) fitCx <- update(fit, cells ~ x) Wsub <- owin(c(0, 0.5), c(-0.5, 0)) Zsub <- (bdist.pixels(Window(redwood)) > 0.1) fitWsub <- kppm(redwood ~ 1, "Thomas", subset = Wsub) fitZsub <- kppm(redwood ~ 1, "Thomas", subset = Zsub) fitWsub ff <- as.fv(fitx) uu <- unitname(fitx) unitname(fitCx) <- "furlong" mo <- model.images(fitCx) p <- psib(fit) px <- psib(fitx) } if (ALWAYS) { Y <- simulate(fitx, seed = 42, saveLambda = TRUE)[[1]] } if (FULLTEST) { vc <- vcov(fitx) vc2 <- vcov(fitx, fast = TRUE) vc3 <- vcov(fitx, fast = TRUE, splitup = TRUE) vc4 <- vcov(fitx, splitup = TRUE) a <- varcount(fitx, function(x, y) { x + 1 }) a <- varcount(fitx, function(x, y) { y - 1 }) a <- varcount(fitx, function(x, y) { x + y }) fitI <- update(fit, improve.type = "quasi") fitxI <- update(fitx, improve.type = "quasi") fitxIs <- update(fitx, improve.type = "quasi", fast = FALSE) vcI <- vcov(fitxI) } if (ALWAYS) { fitMC <- kppm(redwood ~ x, "Thomas") plot(fitMC) } if (FULLTEST) { fitCL <- kppm(redwood ~ x, "Thomas", method = "c") fitPA <- kppm(redwood ~ x, "Thomas", method = "p") plot(fitCL) plot(fitPA) fut <- kppm(redwood ~ x, "VarGamma", method = "clik2", nu.ker = -3/8) kfut <- as.fv(fut) } if (require(RandomFields)) { fit0 <- kppm(redwood ~ 1, "LGCP") is.poisson(fit0) Y0 <- simulate(fit0, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y0)) p0 <- psib(fit0) if (FULLTEST) { fit1 <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), control = list(maxit = 3)) Y1 <- simulate(fit1, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1)) } fit1p <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1p <- simulate(fit1p, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1p)) if (FULLTEST) { fit1pClik <- update(fit1p, method = "clik") fit1pPalm <- update(fit1p, method = "palm") } xx <- as.im(function(x, y) x, Window(redwood)) fit1xx <- update(fit1p, . ~ xx, data = solist(xx = xx)) Y1xx <- simulate(fit1xx, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xx)) if (FULLTEST) { fit1xxVG <- update(fit1xx, clusters = "VarGamma", nu = -1/4) Y1xxVG <- simulate(fit1xxVG, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xxVG)) } fit1xxLG <- update(fit1xx, clusters = "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1xxLG <- simulate(fit1xxLG, saveLambda = TRUE, drop = TRUE) stopifnot(is.ppp(Y1xxLG)) if (FULLTEST) { fit2 <- kppm(redwood ~ x, cluster = "Cauchy", statistic = "K") Y2 <- simulate(fit2, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y2)) } kraever("RandomFields") }})
     An irrecoverable exception occurred. R is aborting now ...
Flavor: r-release-macos-x86_64

Version: 2.3-2
Check: tests
Result: ERROR
     Running ‘testsAtoC.R’ [3s/3s]
     Running ‘testsD.R’ [15s/15s]
     Running ‘testsEtoF.R’ [10s/10s]
     Running ‘testsGtoJ.R’ [2s/2s]
     Running ‘testsK.R’ [3s/3s]
    Running the tests in ‘tests/testsK.R’ failed.
    Last 13 lines of output:
     6: eval(cmd)
     7: doTryCatch(return(expr), name, parentenv, handler)
     8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     9: tryCatchList(expr, classes, parentenv, handlers)
     10: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
     11: try(eval(cmd))
     12: simulate.kppm(fit0, saveLambda = TRUE)
     13: simulate(fit0, saveLambda = TRUE)
     14: eval(quote({ fit <- kppm(redwood ~ 1, "Thomas") fitx <- kppm(redwood ~ x, "Thomas", verbose = TRUE) if (FULLTEST) { fitx <- update(fit, ~. + x) fitM <- update(fit, clusters = "MatClust") fitC <- update(fit, cells) fitCx <- update(fit, cells ~ x) Wsub <- owin(c(0, 0.5), c(-0.5, 0)) Zsub <- (bdist.pixels(Window(redwood)) > 0.1) fitWsub <- kppm(redwood ~ 1, "Thomas", subset = Wsub) fitZsub <- kppm(redwood ~ 1, "Thomas", subset = Zsub) fitWsub ff <- as.fv(fitx) uu <- unitname(fitx) unitname(fitCx) <- "furlong" mo <- model.images(fitCx) p <- psib(fit) px <- psib(fitx) } if (ALWAYS) { Y <- simulate(fitx, seed = 42, saveLambda = TRUE)[[1]] } if (FULLTEST) { vc <- vcov(fitx) vc2 <- vcov(fitx, fast = TRUE) vc3 <- vcov(fitx, fast = TRUE, splitup = TRUE) vc4 <- vcov(fitx, splitup = TRUE) a <- varcount(fitx, function(x, y) { x + 1 }) a <- varcount(fitx, function(x, y) { y - 1 }) a <- varcount(fitx, function(x, y) { x + y }) fitI <- update(fit, improve.type = "quasi") fitxI <- update(fitx, improve.type = "quasi") fitxIs <- update(fitx, improve.type = "quasi", fast = FALSE) vcI <- vcov(fitxI) } if (ALWAYS) { fitMC <- kppm(redwood ~ x, "Thomas") plot(fitMC) } if (FULLTEST) { fitCL <- kppm(redwood ~ x, "Thomas", method = "c") fitPA <- kppm(redwood ~ x, "Thomas", method = "p") plot(fitCL) plot(fitPA) fut <- kppm(redwood ~ x, "VarGamma", method = "clik2", nu.ker = -3/8) kfut <- as.fv(fut) } if (require(RandomFields)) { fit0 <- kppm(redwood ~ 1, "LGCP") is.poisson(fit0) Y0 <- simulate(fit0, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y0)) p0 <- psib(fit0) if (FULLTEST) { fit1 <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), control = list(maxit = 3)) Y1 <- simulate(fit1, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1)) } fit1p <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1p <- simulate(fit1p, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1p)) if (FULLTEST) { fit1pClik <- update(fit1p, method = "clik") fit1pPalm <- update(fit1p, method = "palm") } xx <- as.im(function(x, y) x, Window(redwood)) fit1xx <- update(fit1p, . ~ xx, data = solist(xx = xx)) Y1xx <- simulate(fit1xx, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xx)) if (FULLTEST) { fit1xxVG <- update(fit1xx, clusters = "VarGamma", nu = -1/4) Y1xxVG <- simulate(fit1xxVG, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xxVG)) } fit1xxLG <- update(fit1xx, clusters = "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1xxLG <- simulate(fit1xxLG, saveLambda = TRUE, drop = TRUE) stopifnot(is.ppp(Y1xxLG)) if (FULLTEST) { fit2 <- kppm(redwood ~ x, cluster = "Cauchy", statistic = "K") Y2 <- simulate(fit2, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y2)) } kraever("RandomFields") }}), new.env())
     15: eval(quote({ fit <- kppm(redwood ~ 1, "Thomas") fitx <- kppm(redwood ~ x, "Thomas", verbose = TRUE) if (FULLTEST) { fitx <- update(fit, ~. + x) fitM <- update(fit, clusters = "MatClust") fitC <- update(fit, cells) fitCx <- update(fit, cells ~ x) Wsub <- owin(c(0, 0.5), c(-0.5, 0)) Zsub <- (bdist.pixels(Window(redwood)) > 0.1) fitWsub <- kppm(redwood ~ 1, "Thomas", subset = Wsub) fitZsub <- kppm(redwood ~ 1, "Thomas", subset = Zsub) fitWsub ff <- as.fv(fitx) uu <- unitname(fitx) unitname(fitCx) <- "furlong" mo <- model.images(fitCx) p <- psib(fit) px <- psib(fitx) } if (ALWAYS) { Y <- simulate(fitx, seed = 42, saveLambda = TRUE)[[1]] } if (FULLTEST) { vc <- vcov(fitx) vc2 <- vcov(fitx, fast = TRUE) vc3 <- vcov(fitx, fast = TRUE, splitup = TRUE) vc4 <- vcov(fitx, splitup = TRUE) a <- varcount(fitx, function(x, y) { x + 1 }) a <- varcount(fitx, function(x, y) { y - 1 }) a <- varcount(fitx, function(x, y) { x + y }) fitI <- update(fit, improve.type = "quasi") fitxI <- update(fitx, improve.type = "quasi") fitxIs <- update(fitx, improve.type = "quasi", fast = FALSE) vcI <- vcov(fitxI) } if (ALWAYS) { fitMC <- kppm(redwood ~ x, "Thomas") plot(fitMC) } if (FULLTEST) { fitCL <- kppm(redwood ~ x, "Thomas", method = "c") fitPA <- kppm(redwood ~ x, "Thomas", method = "p") plot(fitCL) plot(fitPA) fut <- kppm(redwood ~ x, "VarGamma", method = "clik2", nu.ker = -3/8) kfut <- as.fv(fut) } if (require(RandomFields)) { fit0 <- kppm(redwood ~ 1, "LGCP") is.poisson(fit0) Y0 <- simulate(fit0, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y0)) p0 <- psib(fit0) if (FULLTEST) { fit1 <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), control = list(maxit = 3)) Y1 <- simulate(fit1, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1)) } fit1p <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1p <- simulate(fit1p, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1p)) if (FULLTEST) { fit1pClik <- update(fit1p, method = "clik") fit1pPalm <- update(fit1p, method = "palm") } xx <- as.im(function(x, y) x, Window(redwood)) fit1xx <- update(fit1p, . ~ xx, data = solist(xx = xx)) Y1xx <- simulate(fit1xx, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xx)) if (FULLTEST) { fit1xxVG <- update(fit1xx, clusters = "VarGamma", nu = -1/4) Y1xxVG <- simulate(fit1xxVG, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xxVG)) } fit1xxLG <- update(fit1xx, clusters = "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1xxLG <- simulate(fit1xxLG, saveLambda = TRUE, drop = TRUE) stopifnot(is.ppp(Y1xxLG)) if (FULLTEST) { fit2 <- kppm(redwood ~ x, cluster = "Cauchy", statistic = "K") Y2 <- simulate(fit2, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y2)) } kraever("RandomFields") }}), new.env())
     16: eval(expr, p)
     17: eval(expr, p)
     18: eval.parent(substitute(eval(quote(expr), envir)))
     19: local({ fit <- kppm(redwood ~ 1, "Thomas") fitx <- kppm(redwood ~ x, "Thomas", verbose = TRUE) if (FULLTEST) { fitx <- update(fit, ~. + x) fitM <- update(fit, clusters = "MatClust") fitC <- update(fit, cells) fitCx <- update(fit, cells ~ x) Wsub <- owin(c(0, 0.5), c(-0.5, 0)) Zsub <- (bdist.pixels(Window(redwood)) > 0.1) fitWsub <- kppm(redwood ~ 1, "Thomas", subset = Wsub) fitZsub <- kppm(redwood ~ 1, "Thomas", subset = Zsub) fitWsub ff <- as.fv(fitx) uu <- unitname(fitx) unitname(fitCx) <- "furlong" mo <- model.images(fitCx) p <- psib(fit) px <- psib(fitx) } if (ALWAYS) { Y <- simulate(fitx, seed = 42, saveLambda = TRUE)[[1]] } if (FULLTEST) { vc <- vcov(fitx) vc2 <- vcov(fitx, fast = TRUE) vc3 <- vcov(fitx, fast = TRUE, splitup = TRUE) vc4 <- vcov(fitx, splitup = TRUE) a <- varcount(fitx, function(x, y) { x + 1 }) a <- varcount(fitx, function(x, y) { y - 1 }) a <- varcount(fitx, function(x, y) { x + y }) fitI <- update(fit, improve.type = "quasi") fitxI <- update(fitx, improve.type = "quasi") fitxIs <- update(fitx, improve.type = "quasi", fast = FALSE) vcI <- vcov(fitxI) } if (ALWAYS) { fitMC <- kppm(redwood ~ x, "Thomas") plot(fitMC) } if (FULLTEST) { fitCL <- kppm(redwood ~ x, "Thomas", method = "c") fitPA <- kppm(redwood ~ x, "Thomas", method = "p") plot(fitCL) plot(fitPA) fut <- kppm(redwood ~ x, "VarGamma", method = "clik2", nu.ker = -3/8) kfut <- as.fv(fut) } if (require(RandomFields)) { fit0 <- kppm(redwood ~ 1, "LGCP") is.poisson(fit0) Y0 <- simulate(fit0, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y0)) p0 <- psib(fit0) if (FULLTEST) { fit1 <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), control = list(maxit = 3)) Y1 <- simulate(fit1, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1)) } fit1p <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1p <- simulate(fit1p, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1p)) if (FULLTEST) { fit1pClik <- update(fit1p, method = "clik") fit1pPalm <- update(fit1p, method = "palm") } xx <- as.im(function(x, y) x, Window(redwood)) fit1xx <- update(fit1p, . ~ xx, data = solist(xx = xx)) Y1xx <- simulate(fit1xx, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xx)) if (FULLTEST) { fit1xxVG <- update(fit1xx, clusters = "VarGamma", nu = -1/4) Y1xxVG <- simulate(fit1xxVG, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y1xxVG)) } fit1xxLG <- update(fit1xx, clusters = "LGCP", covmodel = list(model = "matern", nu = 0.3), statistic = "pcf") Y1xxLG <- simulate(fit1xxLG, saveLambda = TRUE, drop = TRUE) stopifnot(is.ppp(Y1xxLG)) if (FULLTEST) { fit2 <- kppm(redwood ~ x, cluster = "Cauchy", statistic = "K") Y2 <- simulate(fit2, saveLambda = TRUE)[[1]] stopifnot(is.ppp(Y2)) } kraever("RandomFields") }})
     An irrecoverable exception occurred. R is aborting now ...
Flavor: r-oldrel-macos-x86_64