Learn R Programming

raptr (version 0.0.3)

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)

Arguments

x

RapResults or RapSolved object.

y

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

Value

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

See Also

RapResults, RapSolved.

Examples

Run this code
# NOT RUN {
# load data
data(sim_rs)
# score for best solution
score(sim_rs, 0)
# score for second solution
score(sim_rs, 2)
# score for all solutions
score(sim_rs, NULL)
# }

Run the code above in your browser using DataLab