mlegp-parameter-lookup {mlegp}R Documentation

Parameter Lookup Functions

Description

These functions are used to match the name of a parameter with its position in a parameter list

Usage

toParamIndexes(m, string)
matchIndexes(m, string)

Arguments

m a vector of names of the parameters of interest
string a vector of parameter names

Value

a vector where element i contains the position of m[i] in string
if m contains integers and toParamIndexes is called, m will be returned, without a check of whether or not the indices are valid
if m[i] is not an element of string, toParamIndexes will display an error, whereas matchIndexes will return NA

Note

this function does not need to be called by the user; it exists so that the user can pass in a vector of parameter numbers or parameter names to various functions when specifying a subset of the parameters of the Gaussian process design matrix

for toParamIndexes, m can contain integers or characters, but cannot contain both

Author(s)

Garrett M. Dancik dancikg@nsula.edu

References

http://users.nsula.edu/dancikg/mlegp/

Examples


param.names = c("one", "two", "three")
toParamIndexes(c("one", "three"), param.names)
#toParamIndexes(c("four"), param.names) # will give an error

[Package mlegp version 2.2.6 Index]