| Type: | Package |
| Title: | Grouped Hyper Data Frame |
| Version: | 0.4.1 |
| Date: | 2026-05-19 |
| Description: | To aggregate a hyper data frame, defined in the package 'spatstat.geom', according to a grouping structure. To facilitate downstream analysis based on a "grouped" hyper data frame. |
| LazyData: | true |
| LazyDataCompression: | xz |
| Encoding: | UTF-8 |
| License: | GPL-2 |
| Language: | en-US |
| URL: | https://github.com/tingtingzhan/groupedHyperframe |
| Depends: | R (≥ 4.6) |
| Imports: | cli, spatstat.geom |
| Suggests: | survival, spatstat.data |
| Config/roxygen2/version: | 8.0.0 |
| Config/roxygen2/markdown: | TRUE |
| NeedsCompilation: | no |
| Packaged: | 2026-05-19 10:30:31 UTC; tingtingzhan |
| Author: | Tingting Zhan |
| Maintainer: | Tingting Zhan <tingtingzhan@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-05-19 21:20:12 UTC |
groupedHyperframe: Grouped Hyper Data Frame
Description
To aggregate a hyper data frame, defined in the package 'spatstat.geom', according to a grouping structure. To facilitate downstream analysis based on a "grouped" hyper data frame.
Author(s)
Maintainer: Tingting Zhan tingtingzhan@gmail.com (ORCID)
Authors:
Tingting Zhan tingtingzhan@gmail.com (ORCID)
See Also
Useful links:
Ki67 Data
Description
Ki67 cell data containing 622 patients.
Usage
Ki67
Format
patientIDfactor, unique patient identifier
tissueIDfactor, TMA core identifier
PFSSurv, recurrence
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
Aggregate Hyper Data Frame
Description
To aggregate a hyperframe.
Usage
## S3 method for class 'hyperframe'
aggregate(x, by, ...)
Arguments
x |
|
by |
two-sided formula,
whose right-hand-side contains only the regular-column names of the input |
... |
additional parameters of the function aggregate.data.frame,
except for |
Value
The S3 method aggregate.hyperframe() returns a hyperframe.
Aggregate, an Alternative formula-Interface
Description
An alternative aggregation function with a formula-interface, to avoid the cbind-operation in the function aggregate.formula.
Usage
aggregate2(data, by, ...)
Arguments
data |
|
by |
a two-sided formula |
... |
additional parameters of the function aggregate.data.frame,
except for |
Details
The cbind-operation in the function aggregate.formula messes up with column(s) that are
The function aggregate.data.frame only accepts
a list of factors for the parameter by.
Therefore, the function aggregate2() is created to take care of
the factor and Surv columns of the input,
with a formula-interface.
Value
The function aggregate2() returns a data.frame.
Note
The function aggregate.data.frame is the workhorse of the function aggregate.formula.
The function as.hyperframe.data.frame is designed to handle the list-columns returned by the function aggregate.
Handy FUNctions for aggregate
Description
Handy functions to be passed to the parameter FUN of the function aggregate
and/or aggregate2().
Usage
unique_or_identity(x)
Arguments
x |
an R object |
Value
The function unique_or_identity() returns an R object.
Convert R Object to vectorlist
Description
Convert R Object to vectorlist
Usage
as.vectorlist(x, ...)
Arguments
x |
a list |
... |
additional parameters of the function |
Value
The function as.vectorlist() returns an R object of S3 class 'vectorlist'.
Examples
list(rnorm(6L), rnorm(6L)) |>
as.vectorlist()
Augment Hypercolumn(s) for gam
Description
Augment all numeric vector hypercolumns in a hyperframe for gam.
Usage
aug4gam(x, ...)
## S3 method for class 'data.frame'
aug4gam(x, ...)
## S3 method for class 'hyperframe'
aug4gam(x, ...)
## S3 method for class 'vectorlist'
aug4gam(x, ...)
Arguments
x |
see Usage |
... |
additional parameters, currently of no use |
Value
The S3 generic function aug4gam() returns a data.frame.
Author(s)
Tingting Zhan, Erjia Cui
Defunct Functions
Description
The functions mentioned in hard-copy journals, but later .Defunct.
Usage
aggregate_quantile(...)
Arguments
... |
Defunct parameters |
Value
The .Defunct functions do not have a returned value.
Vector-List
Description
To determine if an R object is a list of vectors with the same storage.mode, length and attributes.
Usage
is.vectorlist(
x,
mode = c("logical", "integer", "numeric", "double", "character")
)
Arguments
x |
a listof |
mode |
character scalar other than |
Value
The function is.vectorlist() returns a logical scalar.
Examples
spatstat.data::Kovesi$values |>
is.vectorlist(mode = 'character') |>
stopifnot()
spatstat.data::Kovesi$values |>
is.vectorlist(mode = 'numeric')
Hyper Data Frame with One-and-Only-One ppp-Hyper Column
Description
To create a hyper data frame with one-and-only-one ppp-hyper column.
Usage
pppBy(
marks,
coords = ~x + y,
by,
data,
window = owin(xrange = range(.x), yrange = range(.y)),
...
)
Arguments
marks |
one-sided formula, e.g.,
|
coords |
one-sided formula, variable names
of the |
by |
two-sided formula |
data |
|
window |
observation window owin,
default value is the |
... |
additional parameters of the function ppp |
Value
The function pppBy() returns a hyper data frame
with one-and-only-one
ppp-hyper column.
wrobel_lung
Description
From Dr. Julia Wrobel's data https://sph.emory.edu/profile/faculty/julia-wrobel.
Usage
wrobel_lung