| Type: | Package |
| Title: | Grouped Hyper Data Frame |
| Version: | 0.3.5 |
| Description: | An S3 class 'groupedHyperframe' that inherits from the hyper data frame class from the 'spatstat' packages. Batch process and aggregation of the hyper column(s) over a nested grouping structure. |
| RoxygenNote: | 7.3.3 |
| LazyData: | true |
| LazyDataCompression: | xz |
| Encoding: | UTF-8 |
| License: | GPL-2 |
| Language: | en-US |
| URL: | https://github.com/tingtingzhan/groupedHyperframe, https://tingtingzhan.quarto.pub/groupedhyperframe, https://tingtingzhan-groupedhyperframe.netlify.app |
| Depends: | R (≥ 4.5) |
| Imports: | cli, methods, parallel, doParallel, foreach, matrixStats, pracma, GET, SpatialPack, ggplot2, geomtextpath, scales, survival, patchwork, knitr, spatstat.explore, spatstat.geom, spatstat.random, splines |
| Suggests: | spatstat.data |
| NeedsCompilation: | no |
| Packaged: | 2026-03-01 20:55:59 UTC; tingtingzhan |
| Author: | Tingting Zhan |
| Maintainer: | Tingting Zhan <tingtingzhan@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-03-02 06:10:32 UTC |
groupedHyperframe: Grouped Hyper Data Frame
Description
An S3 class 'groupedHyperframe' that inherits from the hyper data frame class from the 'spatstat' packages. Batch process and aggregation of the hyper column(s) over a nested grouping structure.
Author(s)
Maintainer: Tingting Zhan tingtingzhan@gmail.com (ORCID)
See Also
Useful links:
Syntactic Sugar for groupedHyperframe Object
Description
Syntactic Sugar for groupedHyperframe Object
Usage
## S3 replacement method for class 'groupedHyperframe'
x$name <- value
Arguments
x |
a groupedHyperframe |
name, value |
see function $<-.hyperframe |
Value
Syntactic sugar $<-.groupedHyperframe() returns a groupedHyperframe.
Note
The function $<-.hyperframe drops attributes.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Alternative Interface of nncross.ppp
Description
An alternative interface of the function nncross.ppp.
Usage
.nncross(X, i, j, ...)
Arguments
X |
see Details |
i, j |
character or integer scalars. See functions Gcross, etc. for more details |
... |
additional parameters of nncross.ppp |
Details
The function .nncross() creates an interface similar to
The functions Gcross, etc.,
which takes an is.multitype ppp.object
and two mark values i and j,
then calls the workhorse function
nncross.ppp with parameter what = 'dist'.
If mark values i and j does not exist in the ppp.object,
a NULL value will be returned.
Value
The function .nncross() returns
a numeric vector
if i and j are valid mark values of ppp.object X;
otherwise returns a NULL value.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Generic Function with Namespace
Description
Generic Function with Namespace
Usage
.ns_generic(x, backtick = TRUE, ver = FALSE)
Arguments
x |
character scalar |
backtick |
logical scalar |
ver |
logical scalar |
Examples
.ns_generic('names<-')
.ns_generic('Math', ver = TRUE)
.ns_generic('update')
Ki67 Data
Description
Ki67 cell data containing 622 patients.
Usage
Ki67
Format
patientIDfactor, unique patient identifier
tissueIDfactor, TMA core identifier
recurrenceinteger, recurrence indicator, 1 = Recurred, 0 = not Recurred
recfreesurv_moninteger, recurrence-free survival time in months
logKi67double, log-transformed cell signal intensity of the protein immunofloerscence signal
ageinteger, age at diagnosis
Tstageinteger, tumor stage
nodefactor, node stage
HRlogical, hormone positive status
histologyinteger, histology grade
Her2logical, Her2 status
racecharacter, race, White, Black, Asian, Native Hawaiian or Other Pacific Islander, American Indian or Alaska Native, Unknown
adj_chemological, whether completed adjuvant chemo treatment
adj_radinteger, adjuvant radiation treatment, 0 = unknown, 1 = done, 2 = NOT done
Details
The groupedHyperframe Ki67 is the complete data, to be used in examples of downstream packages
maxEff and hyper.gam.
Extract Parts of 'cumv' Object
Description
Extract Parts of 'cumv' Object
Usage
## S3 method for class 'cumv'
x[i]
Arguments
x |
a |
i |
Extract Subset of groupedHyperframe
Description
Extract Subset of groupedHyperframe
Usage
## S3 method for class 'groupedHyperframe'
x[...]
Arguments
x |
|
... |
additional parameters of [.hyperframe |
Value
The function [.groupedHyperframe returns a groupedHyperframe or a hyperframe.
[.ppp_tzh
Description
[.ppp_tzh
Usage
## S3 method for class 'ppp_tzh'
x[i, j, drop = FALSE, ..., clip = FALSE]
Arguments
x |
an object of internal class |
i, j |
see function [.ppp |
drop |
.. |
... |
.. |
clip |
.. |
Value
The function `[.ppp_tzh` returns a ppp.object,
not an object of class 'ppp_tzh'.
Aggregate Hyper Data Frame
Description
Aggregate Hyper Data Frame
Usage
## S3 method for class 'hyperframe'
aggregate(x, by, ...)
Arguments
x |
|
by |
a one-sided formula,
containing regular-column names of the input |
... |
additional parameters of the function |
Value
The function aggregate.hyperframe() returns a hyperframe.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Aggregate vectorlist
Description
Aggregate vectorlist
Usage
## S3 method for class 'vectorlist'
aggregate(x, by, fun = pmean, ...)
Arguments
x |
a |
by |
|
fun |
function, aggregation method,
currently supports functions
|
... |
additional parameters, currently of no use |
aggregate the marks of ppp-Related Object
Description
To aggregate the marks of a ppp-related object, e.g.,
a
ppplistthe ppp-hypercolumn of a hyperframe
Usage
aggregate_marks(x, by, FUN, expr, ..., vectorize = FALSE)
## S3 method for class 'ppp'
aggregate_marks(x, by, FUN, expr, ..., vectorize = FALSE)
## S3 method for class 'ppplist'
aggregate_marks(x, ...)
## S3 method for class 'hyperframe'
aggregate_marks(x, ...)
Arguments
x |
see Usage |
by, FUN, ... |
additional parameters of the function aggregate.data.frame |
expr |
expression, only used when |
vectorize |
logical scalar (default value |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Append to Existing marks
Description
Append an additional mark to existing marks.
Usage
append_marks(x) <- value
## S3 replacement method for class 'ppp'
append_marks(x) <- value
## S3 replacement method for class 'tess'
append_marks(x) <- value
## S3 replacement method for class 'psp'
append_marks(x) <- value
Arguments
x |
currently only ppp.object is supported |
value |
Value
The S3 method dispatch append_marks<-.ppp returns a ppp.object.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Convert a listof fv.objects into 'fvlist'
Description
Convert a listof fv.objects into 'fvlist'
Usage
as.fvlist(X, data.name)
Arguments
X |
|
data.name |
character scalar, name of |
Value
The function as.fvlist() returns an invisible list.
Creation of groupedHyperframe
Description
To create a groupedHyperframe object
Usage
as.groupedHyperframe(x, group, ...)
## S3 method for class 'hyperframe'
as.groupedHyperframe(x, group, ...)
## S3 method for class 'data.frame'
as.groupedHyperframe(x, group, ...)
## S3 method for class 'groupedData'
as.groupedHyperframe(x, group, ...)
Arguments
x |
see Usage |
group |
|
... |
additional parameters |
Value
The function as.groupedHyperframe() returns a groupedHyperframe.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
as.list.fvlist()
Description
Converts an fvlist to a simple list
Usage
## S3 method for class 'fvlist'
as.list(x, ...)
Arguments
x |
|
... |
additional parameters, currently of no use |
Convert pairwise_cor_spatial to matrix
Description
Convert pairwise_cor_spatial to matrix
Usage
## S3 method for class 'pairwise_cor_spatial'
as.matrix(x, ...)
Arguments
x |
|
... |
additional parameters, currently not in use |
Value
The function as.matrix.pairwise_cor_spatial() returns a matrix.
as.vectorlist
Description
Usage
as.vectorlist(x, ...)
Arguments
x |
an anylist |
... |
additional parameters of the function |
A Batch Process of attr
Description
A Batch Process of attr
Usage
attr_(x, which, exact = TRUE)
## S3 method for class 'anylist'
attr_(x, which, exact = TRUE)
## S3 method for class 'hyperframe'
attr_(x, which, exact = TRUE)
Arguments
x |
see Usage |
which, exact |
parameters of the function attr |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Batch Process
Description
See workhorse function op_hyperframe().
Usage
Emark_(X, ...)
## S3 method for class 'hyperframe'
Emark_(X, correction = "none", ...)
## S3 method for class 'ppplist'
Emark_(X, correction = "none", ...)
## S3 method for class 'ppp'
Emark_(X, ...)
Vmark_(X, ...)
## S3 method for class 'hyperframe'
Vmark_(X, correction = "none", ...)
## S3 method for class 'ppplist'
Vmark_(X, correction = "none", ...)
## S3 method for class 'ppp'
Vmark_(X, ...)
Kmark_(X, ...)
## S3 method for class 'hyperframe'
Kmark_(X, correction = "none", ...)
## S3 method for class 'ppplist'
Kmark_(X, correction = "none", ...)
## S3 method for class 'ppp'
Kmark_(X, ...)
markcorr_(X, ...)
## S3 method for class 'hyperframe'
markcorr_(X, correction = "none", ...)
## S3 method for class 'ppplist'
markcorr_(X, correction = "none", ...)
## S3 method for class 'ppp'
markcorr_(X, ...)
markvario_(X, ...)
## S3 method for class 'hyperframe'
markvario_(X, correction = "none", ...)
## S3 method for class 'ppplist'
markvario_(X, correction = "none", ...)
## S3 method for class 'ppp'
markvario_(X, ...)
Gcross_(X, ...)
## S3 method for class 'hyperframe'
Gcross_(X, correction = "none", ...)
## S3 method for class 'ppplist'
Gcross_(X, correction = "none", ...)
## S3 method for class 'ppp'
Gcross_(X, ...)
Jcross_(X, ...)
## S3 method for class 'hyperframe'
Jcross_(X, correction = "none", ...)
## S3 method for class 'ppplist'
Jcross_(X, correction = "none", ...)
## S3 method for class 'ppp'
Jcross_(X, ...)
Kcross_(X, ...)
## S3 method for class 'hyperframe'
Kcross_(X, correction = "none", ...)
## S3 method for class 'ppplist'
Kcross_(X, correction = "none", ...)
## S3 method for class 'ppp'
Kcross_(X, ...)
Lcross_(X, ...)
## S3 method for class 'hyperframe'
Lcross_(X, correction = "none", ...)
## S3 method for class 'ppplist'
Lcross_(X, correction = "none", ...)
## S3 method for class 'ppp'
Lcross_(X, ...)
markconnect_(X, ...)
## S3 method for class 'hyperframe'
markconnect_(X, correction = "none", ...)
## S3 method for class 'ppplist'
markconnect_(X, correction = "none", ...)
## S3 method for class 'ppp'
markconnect_(X, ...)
nncross_(X, ...)
## S3 method for class 'hyperframe'
nncross_(X, ...)
## S3 method for class 'ppplist'
nncross_(X, ...)
## S3 method for class 'ppp'
nncross_(X, ...)
Arguments
X |
|
... |
additional parameters of user operation |
correction |
character scalar,
see functions
markcorr,
Gcross,
etc.
Default |
Details
User Interface of Operations on hyperframe with One-and-Only-One ppp-hypercolumn
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Examples
# in \CRANpkg{spatstat.data}
# no good example for [Emark_]
# no hyperframe with ppp-hypercolumn with numeric marks
fluM = spatstat.data::flu |>
spatstat.geom::subset.hyperframe(subset = (stain == 'M2-M1') & (virustype == 'wt'))
fluM
r = seq.int(from = 0, to = 100, by = 5)
fluM |>
nncross_(i = 'M1', j = 'M2')
bibentry for Quarto Book
Description
bibentry for Quarto Book
Usage
bioinformatics_btaf430
Format
An object of class bibentry of length 1.
cbind.groupedHyperframe()
Description
cbind.groupedHyperframe()
Usage
## S3 method for class 'groupedHyperframe'
cbind(...)
Arguments
... |
see the function cbind.hyperframe,
the first element must be |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
.Defunct Messages using Package cli
Description
Internal helper functions, to display beautiful .Defunct messages using package cli.
Usage
cli_doi_(doi)
cli_book_(fmt, author = "tingtingzhan", pub, chapter, print_chapter = TRUE)
cli_QuartoPub_(...)
cli_Netlify_(...)
cli_RPubs_(...)
Arguments
doi |
character scalar |
author |
character scalar |
pub |
character scalar |
chapter |
character scalar |
Examples
cli_RPubs_(pub = 'groupedHyperframe')
cli_QuartoPub_(pub = 'groupedhyperframe')
cli_QuartoPub_(pub = 'groupedhyperframe', chapter = 'bioinformatics_btaf430')
cli_Netlify_(pub = 'groupedhyperframe')
cli_Netlify_(pub = 'groupedhyperframe', chapter = 'bioinformatics_btaf430')
cli_doi_('10.1002/bimj.4710230408')
Cumulative Average Vertical Height of Trapezoidal Integration
Description
Cumulative trapezoidal integration divided by x-domain.
Usage
cumvtrapz(x, ...)
## S3 method for class 'numeric'
cumvtrapz(x, y, ..., rm1 = TRUE)
## S3 method for class 'fv'
cumvtrapz(x, key = fvnames(x, a = ".y"), .x = fvnames(x, a = ".x"), ...)
## S3 method for class 'fvlist'
cumvtrapz(x, mc.cores = getOption("cores"), ...)
## S3 method for class 'hyperframe'
cumvtrapz(x, ...)
Arguments
x |
|
... |
|
y |
see function cumtrapz |
rm1 |
logical scalar, whether to remove the first |
key, .x |
character scalars |
mc.cores |
integer scalar, see function mclapply. Default is the return of the function detectCores. |
Value
The function vtrapz.*() return a numeric scalar.
Note
This is a tentative thought: the prefix v stands for 'vertical'.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Defunct Functions
Description
The functions mentioned in hard-copy journals, but later .Defunct.
Usage
aggregate_quantile(...)
Arguments
... |
Defunct parameters |
Kernel density of marks
Description
Usage
density_marks(x, ...)
## S3 method for class 'ppp'
density_marks(x, ...)
## S3 method for class 'ppplist'
density_marks(x, ...)
Arguments
x |
a ppp.object, or |
... |
additional parameters of the function density.default |
Details
The function density_marks() finds
the kernel density of the marks.
Value
The function density_marks() returns
a numeric vector.
Note
The function spatstat.explore::density.ppp() is for x- and y-coords only!
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Tentative Fix for Illegal Function Value in fv.object
Description
Tentative Fix for Illegal Function Value in fv.object
Usage
.illegal2theo(X, ...)
.disrecommend2theo(X, ...)
## S3 method for class 'fv'
.illegal2theo(X, key = fvnames(X, a = ".y"), .x = fvnames(X, a = ".x"), ...)
## S3 method for class 'fv'
.disrecommend2theo(
X,
key = fvnames(X, a = ".y"),
.x = fvnames(X, a = ".x"),
...
)
## S3 method for class 'fvlist'
.illegal2theo(X, ...)
## S3 method for class 'fvlist'
.disrecommend2theo(X, ...)
## S3 method for class 'hyperframe'
.illegal2theo(X, ...)
## S3 method for class 'hyperframe'
.disrecommend2theo(X, ...)
Arguments
X |
an fv.object |
key, .x |
character scalars |
Get Nested Levels
Description
Get Nested Levels
Usage
get_nested(group)
get_nested_factors(group, data)
Arguments
group |
a language object, (nested) grouping structure |
data |
Global Envelope Test in Bath Process
Description
Global Envelope Test in Bath Process
Usage
global_envelope_test_(x, ...)
## S3 method for class 'anylist'
global_envelope_test_(x, ...)
## S3 method for class 'hyperframe'
global_envelope_test_(x, ...)
Arguments
x |
see Usage |
... |
parameters (except the first) of the function global_envelope_test |
groupGeneric of 'fvlist'
Description
...
Usage
## S3 method for class 'fvlist'
Math(x, ...)
## S3 method for class 'fvlist'
Summary(..., na.rm = FALSE)
Arguments
x |
an |
... |
additional parameters for the groupGeneric functions |
na.rm |
logical scalar |
Value
The function Math.fvlist() returns an 'fvlist'.
The function Summary.fvlist() ..
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
groupGeneric of ppp.object
Description
...
Usage
## S3 method for class 'ppp'
Math(x, ...)
## S3 method for class 'ppp'
Summary(..., na.rm = FALSE)
Arguments
x |
|
... |
additional parameters for the groupGeneric functions |
na.rm |
logical scalar |
Details
The function Math.ppp() performs Math operations on the numeric marks
of a ppp.object.
The function Summary.ppp() ..
Value
The function Math.ppp() returns a ppp.object.
The function Summary.ppp() ..
groupGeneric of 'ppplist'
Description
...
Usage
## S3 method for class 'ppplist'
Math(x, ...)
## S3 method for class 'ppplist'
Summary(..., na.rm = FALSE)
Arguments
x |
an |
... |
additional parameters for the groupGeneric functions |
na.rm |
logical scalar |
Value
The function Math.ppplist() returns a 'ppplist'.
The function Summary.ppplist() ...
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
groupGeneric of psp.object
Description
...
Usage
## S3 method for class 'psp'
Math(x, ...)
## S3 method for class 'psp'
Summary(..., na.rm = FALSE)
Arguments
x |
|
... |
additional parameters for the groupGeneric functions |
na.rm |
logical scalar |
Details
The function Math.psp() performs Math operations on the numeric marks
of a psp.object.
The function Summary.psp() ..
Value
The function Math.psp() returns a psp.object.
The function Summary.psp() ..
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
groupGeneric of tessellation
Description
...
Usage
## S3 method for class 'tess'
Math(x, ...)
## S3 method for class 'tess'
Summary(..., na.rm = FALSE)
Arguments
x |
a tessellation |
... |
additional parameters for the groupGeneric functions |
na.rm |
logical scalar |
Details
The function Math.tess() performs Math operations on the numeric marks
of a tessellation.
The function Summary.tess() ..
Value
The function Math.tess() returns a ppp.object.
The function Summary.tess() ..
groupedHyperframe with One-and-Only-One ppp-hypercolumn
Description
..
Usage
grouped_ppp(
formula,
data,
coords = ~x + y,
window = owin(xrange = range(.x), yrange = range(.y)),
...
)
Arguments
formula |
formula in the format of
|
data |
|
coords |
formula, variable names
of |
window |
an observation window owin,
default is the |
... |
additional parameters, currently not in use |
Value
The function grouped_ppp() returns a groupedHyperframe
with one-and-only-one
ppp-hypercolumn.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/nonS3/grouped_ppp_appx.html
Interpolation of fv.object
Description
Interpolation of fv.object
Usage
approxfun.fv(x, key = fvnames(fv, a = ".y"), .x = fvnames(fv, a = ".x"), ...)
splinefun.fv(x, key = fvnames(fv, a = ".y"), .x = fvnames(fv, a = ".x"), ...)
interpSpline_.fv(
x,
key = fvnames(fv, a = ".y"),
.x = fvnames(fv, a = ".x"),
...
)
Arguments
x |
an fv.object |
key, .x |
character scalars |
... |
additional parameters of the functions approxfun, splinefun and interpSpline |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Inspect a listof fv.objects
Description
A helper function to check the validity of a listof fv.objects.
Usage
is.fvlist(X)
Arguments
X |
Value
The function is.fvlist() returns a logical scalar with attributes
attr(,'r')x-axis, or ther-valuesattr(,'fname')see explanation of this attributes in function fv
attr(,'.x')spatstat.explore::fvnames(x, a = '.x')returnsattr(,'.y')spatstat.explore::fvnames(x, a = '.y')returns
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Is marks of ppp.object numeric ?
Description
Is marks of ppp.object numeric ?
Usage
## S3 method for class 'ppp'
is.numeric(x)
Arguments
x |
is.vectorlist
Description
Usage
is.vectorlist(
x,
mode = c("any", "logical", "integer", "numeric", "double", "character")
)
Arguments
x |
an anylist |
mode |
character scalar other than |
Kernel Density via density.default
Description
Kernel density estimates only.
Usage
kerndens(x, ...)
## S3 method for class 'numeric'
kerndens(x, ...)
## S3 method for class 'ppp'
kerndens(x, ...)
## S3 method for class 'ppplist'
kerndens(x, ...)
## S3 method for class 'anylist'
kerndens(x, ...)
## S3 method for class 'hyperframe'
kerndens(x, ...)
Arguments
x |
see Usage |
... |
additional parameters of the function density.default |
Details
The function kerndens() finds
the estimated density values,
i.e., element $y of the function density.default return.
Value
The function kerndens() returns
a numeric vector.
Note
Do not overwrite function spatstat.explore::density.ppp() !!
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Black-Solid-Curve in plot.fv
Description
Name and value of the black solid curve as shown in plot.fv, i.e., the primary outcome of an fv.object.
Usage
keyval(x, ...)
## S3 method for class 'fv'
keyval(x, key = fvnames(x, a = ".y"), .x = fvnames(x, a = ".x"), ...)
## S3 method for class 'fvlist'
keyval(x, key = attr(x., which = ".y", exact = TRUE), ...)
## S3 method for class 'hyperframe'
keyval(x, ...)
Arguments
x |
see Usage |
... |
additional parameters, currently of no use |
key, .x |
character scalars |
Details
The function keyval.fv() finds the value of the (primary) outcome
of an fv.object.
Value
The function keyval.fv() returns a numeric vector.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Pseudo S3 Methods based on kmeans
Description
Pseudo S3 Methods based on kmeans
Usage
kmeans.ppp(
x,
formula,
centers = as.integer(ceiling((x[["n"]]/clusterSize))),
clusterSize,
...
)
kmeans.ppplist(x, ...)
kmeans.hyperframe(x, ...)
Arguments
x |
see Usage |
formula |
|
centers |
|
clusterSize |
integer scalar, number of points per cluster |
... |
additional parameters of the function kmeans |
Value
The function kmeans.ppp() returns an object of class 'pppkm',
which inherits from ppp.object.
The function kmeans.ppplist() returns an object of class 'pppkmlist',
which inherits from 'ppplist'.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
ksmooth of fv.object
Description
Usage
ksmooth.fv(x, key = fvnames(fv, a = ".y"), .x = fvnames(fv, a = ".x"), ...)
Arguments
x |
an fv.object |
key, .x |
character scalars |
... |
additional parameters of the functions
ksmooth, except for |
Last Legal Index
Description
Last Legal Index
Usage
lastLegal(v)
Arguments
v |
Details
Legal, meaning not 0, not NaN and not Inf.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/nonS3/lastLegal.html
S3 method dispatch of length on hyperframe
Description
S3 method dispatch of length on hyperframe
Usage
## S3 method for class 'hyperframe'
length(x)
Arguments
x |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
See Also
loess of fv.object
Description
Usage
loess.fv(x, key = fvnames(fv, a = ".y"), .x = fvnames(fv, a = ".x"), ...)
Arguments
x |
an fv.object |
key, .x |
character scalars |
... |
additional parameters of the functions
loess, except for |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Check if Data Column is Identical by Grouping
Description
Check if Data Column is Identical by Grouping
Usage
mc_identical_by(data, f, mc.cores = getOption("cores"), ...)
Arguments
data |
|
f |
|
mc.cores |
integer scalar, see function mclapply. Default is the return of the function detectCores. |
... |
additional parameters, currently not in use |
Note
The function aggregate.data.frame does not do parallel computing.
The function collapse::collap does not support Surv column.
Look more into nlme:::collapse.groupedData
S3 methods table in vignette
Description
S3 methods table in vignette
Usage
methods2kable(
generic.function,
class,
package,
package_pattern,
backtick = TRUE,
...
)
Arguments
generic.function, class |
see function methods |
package |
character scalar |
package_pattern |
|
backtick |
logical scalar, whether to put backticks around function names.
Default |
... |
additional parameters of the function methods |
Value
The function methods2kable() returns a data.frame.
Handle Missing marks in ppp.object.
Description
Handle Missing marks in ppp.object.
Usage
## S3 method for class 'ppp'
na.omit(object, ...)
## S3 method for class 'ppp'
na.exclude(object, ...)
Arguments
object |
|
... |
additional parameters, currently not in use |
Details
The function na.omit.ppp() omits missing marks in a ppp.object.
Value
The function na.omit.ppp() returns a ppp.object.
Note
tzh suppose missing $x and $y are
forbidden in ppp.object anyway.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Operations on hyperframe with One-and-Only-One ppp-hypercolumn
Description
Create hypercolumn(s) of fv.objects or distances from the one-and-only-one ppp-hypercolumn inside a hyperframe.
Usage
op_hyperframe(X, ...)
Arguments
X |
a hyperframe, containing one-and-only-one ppp-hypercolumn |
... |
additional parameters of the function |
Value
The function op_hyperframe() returns a hyperframe.
Batch Operations of 'ppplist' Object
Description
Batch operations for a 'ppplist' input.
Usage
op_ppplist(x, op, mc.cores = getOption("cores"), ...)
Arguments
x |
a |
op |
workhorse function, either |
mc.cores |
integer scalar, see function mclapply. Default is the return of the function detectCores. |
... |
additional parameters of workhorse functions
|
Details
The function op_ppplist() is a parallel batch process of
the workhorse function ppp_numeric2fv(), ppp_multitype2fv() or ppp2dist().
Value
The function op_ppplist() returns a listof
function
ppp_numeric2fv()returns, ifop = ppp_numeric2fv.function
ppp_multitype2fv()returns, ifop = ppp_multitype2fv.function
ppp2dist()returns, ifop = ppp2dist.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Pairwise Tjostheim's Coefficient
Description
Pairwise Tjostheim's Coefficient
Usage
pairwise_cor_spatial(x, ...)
## S3 method for class 'ppp'
pairwise_cor_spatial(x, ...)
## S3 method for class 'ppplist'
pairwise_cor_spatial(x, ...)
Arguments
x |
see Usage |
... |
additional parameters, currently not in use |
Details
Workhorse function cor.spatial.
Value
The function pairwise_cor_spatial() returns a dist object.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Plot 'pppkm' object
Description
Plot 'pppkm' object
Usage
## S3 method for class 'pppkm'
plot(
x,
main = "k-Means Clustering",
...,
cols = pal_hue()(n = length(levels(f)))
)
Arguments
x |
a |
main, ..., cols |
additional parameters of the function plot.ppp |
Parallel mean and median
Description
Usage
pmean(..., na.rm = TRUE)
pmedian(..., na.rm = TRUE)
Arguments
... |
|
na.rm |
logical scalar, default |
Value
The functions pmean() and pmedian() return a numeric vector.
Note
The functions pmean() and pmedian() mimic functions pmax.int and pmin.int.
They are written in a very naive way.
The pipeline cbind() |> rowMeans() is extremely slow.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/nonS3/pmean.html
Examples
pmean(1:3, c(11, 12, 14), c(21, 22, 25))
Operations on ppp.object
Description
Create fv.objects or distances from a ppp.object.
Usage
ppp2dist(x, fun, ...)
ppp_numeric2fv(x, fun, ...)
ppp_multitype2fv(x, fun, ...)
Arguments
x |
|
fun |
a distance function, or a function that returns an fv.object, see Details |
... |
additional parameters of the function |
Value
The functions ppp_numeric2fv() and ppp_multitype2fv() return a listof
fv.objects.
The function ppp2dist() returns a listof
double vectors.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Print 'cumv' Object
Description
Print 'cumv' Object
Usage
## S3 method for class 'cumv'
print(x, ...)
Arguments
x |
a |
... |
additional parameters, currently of no use |
Print 'fvlist'
Description
Print 'fvlist'
Usage
## S3 method for class 'fvlist'
print(x, ...)
Arguments
x |
an |
... |
additional parameters, currently of no use |
Print groupedHyperframe
Description
Print groupedHyperframe
Usage
## S3 method for class 'groupedHyperframe'
print(x, ...)
Arguments
x |
|
... |
additional parameters, currently not in use |
Value
The function print.groupedHyperframe() does not have a returned value.
See Also
?nlme:::print.groupedData
Print 'pppkm' object
Description
Print 'pppkm' object
Usage
## S3 method for class 'pppkm'
print(x, ...)
Arguments
x |
a |
... |
additional parameters, currently no use |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Print Summary Information of groupedHyperframe
Description
Print Summary Information of groupedHyperframe
Usage
## S3 method for class 'summary.groupedHyperframe'
print(x, ...)
Arguments
x |
a summary.groupedHyperframe object |
... |
additional parameters, currently not in use |
Value
The function print.summary.groupedHyperframe() does not have a returned value.
Print a 'vectorlist'
Description
Print a 'vectorlist'
Usage
## S3 method for class 'vectorlist'
print(x, ...)
Arguments
x |
a |
... |
additional parameters, currently of no use |
Quantiles of numeric marks in anylist
Description
Quantiles of numeric marks in anylist
Usage
## S3 method for class 'anylist'
quantile(x, ...)
Arguments
x |
an anylist |
... |
additional parameters of the function |
Quantiles of numeric elements in hyperframe
Description
Quantiles of numeric elements in hyperframe
Usage
## S3 method for class 'hyperframe'
quantile(x, ...)
Arguments
x |
|
... |
additional parameters of the function |
Quantiles of numeric marks in ppp.object
Description
Quantiles of numeric marks in ppp.object
Usage
## S3 method for class 'ppp'
quantile(x, ...)
Arguments
x |
|
... |
additional parameters of the function |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Quantiles of numeric marks in 'ppplist'
Description
Quantiles of numeric marks in 'ppplist'
Usage
## S3 method for class 'ppplist'
quantile(x, ...)
Arguments
x |
a |
... |
additional parameters of the function |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
rds2versiondate
Description
Usage
rds2versiondate(x, pkg, format = "%a %b %d, %Y", ...)
Arguments
x |
matrix, e.g., from https://cran.r-project.org/web/packages/packages.rds |
pkg |
|
format |
Date format, see functions format.Date and strptime for detail |
... |
additional parameters, currently of no use |
Random Re-Labelling Envelope Residual
Description
Random Re-Labelling Envelope Residual
Usage
rlabelRes(x, ...)
## S3 method for class 'ppp'
rlabelRes(x, ...)
## S3 method for class 'ppplist'
rlabelRes(x, ...)
## S3 method for class 'hyperframe'
rlabelRes(x, ...)
Arguments
x |
see Usage |
... |
arguments of the function envelope.ppp,
other than parameters |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Examples
set.seed(52); res1_anemones = spatstat.data::anemones |>
rlabelRes(fun = spatstat.explore::Kmark)
set.seed(52); res1_anemones_times = spatstat.data::anemones |>
rlabelRes(fun = spatstat.explore::Kmark, f = `*`)
stopifnot(!identical(res1_anemones, res1_anemones_times))
set.seed(52); spatstat.data::anemones |>
rlabelRes(fun = spatstat.explore::Kmark, f = \(m1, m2) { m1*m2 }) |>
identical(y = res1_anemones_times) |>
stopifnot()
set.seed(12); res_ants = spatstat.data::ants |>
rlabelRes(fun = spatstat.explore::Gcross)
Default r_\text{max} of Various Functions in Package spatstat.explore
Description
Default r_\text{max} of Various Functions in Package spatstat.explore
Usage
.rmax(X, ...)
## S3 method for class 'ppp'
.rmax(X, fun, i, j, ...)
## S3 method for class 'fv'
.rmax(X, ...)
## S3 method for class 'ppplist'
.rmax(X, ...)
## S3 method for class 'hyperframe'
.rmax(X, ...)
Arguments
X |
a ppp.object with one numeric or multi-type marks |
... |
additional parameters, currently of no use |
fun |
character scalar, see (the un-documented) function rmax.rule |
i, j |
character scalars, see functions Gcross, Kcross, Jcross, etc. |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
smooth.spline of fv.object
Description
Usage
smooth.spline.fv(
x,
key = fvnames(fv, a = ".y"),
.x = fvnames(fv, a = ".x"),
...
)
Arguments
x |
an fv.object |
key, .x |
character scalars |
... |
additional parameters of the functions
smooth.spline, except for |
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
split.hyperframekm()
Description
Usage
## S3 method for class 'hyperframekm'
split(x, ...)
Arguments
x |
a |
... |
additional parameters, currently no use |
Value
The function split.hyperframekm() returns a 'groupedHyperframe'.
Split 'pppkm' object
Description
Split 'pppkm' object
Usage
## S3 method for class 'pppkm'
split(x, f = attr(x, which = "f", exact = TRUE), ...)
Arguments
x |
a |
f |
factor, default is |
... |
additional parameters, currently no use |
Value
The function split.pppkm() returns a 'splitppp' object from the
workhorse function split.ppp.
split.pppkmlist
Description
split.pppkmlist
Usage
## S3 method for class 'pppkmlist'
split(x, ...)
Arguments
x |
a |
... |
additional parameters, currently no use |
Value
The function split.pppkmlist() returns a 'splitppp' object from the
workhorse function split.ppp.
Summary Information of Surv Object
Description
The missing S3 method of the generic function summary for Surv object.
Usage
## S3 method for class 'Surv'
summary(object, ...)
Arguments
object |
a Surv object |
... |
additional parameters, currently of no use |
Value
The function summary.Surv() returns a character vector.
Note
Without function summary.Surv(),
the S3 generic function summary dispatches to function summary.default
if the input is a Surv object.
See Also
Examples
aml2 = survival::aml |>
within.data.frame(expr = {
os = survival::Surv(time = time, event = status)
time = status = NULL
})
summary(aml2$os)
summary(aml2)
heart2 = survival::heart |>
within.data.frame(expr = {
os = survival::Surv(time = start, time2 = stop, event = event)
start = stop = event = NULL
})
summary(heart2$os)
summary(heart2)
Summary Information of groupedHyperframe
Description
Summary Information of groupedHyperframe
Usage
## S3 method for class 'groupedHyperframe'
summary(object, ...)
Arguments
object |
|
... |
additional parameters, currently not in use |
Value
The function summary.groupedHyperframe() returns an R object of class 'summary.groupedHyperframe'.
superimpose.hyperframe
Description
superimpose.hyperframe
Usage
## S3 method for class 'hyperframe'
superimpose(...)
Arguments
... |
one or more hyperframes or groupedHyperframes |
Value
The function superimpose.hyperframe() returns a
hyperframe or groupedHyperframe.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Transpose a 'vectorlist'
Description
Transpose a 'vectorlist'
Usage
## S3 method for class 'vectorlist'
t(x)
Arguments
x |
a |
Details
tzh defines a derived class 'vectorlist',
i.e., a listof vectors,
which inherits from
anylist.
The implementation of 'vectorlist' is
inspired by class solist.
The S3 method dispatch t.vectorlist(),
of the generic function t,
transposes a 'vectorlist' of equi-length.
We illustrate this concept using data set
Kovesi in Examples.
Value
The S3 method dispatch t.vectorlist() returns
a 'vectorlist' of equi-length.
Note
The motivation of
the derived class 'vectorlist' and
the method dispatch t.vectorlist()
is that
The function with.hyperframe
could be slow in a batch process.
References
https://tingtingzhan.quarto.pub/groupedhyperframe/topics.html
Visualize vtrapz() and cumvtrapz()
Description
Visualize (cumulative) average vertical height of trapezoidal integration.
Usage
visualize_vtrapz(
x,
y,
x_smooth,
y_smooth,
xlabs,
ylabs,
yname,
draw.rect,
draw.v,
label.v,
draw.cumv,
label.cumv,
...
)
## S3 method for class 'numeric'
visualize_vtrapz(
x,
y,
x_smooth = x,
y_smooth = y,
xlabs,
ylabs,
yname,
draw.rect = TRUE,
draw.v = draw.rect,
label.v = "Average Vertical Height",
draw.cumv = TRUE,
label.cumv = "Cumulative Average Vertical Height",
...
)
## S3 method for class 'fv'
visualize_vtrapz(x, ...)
## S3 method for class 'listof'
visualize_vtrapz(x, ...)
## S3 method for class 'density'
visualize_vtrapz(x, ...)
## S3 method for class 'stepfun'
visualize_vtrapz(x, ...)
## S3 method for class ''function''
visualize_vtrapz(x, ..., n = 513L)
## S3 method for class 'loess'
visualize_vtrapz(x, ..., n = 513L)
## S3 method for class 'smooth.spline'
visualize_vtrapz(x, ..., n = 513L)
## S3 method for class 'ksmooth'
visualize_vtrapz(x, ...)
## S3 method for class 'spline'
visualize_vtrapz(x, ..., n = 513L)
## S3 method for class 'xyVector'
visualize_vtrapz(x, ...)
Arguments
x |
see Usage |
y |
|
x_smooth, y_smooth |
numeric vectors,
smoothed |
xlabs, ylabs |
|
yname |
(optional) character scalar, name of the function |
draw.rect |
logical scalar,
whether to plot the rectangle, default |
draw.v |
logical scalar,
whether to plot the average vertical height |
label.v, label.cumv |
character scalars |
draw.cumv |
logical scalar, whether to plot the cumulative average vertical height |
... |
additional parameters, currently of no use |
n |
integer, number of |
Value
The S3 generic function visualize_vtrapz() returns a ggplot object.
Average Vertical Height of Trapezoidal Integration
Description
Trapezoidal integration divided by x-domain.
Usage
vtrapz(x, ...)
Arguments
x |
|
... |
additional parameters of the function trapz |
Value
The function vtrapz() return a numeric scalar.
Note
This is a tentative thought: the prefix v stands for 'vertical'.
wrobel_lung
Description
From Dr. Julia Wrobel's data https://sph.emory.edu/profile/faculty/julia-wrobel.
Usage
wrobel_lung