# pass a correlation function name to get 2d version with NAs for all parameters
sk_pars_make('mat')
# pass a vector or list of correlation function names in order y, x (or else specify)
sk_pars_make(c('gau', 'mat'))
sk_pars_make(list(x='gau', y='mat'))
# if the the x definition is missing it is copied from y, and vice versa
sk_pars_make(list(k='exp', kp=c(rho=1)))
# when unnamed, kernel range and shape parameters are assigned expected names
sk_pars_make(list(psill=1, x=list(k='mat', kp=c(1,2))))
# incorrectly named parameters raise errors
# \donttest{
sk_pars_make(list(psill=1, x=list(k='exp', kp=c(foo=1))))
# }
# complete parameter definition lists are returned unchanged
k_list = list(k='exp', kp=c(rho=1))
pars = list(y=k_list, x=k_list, eps=0, psill=1)
identical(pars, sk_pars_make(pars))
Run the code above in your browser using DataLab