Skip to content

Commit 791a6d0

Browse files
committed
Streamlined to satosfy CRAN
1 parent 839a0c8 commit 791a6d0

File tree

5 files changed

+29
-19
lines changed

5 files changed

+29
-19
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: spatstat.model
2-
Version: 3.4-1
2+
Version: 3.4-2
33
Date: 2025-09-28
44
Title: Parametric Statistical Modelling and Inference for the 'spatstat' Family
55
Authors@R: c(person("Adrian", "Baddeley",

NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11

2+
CHANGES IN spatstat.model VERSION 3.4-2
3+
4+
OVERVIEW
5+
6+
o Internal changes to satisfy CRAN.
7+
28
CHANGES IN spatstat.model VERSION 3.4-1
39

410
OVERVIEW

R/rmhmodel.ppm.R

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# convert ppm object into format palatable to rmh.default
55
#
6-
# $Revision: 2.67 $ $Date: 2025/09/19 04:44:21 $
6+
# $Revision: 2.68 $ $Date: 2025/09/28 04:01:23 $
77
#
88
# .Spatstat.rmhinfo
99
# rmhmodel.ppm()
@@ -382,23 +382,25 @@ rmhmodel.ppm <- function(model, w, ...,
382382
else
383383
predict(model, window=wsim, type="trend",
384384
covariates=newcovariates)
385-
## check for substantial fraction of NA's
386-
if(!Y$marked) {
387-
Atrend <- area(as.owin(Z$trend))
388-
} else {
389-
Atrend <- mean(sapply(lapply(Z$trend, as.owin), area))
390-
}
391-
okfrac <- Atrend/area(wsim)
392-
if(okfrac < 0.95) {
393-
gripe <- paste("The model trend is undefined (NA) at",
394-
percentage(1 - okfrac),
395-
"of locations in the simulation window")
396-
if(okfrac < 0.5)
397-
stop(gripe, call.=FALSE)
398-
warning(paste(paste0(gripe, ";"),
399-
"simulations will be generated in a sub-window",
400-
"covering only", percentage(okfrac), "of the area"),
401-
call.=FALSE)
385+
if(newdata.given) {
386+
## check for substantial fraction of NA's
387+
if(!Y$marked) {
388+
Atrend <- area(as.owin(Z$trend))
389+
} else {
390+
Atrend <- mean(sapply(lapply(Z$trend, as.owin), area))
391+
}
392+
okfrac <- Atrend/area(wsim)
393+
if(okfrac < 0.95) {
394+
gripe <- paste("The model trend is undefined (NA) at",
395+
percentage(1 - okfrac),
396+
"of locations in the simulation window")
397+
if(okfrac < 0.5)
398+
stop(gripe, call.=FALSE)
399+
warning(paste(paste0(gripe, ";"),
400+
"simulations will be generated in a sub-window",
401+
"covering only", percentage(okfrac), "of the area"),
402+
call.=FALSE)
403+
}
402404
}
403405
}
404406

inst/doc/packagesizes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
2222
"2025-04-22" "3.3-6" 269 730 0 39071 1155
2323
"2025-07-23" "3.4-0" 273 735 0 39424 1155
2424
"2025-09-28" "3.4-1" 273 735 0 39633 1155
25+
"2025-09-28" "3.4-2" 273 735 0 39635 1155

inst/info/packagesizes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
2222
"2025-04-22" "3.3-6" 269 730 0 39071 1155
2323
"2025-07-23" "3.4-0" 273 735 0 39424 1155
2424
"2025-09-28" "3.4-1" 273 735 0 39633 1155
25+
"2025-09-28" "3.4-2" 273 735 0 39635 1155

0 commit comments

Comments
 (0)