Contents
PolyGeniusFrame
PolyGeniusFrame class
A tibble subclass holding fetched sample-side ("samples") or model-side ("models") tabular
data together with its role metadata. Being a tibble, it passes straight to stats::lm(),
stats::glm() or survival::coxph() through their data = argument, and to any
associate$*()/evaluate$*() function through data =.
Usage
PolyGeniusFrame(
fields,
side = c("samples", "models"),
groups = list(),
source = NULL
)S3 method for class 'PolyGeniusFrame'
x[i, j, drop = FALSE]
print.PolyGeniusFrame(x, ...)Arguments
| Argument | Description |
|---|---|
fields | Named list of column vectors, or anything tibble::as_tibble() accepts. Becomes the frame's columns. |
side | One of "samples" (default), "models". Which axis the rows are on. |
groups | Named list of character vectors, default list(). Maps a role name to the column names in that role. Stored as given; the checks that role names refer to real columns run in roles<-, not here. |
source | Character scalar, or NULL (default). Source label recorded on the frame; NULL records no source attribute at all. |
x | A PolyGeniusFrame. |
i | Row and column indices, as for [ on a tibble. |
j | Row and column indices, as for [ on a tibble. |
drop | Logical scalar, default FALSE. Passed to the base subset method; unlike a plain data frame, a one-column result stays a frame unless drop = TRUE is asked for. |
... | Passed to the underlying tibble printer. |
Value
A tibble with S3 class PolyGeniusFrame, carrying the side and groups attributes
and, when source was supplied, source.
[ returns a PolyGeniusFrame carrying the original side, source and
errors attributes, with each role narrowed to the columns that survived the subset. When
the base method returns something that is not a data frame (a bare column under
drop = TRUE), that value is returned unchanged.
print() returns x invisibly. It writes a side/dimension header, the tibble
itself, and, when the frame carries an errors attribute, the fetch errors below it.
Details
The frame carries three attributes: side, groups (the role mapping, read and written with
roles()) and, when a source label was given, source. Roles hold column names, never data
vectors. A frame produced by a partly failing fetch also carries an errors attribute, which
print() reports below the table.
Where a PolyGeniusFrame comes from
PolyGeniusFrame() is rarely called directly: it is the return type of study$fetch(...),
which evaluates unquoted expressions against a PolyGeniusStudy's planes and packs whatever
resolves at sample length into a side = "samples" frame and whatever resolves at model length
into a side = "models" frame. A fetch touching both sides returns the two frames together in
a PolyGeniusFrameSet instead.
See Also
roles() to read and set the role mapping, PolyGeniusFrameSet for the two-sided
container.
Other study:
PolyGeniusFrameSet(),
PolyGeniusStudy(),
align(),
reduction(),
roles()