R/sim_sgd.R

Defines functions sim_sgd

Documented in sim_sgd

sim_sgd <- function(tau, b, d, nu)
{
	lambert <- Simulate_SGD_Phylogeny(tau, 0, 2, b, d, nu)
	if(length(lambert) == 1)
	{
		newick <- paste("(", Lambert2Newick(lambert), ");", sep="")
	}
	else{
		newick <- paste(Lambert2Newick(lambert), ";", sep="")
	}
	phylo <- read.tree(text = newick)
	phylo$tip.label <- paste("s", 1:Ntip(phylo), sep = "")
	return(phylo)
}

Try the RPANDA package in your browser

Any scripts or data that you put into this service are public.

RPANDA documentation built on Oct. 24, 2022, 5:06 p.m.