View source: R/generateControlFile.R
generateControlFile | R Documentation |
BAMM
Generates a template diversification or trait control file
for BAMM
, while allowing the user to specify parameter values.
generateControlFile(
file = "controlfile.txt",
type = "diversification",
params = NULL
)
file |
Destination file name with or without path. |
type |
Character, either “ |
params |
List of parameters, see |
The user can supply parameters as a list, where the name of the list item is the name of the parameter as it appears in the control file, and the value of the list item is what will be placed in the contol file.
If a parameter is specified by the user, it will automatically be uncommented if it was commented in the template.
Pascal Title
## Not run:
#Produce a blank template control file
generateControlFile(file = 'traitcontrol.txt', type='trait')
#Produce a customized control file
data(whales)
#get bamm priors to supply to control file
priors <- setBAMMpriors(whales, outfile = NULL)
generateControlFile(file = 'divcontrol.txt', params = list(
treefile = 'whales.tre',
globalSamplingFraction = '1',
numberOfGenerations = '100000',
overwrite = '1',
lambdaInitPrior = as.numeric(priors['lambdaInitPrior']),
lambdaShiftPrior = as.numeric(priors['lambdaShiftPrior']),
muInitPrior = as.numeric(priors['muInitPrior']),
expectedNumberOfShifts = '1'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.