par.c | R Documentation |
This function is a wrapper for the c()
method for param_block
arrays that allows you
to also specify a fitted evorates model from which to extract parameters specified via ...
.
par.c(..., fit = NULL)
... |
|
fit |
An object of class " |
I had to create a separate function for this because R does not default to the c()
method for
param_block
arrays if character or numeric arguments are passed to c()
. This function
simply ensures R calls the proper method no matter what's passed to ...
.
An array of class "param_block
" with a param_type
determined by the elements
of ...
(tends to default "chains
" when in doubt). The dimensions of these arrays will generally
go in the order of iterations/quantiles/diagnostics, then parameters, then chains. Any dimensions of length 1 are
collapsed and stored as attributes. The resulting array contains all parameters specified by ...
as columns,
ordered as they are in ...
.
param_block-class for general information on param_block
arrays and
%chains%()
,
%quantiles%()
,
%means%()
,
%diagnostics%()
,
and %select%()
for more information on
param_block
operators.
#get whale/dolphin evorates fit
data("cet_fit")
#how are average rates for some focal clades affected by R_sig2/R_mu estimates?
parblock <- get.bg.rate(fit = cet_fit,
node.groups = setNames(list('Mesoplodon','Orcinus',c('Pseudorca','Feresa')),
c('Mesoplodon','Orca','Globicephalinae')),
)
parblock <- par.c("R_mu", "R_sig2", parblock, fit = cet_fit)
plot(parblock %chains% "Mesoplodon" ~ parblock %chains% "R_sig2"
plot(parblock %chains% "Orca" ~ parblock %chains% "R_mu")
#automatic conversion based on param_block type
parblock <- get.bg.rate(fit = cet_fit,
node.groups = setNames(list('Mesoplodon','Orcinus',c('Pseudorca','Feresa')),
c('Mesoplodon','Orca','Globicephalinae')),
type = "quantiles")
par.c("R_mu", "R_sig2", parblock, fit = cet_fit)
#can mix numeric and character selections
par.c("R_0", "R_mu", 1, 28, fit = cet_fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.