get_subsampled_tree | R Documentation |
Gets subsampled tree - retaining events information appropriately
get_subsampled_tree(
tree,
N,
tips = tree$edge[c(which(tree$state == 0 & tree$edge[, 2] <= length(tree$tip.label)),
sample(which(tree$state != 0 & tree$edge[, 2] <= length(tree$tip.label)), N)), 2]
)
tree |
simpop |
N |
integer. Number of tips to subsample (ignored if tips is specified). |
tips |
integer. node id of tips to subsample. Must include out-group. |
simpop object
cfg=getDefaultConfig(target_pop_size =5e4,rate=0.1)
params=list(n_sim_days=2*365,b_stop_at_pop_size=1,b_stop_if_empty=0)
growthphase=sim_pop(NULL,params=params,cfg)
stree=get_subsampled_tree(growthphase,50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.