make.traits | R Documentation |
Making traits objects for treats
make.traits(
process = BM.process,
n = NULL,
start = NULL,
process.args = NULL,
trait.names = NULL,
add = NULL,
update = NULL,
test = TRUE,
background
)
process |
The trait process(es) (default is |
n |
Optional, the number of traits per process (default is |
start |
Optional, the starting values for each traits (default is |
process.args |
Optional, a named list of optional arguments for the trait process. |
trait.names |
Optional, the name(s) of the process(s). |
add |
Optional, another previous |
update |
Optional, another previous |
test |
Logical, whether to test if the traits object will work with |
background |
Optional, another |
When using update
, the provided arguments (to make.traits
) will be the ones updated in the "traits"
object.
If the "traits"
object contains multiple processes, you can specify which ones should be affected with the trait.names
argument.
Note that you cannot update the traits.names
or the number of traits per processes (n
) not use the add
argument when updating a "traits"
object.
If a background
"traits"
object is given, this object is then applied to all living edges at the same in the background while the main "traits"
is computed.
More details about the "treats"
"traits"
objects is explained in the treats
manual: http://tguillerme.github.io/treats.
This function outputs a treats
object that is a named list of elements handled internally by the treats
function.
Thomas Guillerme
treats
trait.process
## A simple Brownian motion trait (default)
make.traits()
## Two independent Brownian motion traits
make.traits(n = 2)
## Two different traits with different process
## (Brownian motion and Ornstein-Uhlenbeck)
make.traits(process = list(BM.process, OU.process))
## A multidimensional Brownian motion trait with correlation
## and different starting points
my_correlations <- matrix(1/3, ncol = 3, nrow = 3)
(my_traits <- make.traits(n = 3, start = c(0, 1, 3),
process.args = list(Sigma = my_correlations)))
## Adding a Ornstein-Uhlenbeck trait to the previous trait object
make.traits(process = OU.process, trait.names = "OU_trait",
add = my_traits)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.