with.ena.matrix: with.ena.matrix

View source: R/ena.rotate.by.regression.2.R

with.ena.matrixR Documentation

with.ena.matrix

Description

This function sets up a context using the provided data (typically an ENA matrix), allowing the evaluation of an expression ('expr') with access to both the matrix and its metadata. Optionally, a custom matrix 'V' and other arguments can be supplied.

Usage

## S3 method for class 'ena.matrix'
with(data, expr, ...)

Arguments

data

An ENA matrix or data frame containing the data to be used.

expr

An R expression to be evaluated within the context of the ENA matrix.

...

Additional arguments, including an optional custom matrix 'V' and other parameters.

Details

- If a custom matrix 'V' is provided in '...', it will be used; otherwise, 'data' is converted to a matrix. - Metadata columns are coerced to numeric if they are character vectors. - The expression is evaluated with access to both the matrix ('V') and metadata.

Value

The result of evaluating 'expr' in the constructed context.


rENA documentation built on Nov. 5, 2025, 5:50 p.m.