Translated checkLogml() (#3)
This commit is contained in:
parent
46dc08905a
commit
53bae46397
3 changed files with 29 additions and 1 deletions
|
|
@ -48,6 +48,7 @@ importFrom(ape,read.FASTA)
|
|||
importFrom(matlab2r,blanks)
|
||||
importFrom(matlab2r,cell)
|
||||
importFrom(matlab2r,colon)
|
||||
importFrom(matlab2r,disp)
|
||||
importFrom(matlab2r,find)
|
||||
importFrom(matlab2r,inputdlg)
|
||||
importFrom(matlab2r,isempty)
|
||||
|
|
|
|||
27
R/checkLogml.R
Normal file
27
R/checkLogml.R
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
checkLogml <- function(priorTerm, adjprior, cliques, separators) {
|
||||
# tarkistaa logml:n
|
||||
|
||||
# global CLIQCOUNTS
|
||||
# global SEPCOUNTS
|
||||
# global PARTITION
|
||||
|
||||
npops <- length(unique(PARTITION))
|
||||
cliqcounts <- computeCounts(cliques, separators, npops)$cliqcounts
|
||||
sepcounts <- computeCounts(cliques, separators, npops)$sepcounts
|
||||
|
||||
CLIQCOUNTS <- cliqcounts
|
||||
SEPCOUNTS <- sepcounts
|
||||
|
||||
logml <- computeLogml(adjprior, priorTerm)$logml
|
||||
spatialPrior <- computeLogml(adjprior, priorTerm)$spatialPrior
|
||||
|
||||
disp(
|
||||
c(
|
||||
'logml: ',
|
||||
logml2String(logml),
|
||||
', spatial prior: ',
|
||||
logml2String(spatialPrior)
|
||||
)
|
||||
)
|
||||
return(logml)
|
||||
}
|
||||
|
|
@ -7,6 +7,6 @@
|
|||
#' Check the "BugReports" field on the package description for the URL.
|
||||
#' @importFrom matlab2r blanks cell colon find inputdlg
|
||||
#' isempty isfield isspace max min ones questdlg rand repmat reshape
|
||||
#' size sortrows squeeze strcmp times zeros
|
||||
#' size sortrows squeeze strcmp times zeros disp
|
||||
#' @importFrom stats runif
|
||||
NULL
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue