writeParameterObject function

Write Parameter Object to a File

Write Parameter Object to a File

writeParameterObject will write the parameter object as binary to the filesystem

writeParameterObject(parameter, file)

Arguments

  • parameter: parameter on object created by initializeParameterObject.
  • file: A filename that where the data will be stored.

Returns

This function has no return value.

Details

As Rcpp object are not serializable with the default R save function, therefore this custom save function is provided (see loadParameterObject ).

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)