as_hce.data.frame: Coerce a data frame to an 'hce' object

View source: R/as_hce.data.frame.R

as_hce.data.frameR Documentation

Coerce a data frame to an hce object

Description

Coerce a data frame to an hce object

Usage

## S3 method for class 'data.frame'
as_hce(x, ...)

Arguments

x

a data frame.

...

additional parameters.

Value

an hce object.

See Also

as_hce(), as_hce.default().

Examples

# The case when all required variables `AVAL0`, `GROUP`, `PADY`, and `TRTP` are present.
KHCE <- as_hce(KHCE)
## Converts to an `adhce` object
class(KHCE)
calcWO(KHCE)
# The case when only `AVAL` and `TRTP`.
## Converts to an `hce` object
dat <- KHCE[, c("TRTP", "AVAL")]
dat <- as_hce(dat)
class(dat)
summaryWO(dat)

hce documentation built on Aug. 23, 2025, 1:11 a.m.