writeParameterObject {AnaCoDa} | R Documentation |
Write Parameter Object to a File
Description
writeParameterObject
will write the parameter object as binary to the filesystem
Usage
writeParameterObject(parameter, file)
Arguments
parameter |
parameter on object created by |
file |
A filename that where the data will be stored. |
Details
As Rcpp object are not serializable with the default R save
function,
therefore this custom save function is provided (see loadParameterObject).
Value
This function has no return value.
Examples
## 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)
[Package AnaCoDa version 0.1.4.4 Index]