Learn R Programming

osmose (version 3.3.4)

get_var.osmose: get_var method for osmose outputs objects

Description

Get a variable from an osmose object.

Usage

# S3 method for osmose
get_var(object, what, how = c("matrix", "list"), expected = FALSE, ...)

Arguments

object

Object of osmose class (see the read_osmose function).

what

Name of variable to extract. See Details.

how

How to return the object. Current options are "matrix" and "list".

expected

A logical parameter. If TRUE, the average over the last dimensions will be performed (only if the output is an array).

...

Additional arguments of the function.

Value

An matrix or a list containing the data.

Details

what can be any available variable contained on object (e.g. biomass, abundance, yield, yieldN, etc).