1 | InjectParams(previous, skeleton)
|
previous |
|
skeleton |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (previous, skeleton)
{
new = skeleton
for (i in 1:4) {
parname = c("delta_i", "gamma_k", "log_sigma_p", "zinfl_pz")[i]
new[[parname]] = previous[[parname]]
}
for (i in 1:5) {
parname = c("alpha_j", "phi_j", "loglambda_j", "rho_j",
"L_val")[i]
new[[parname]][1:length(previous[[parname]])] = previous[[parname]]
}
new[["logkappa_jz"]][1:nrow(previous[["logkappa_jz"]]), ][] = as.vector(previous[["logkappa_jz"]])
new[["logkappa_jz"]][nrow(new[["logkappa_jz"]]), ] = previous[["logkappa_jz"]][nrow(previous[["logkappa_jz"]]),
]
new[["Omega_input"]][, 1:ncol(previous[["Omega_input"]])][1:length(as.vector(previous[["Omega_input"]]))] = as.vector(previous[["Omega_input"]])
new[["Epsilon_input"]][, 1:dim(previous[["Epsilon_input"]])[2],
][1:length(as.vector(previous[["Epsilon_input"]]))] = as.vector(previous[["Epsilon_input"]])
return(new)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.