Skip to content

Commit

Permalink
hyperframe handles Surv objects
Browse files Browse the repository at this point in the history
  • Loading branch information
baddstats committed Jan 2, 2025
1 parent 47896d8 commit af1c279
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 25 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: spatstat.geom
Version: 3.3-4.008
Date: 2024-12-03
Version: 3.3-4.009
Date: 2025-01-02
Title: Geometrical Functionality of the 'spatstat' Family
Authors@R: c(person("Adrian", "Baddeley",
role = c("aut", "cre", "cph"),
Expand Down
13 changes: 11 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
CHANGES IN spatstat.geom VERSION 3.3-4.008
CHANGES IN spatstat.geom VERSION 3.3-4.009

OVERVIEW

o We thank Stephanie Hogg for contributions.
o We thank Stephanie Hogg and Tingting Zhan for contributions.

o Improvements to plotting of images, and arrays of images.

o More control over plotting of colour maps, symbol maps and texture maps.

o hyperframes handle a 'Surv' object as a single column.

o Bug fix

Expand All @@ -18,13 +20,20 @@ NEW FUNCTIONS

SIGNIFICANT USER-VISIBLE CHANGES

o hyperframe
An object of class 'Surv' from the 'survival' package
is now treated as a single column of data
(mimicking the behaviour of 'data.frame')
[Requested by Tingting Zhan]

o plot.im
New argument 'drop.ribbon' determines whether a ribbon will be displayed
in the case where the pixel values are all equal.
Default behaviour has changed.

o plot.im
New argument 'reverse.col' allows the sequence of colours to be reversed.
[Suggested by Stephanie Hogg.]

o plot.imlist, image.imlist, image.listof
If equal.ribbon=TRUE and equal.scales=TRUE, the colour ribbon
Expand Down
4 changes: 2 additions & 2 deletions R/hyperframe.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# hyperframe.R
#
# $Revision: 1.79 $ $Date: 2022/11/03 11:08:33 $
# $Revision: 1.80 $ $Date: 2025/01/02 01:48:03 $
#

hyperframe <- local({
Expand Down Expand Up @@ -125,7 +125,7 @@ hyperframe <- local({
is.atomic(x) &&
(is.vector(x) ||
is.factor(x) ||
inherits(x, c("POSIXlt", "POSIXct", "Date")))
inherits(x, c("POSIXlt", "POSIXct", "Date", "Surv")))
}

is.hypercolumn <- function(x) {
Expand Down
26 changes: 18 additions & 8 deletions R/split.ppp.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# split.ppp.R
#
# $Revision: 1.41 $ $Date: 2021/11/15 03:08:49 $
# $Revision: 1.42 $ $Date: 2024/12/03 02:09:40 $
#
# split.ppp and "split<-.ppp"
#
Expand Down Expand Up @@ -335,13 +335,23 @@ print.summary.splitppp <- function(x, ...) {
}


plot.splitppp <- function(x, ..., main) {
if(missing(main)) main <- short.deparse(substitute(x))
do.call(plot.solist,
resolve.defaults(list(x=quote(x), main=main),
list(...),
list(equal.scales=TRUE)))
}
plot.splitppp <- local({

plot.splitppp <- function(x, ..., main) {
if(missing(main)) main <- short.deparse(substitute(x))
plsplp(x, ..., main=main)
}

plsplp <- function(x, ..., main, plotcommand="plot", equal.scales) {
if(missing(equal.scales))
equal.scales <- plotcommand %in% c("plot", "image")
plot.solist(x, ..., main=main,
plotcommand=plotcommand, equal.scales=equal.scales)
}

plot.splitppp
})


as.layered.splitppp <- function(X) { do.call(layered, X) }

2 changes: 1 addition & 1 deletion inst/doc/packagesizes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
"2024-07-09" "3.3-2" 442 1186 0 35638 15596
"2024-09-18" "3.3-3" 443 1187 0 35818 15596
"2024-11-18" "3.3-4" 444 1190 0 35978 15596
"2024-12-03" "3.3-4.008" 445 1191 0 36148 15596
"2025-01-02" "3.3-4.009" 445 1191 0 36158 15596
2 changes: 1 addition & 1 deletion inst/info/packagesizes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
"2024-07-09" "3.3-2" 442 1186 0 35638 15596
"2024-09-18" "3.3-3" 443 1187 0 35818 15596
"2024-11-18" "3.3-4" 444 1190 0 35978 15596
"2024-12-03" "3.3-4.008" 445 1191 0 36148 15596
"2025-01-02" "3.3-4.009" 445 1191 0 36158 15596
7 changes: 1 addition & 6 deletions man/as.hyperframe.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,7 @@ as.hyperframe(x, \dots)
An object of class \code{"hyperframe"} created by
\code{\link{hyperframe}}.
}
\author{\adrian


and \rolf

}
\author{\adrian and \rolf.}
\seealso{
\code{\link{hyperframe}},
\code{\link{as.hyperframe.ppx}}
Expand Down
8 changes: 5 additions & 3 deletions man/hyperframe.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
\arguments{
\item{\dots}{
Arguments of the form \code{value} or \code{tag=value}.
Each \code{value} is either an atomic vector, or a list of objects of the
same class, or a single atomic value, or a single object.
Each \code{value} is either an atomic vector, a factor,
a list of objects of the same class, a single atomic value,
or a single object.
Each \code{value} will become a column of the array.
The \code{tag} determines the name of the column. See Details.
}
Expand Down Expand Up @@ -43,7 +44,8 @@
\itemize{
\item an atomic vector or factor
(i.e. numeric vector, integer vector, character vector, logical
vector, complex vector or factor)
vector, complex vector, factor, or an
object of class \code{"Date"} or \code{"Surv"})
\item a list of objects which are all of the same class
\item one atomic value, which will be replicated to make an atomic
vector or factor
Expand Down

0 comments on commit af1c279

Please sign in to comment.