Skip to content

Commit

Permalink
Improved identify.lpp; clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
baddstats committed Jun 16, 2024
1 parent 297effe commit 4fee843
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: spatstat.linnet
Version: 3.1-5.007
Date: 2024-06-15
Version: 3.1-5.009
Date: 2024-06-16
Title: Linear Networks Functionality of the 'spatstat' Family
Authors@R: c(person("Adrian", "Baddeley",
role = c("aut", "cre", "cph"),
Expand All @@ -25,7 +25,7 @@ Authors@R: c(person("Adrian", "Baddeley",
person("Ottmar", "Cronie",
role = "ctb"))
Maintainer: Adrian Baddeley <[email protected]>
Depends: R (>= 3.5.0), spatstat.data (>= 3.0-4), spatstat.univar (>= 2.0-3.003), spatstat.geom (>= 3.2-9.018), spatstat.random (>= 3.2-3.003), spatstat.explore (>= 3.2-7.006), spatstat.model (>= 3.2-11.005), stats, graphics, grDevices, methods, utils
Depends: R (>= 3.5.0), spatstat.data (>= 3.0-4), spatstat.univar (>= 2.0-3.003), spatstat.geom (>= 3.2-9.023), spatstat.random (>= 3.2-3.003), spatstat.explore (>= 3.2-7.006), spatstat.model (>= 3.2-11.005), stats, graphics, grDevices, methods, utils
Imports: spatstat.utils (>= 3.0-4), Matrix, spatstat.sparse (>= 3.0-3)
Suggests: goftest, locfit, spatstat (>= 3.0)
Description: Defines types of spatial data on a linear network
Expand Down
6 changes: 5 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

CHANGES IN spatstat.linnet VERSION 3.1-5.007
CHANGES IN spatstat.linnet VERSION 3.1-5.009

OVERVIEW

Expand All @@ -14,6 +14,10 @@ PACKAGE DEPENDENCE

SIGNIFICANT USER-VISIBLE CHANGES

o identify.lpp
Automatically starts a new plot device and displays `x`
if there is no plot device open.

o thinNetwork
X can be a pixel image on a linear network (object of class 'linim').

Expand Down
5 changes: 4 additions & 1 deletion R/lpp.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# lpp.R
#
# $Revision: 1.83 $ $Date: 2024/03/24 00:53:42 $
# $Revision: 1.85 $ $Date: 2024/06/16 02:02:52 $
#
# Class "lpp" of point patterns on linear networks

Expand Down Expand Up @@ -602,6 +602,9 @@ superimpose.lpp <- function(..., L=NULL) {

identify.lpp <- function(x, ...) {
verifyclass(x, "lpp")
if(dev.cur() == 1 && interactive()) {
eval(substitute(plot(X), list(X=substitute(x))))
}
P <- as.ppp(x)
id <- identify(P$x, P$y, ...)
if(!is.marked(x)) return(id)
Expand Down
6 changes: 3 additions & 3 deletions R/relrisk.lpp.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Estimation of relative risk on network
#
# $Revision: 1.9 $ $Date: 2023/01/27 04:32:26 $
# $Revision: 1.10 $ $Date: 2024/06/16 02:43:20 $
#

relrisk.lpp <- local({
Expand Down Expand Up @@ -265,7 +265,7 @@ bw.relrisk.lpp <- function(X, ...,
if(ntypes == 1L)
stop("There is only one type of point", call.=FALSE)
if(ntypes > 2L && distance == "path")
stop(paste("Sorry, bw.relrisklpp(distance='path') is not yet supported",
stop(paste("Sorry, bw.relrisk.lpp(distance='path') is not yet supported",
"for > 2 types of points"), call.=FALSE)
## determine range of bandwidths
if(got.hmax <- !missing(hmax)) { check.1.real(hmax) ; stopifnot(hmax > 0) }
Expand All @@ -288,7 +288,7 @@ bw.relrisk.lpp <- function(X, ...,
if(distance == "euclidean") {
if(verbose) splat("Euclidean smoothing")
if(method %in% c("McSwiggan", "KelsallDiggle"))
stop(paste0("Sorry, bw.relrisklpp(method=", sQuote(method),
stop(paste0("Sorry, bw.relrisk.lpp(method=", sQuote(method),
") is not yet supported for > 2 types of points"),
call.=FALSE)
sigmavalues <- seq(hmin, hmax, length.out=nh)
Expand Down
2 changes: 1 addition & 1 deletion inst/doc/packagesizes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
"2023-10-28" "3.1-3" 148 307 0 12268 3270
"2024-02-04" "3.1-4" 148 312 0 12340 3270
"2024-03-24" "3.1-5" 148 312 0 12343 3270
"2024-06-15" "3.1-5.007" 148 312 0 12373 3270
"2024-06-16" "3.1-5.009" 148 312 0 12376 3270

0 comments on commit 4fee843

Please sign in to comment.