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.
# S3 method for ena.matrix
with(data, expr, ...)
The result of evaluating `expr` in the constructed context.
An ENA matrix or data frame containing the data to be used.
An R expression to be evaluated within the context of the ENA matrix.
Additional arguments, including an optional custom matrix `V` and other parameters.
- 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.