use_AddInd: Use AddInd slot

View source: R/mp.R

use_AddIndR Documentation

Use AddInd slot

Description

This function factory modifies an MP to use an index from AddInd (and CV_AddInd) slots instead of Ind by generating a wrapper function that assigns AddInd to Ind before calling the MP function.

Usage

use_AddInd(mp, i)

Arguments

mp

MP to use.

i

The i-th index in AddInd to assign to the Ind slot.

Examples

library(SAMtool)
om <- MSEtool::testOM
om@nsim <- 10
set.seed(1)
sra <- RCM(om,
  data = list(Chist = runif(10), Index = runif(10), I_sd = rep(0.1, 10)))
my_mp <- use_AddInd(Itarget_base)
## Not run: 
mse <- runMSE(sra@OM, MPs = "Itarget_base")

## End(Not run)

pbs-assess/ggmse documentation built on Nov. 21, 2023, 8:06 p.m.