View source: R/f_radii_and_heights.r
f_radii_and_heights2 | R Documentation |
This function returns cylinder radii and heights, such that the corresponding
cylinder volumes have determined characteristics.
For the chosen N heights (heights
),
it returns an Nx2 Matrix
whose first column contains the heights and
and the second column contains the corresponding radii.
It works in two modes: 1) if baseline.matrix
and target.n.event
are provided (but rho
is not),
the function computes the volume (such that each cylinder contains around target.n.event
events given the baseline); this is the mode used in Cavallaro, M. et al (2022) PLoS Comput Biol 18(11): e1010726
https://doi.org/10.1371/journal.pcbi.1010726 .
2) if rho
is provided (but baseline.matrix
and target.n.event
are not)
the functions computes the largest volume as $pi * rho^2$. All other radii
are computed with heights from heights
such the the cylinder volumes are constant.
f_radii_and_heights2(heigths, baseline.matrix, target.n.event, rho)
heigths |
|
baseline.matrix |
A |
target.n.event |
An |
rho |
A |
A Matrix
.
radii_and_heights = f_radii_and_heights2(1:16, baseline.matrix, 100)
radii_and_heights = f_radii_and_heights2(1:16, rho=1.6446127)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.