mlegp-parameter-lookup | R Documentation |
These functions are used to match the name of a parameter with its position in a parameter list
toParamIndexes(m, string) matchIndexes(m, string)
m |
a vector of names of the parameters of interest |
string |
a vector of parameter names |
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
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
Garrett M. Dancik dancikg@easternct.edu
https://github.com/gdancik/mlegp/
param.names = c("one", "two", "three") toParamIndexes(c("one", "three"), param.names) #toParamIndexes(c("four"), param.names) # will give an error
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.