Skip to content

Commit

Permalink
Minor documentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
donkeyshot committed Jul 29, 2017
1 parent 9f540f8 commit e814089
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
9 changes: 6 additions & 3 deletions R/get-phybreak.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ get.tree <- function(phybreak.object, samplenr = 0) {
#' @param whichpars Which parameters to return. Either a vector with parameter names, or \code{"all"} for all parameters, or
#' \code{"posterior"} for parameters for which a posterior is sampled.
#' @export
get.parameters <- function(phybreak.object, samplenr = 0, whichpars = "posterior") {
get.parameters <- function(phybreak.object, samplenr = 0,
whichpars = "posterior") {
if (!inherits(phybreak.object, "phybreak")) {
stop("object must be of class \"phybreak\"")
}
Expand Down Expand Up @@ -173,9 +174,11 @@ get.mcmc <- function(phybreak.object, thin = 1, nkeep = Inf) {
#'
#' tree0 <- get.phylo(MCMCstate)
#' seqdata <- get.seqdata(MCMCstate)
#' phangorn::pml(tree0, seqdata, rate = 0.75*get.parameters(MCMCstate)["mu"])
#' phangorn::pml(tree0, seqdata,
#' rate = 0.75*get.parameters(MCMCstate)["mu"])
#' logLik(MCMCstate, genetic = TRUE, withinhost = FALSE,
#' sampling = FALSE, generation = FALSE) #should give the same result as 'pml'
#' sampling = FALSE, generation = FALSE)
#' #should give the same result as 'pml'
#' @export
get.phylo <- function(phybreak.object, samplenr = 0, simmap = FALSE) {
### tests
Expand Down
6 changes: 4 additions & 2 deletions R/transtree.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
#' infector in the posterior distribution.
#' \item \code{"edmonds"} starts from the most frequent infector (method \code{"count"}), multiple roots and
#' cycles are removed by selecting one by one the next most frequent option that minimizes the loss in support
#' (\href{https://en.wikipedia.org/wiki/Edmonds/'_algorithm}{Edmonds' algorithm}). Support is measured by the frequency of the infector in the posterior distribution.
#' \item{"mpc"} gives the maximum parent credibility tree as described in \href{http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004613}{Hall et al (2015)}. This is the tree
#' (\href{https://en.wikipedia.org/wiki/Edmonds'_algorithm}{Edmonds' algorithm}). Support is measured by the
#' frequency of the infector in the posterior distribution.
#' \item{"mpc"} gives the maximum parent credibility tree as described in
#' \href{http://dx.doi.org/10.1371/journal.pcbi.1004613}{Hall et al (2015)}. This is the tree
#' in the set of posterior samples that has maximum support = product of frequencies among all posterior samples.
#' Support is measured by the frequency of the infector in the posterior distribution.
#' \item{"mtcc"} gives the maximum transmission cluster credibility tree. This is equivalent to the maximum clade
Expand Down
6 changes: 4 additions & 2 deletions man/get.phybreak.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/transtree.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e814089

Please sign in to comment.