Optimize: Simple optimization between discrete index locations

Description Usage Arguments Details Value Author(s) Examples

View source: R/Optimize.R

Description

Finds the minimal value of an ovariable along given indices. Returns sought rows and drops the rest.

Usage

1
2

Arguments

...

arguments passed to Minimize

data

ovariable or data.frame of suitable format (must contain a "Result" column)

indices

character vector of index names meant to be retained (tapply INDEX)

Details

Uses tapply and which.min.

Value

Returns a data.frame which is a subset of the original data.frame or [email protected].

Author(s)

T. Rintala [email protected]

Examples

1
2
3
a <- Ovariable(output = data.frame(A = letters[c(1,1,2,2)], B = c(1,2,1,2), Result = 1:4))
Minimize(a, "B")
Minimize(a, "A")

OpasnetUtils documentation built on July 4, 2017, 9:44 a.m.