expand_param_matrix: Expand the parameter matrix

Description Usage Arguments Value Examples

View source: R/parameters.R

Description

This function is called internally by other functions. Since the parameter matrix created with build_param_matrix only contains the parameter values for the parameter that needs to be optimised, the parameter matrix varies in length. This causes troubles to work with the other functions, so this function expands the matrix to its full size by replicating parameter values for the different parameters of the same meta parameter which have not been defined when building the parameter matrix (see example).

Usage

1
expand_param_matrix(param_matrix, param_matrix_full = NULL)

Arguments

param_matrix

The matrix storing parameter values

param_matrix_full

The expanded or complete parameter matrix

Value

The expanded parameter matrix.

Examples

1
2
3
4
pmat <- build_param_matrix(param_values = seq(0.01, 0.21, length = 21),
                           param_str = c("w1" = "1", "w3" = "1+t+l", "w4" = "s", "w5" = "c"))
pmat
expand_param_matrix(pmat)

courtiol/SileR documentation built on May 16, 2020, 8:10 p.m.