utility functions for the
objects are created by functions such as
1 2 3 4 5 6 7 8 9 10 11 12 13
a transfun object to print or an object to test as a transfun object
a transfun object to be multiplied with another with the same pathway
a named list of parameters matching those currently defined for
further arguments passed to or from other methods.
multiplication of transfun objects with the same pathway results in
a compound transfun object (also of class
transfun). When used in a
stochastic model, the two stochastic transitions are evaluated one after
another. When analysed deterministically, the expectation of the compound
transition function is taken as the product of the expectations of the two
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
prob <- p(0.3) is.transfun(prob) prob (compound <- prob * r(4.3)) # extract the transfun parameters (param_prob <- parameters(prob)) (param_compound <- parameters(compound)) # update the parameters of these transfuns param_prob$p <- 0.6 parameters(prob) <- param_prob parameters(prob) param_compound$r <- 15 parameters(compound) <- param_compound parameters(compound)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.