Description Usage Arguments Details Value Examples
View source: R/parameterObject.R
writeParameterObject
will write the parameter object as binary to the filesystem
1 | writeParameterObject(parameter, file)
|
parameter |
parameter on object created by |
file |
A filename that where the data will be stored. |
As Rcpp object are not serializable with the default R save
function,
therefore this custom save function is provided (see loadParameterObject).
This function has no return value.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
genome_file <- system.file("extdata", "genome.fasta", package = "AnaCoDa")
genome <- initializeGenomeObject(file = genome_file)
sphi_init <- c(1,1)
numMixtures <- 2
geneAssignment <- c(rep(1,floor(length(genome)/2)),rep(2,ceiling(length(genome)/2)))
parameter <- initializeParameterObject(genome = genome, sphi = sphi_init,
num.mixtures = numMixtures,
gene.assignment = geneAssignment,
mixture.definition = "allUnique")
## writing an empty parameter object as the runMCMC routine was not called yet
writeParameterObject(parameter = parameter, file = file.path(tempdir(), "file.Rda"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.