Learn R Programming

raptr (version 1.0.1)

score: Solution score

Description

Extract solution score from RapResults() or RapSolved() object.

Usage

score(x, y)

# S3 method for RapResults score(x, y = 0)

# S3 method for RapSolved score(x, y = 0)

Value

matrix or numeric vector with solution score(s) depending on arguments.

Arguments

x

RapResults() or RapSolved() object.

y

Available inputs include: NULL to return all scores, integer number specifying the solution for which the score should be returned, and 0 to return score for the best solution.

See Also

RapResults(), RapSolved().

Examples

Run this code
if (FALSE) {
# load data
data(sim_rs)

# score for the best solution
score(sim_rs, 0)

# score for the second solution
score(sim_rs, 2)

# score for all solutions
score(sim_rs, NULL)
}

Run the code above in your browser using DataLab