Learn R Programming

raptr (version 0.0.3)

amount.held: Extract amount held for a solution

Description

This function returns the amount held for each species in a solution.

Usage

amount.held(x, y, species)

# S3 method for RapSolved amount.held(x, y = 0, species = NULL)

Arguments

x

RapResults or RapSolved object.

y

NULL to return all values, integer 0 to return values for best solution, integer value greater than 0 for y'th solution value.

species

NULL for all species or integer indicating species.

Value

matrix or numeric vector depending on arguments.

See Also

RapResults, RapSolved.

Examples

Run this code
# NOT RUN {
data(sim_rs)
# amount held (\%) in best solution for each species 
amount.held(sim_rs, 0)
# amount held (\%) in best solution for species 1
amount.held(sim_rs, 0, 1)
# amount held (\%) in second solution for each species 
amount.held(sim_rs, 2)
# amount held (\%) in each solution for each species
amount.held(sim_rs, NULL)
# }

Run the code above in your browser using DataLab