Skip to content

Commit

Permalink
Fix check issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dm13450 committed Aug 23, 2023
1 parent 8f37c8a commit e61280a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.4.1
Date: 2023-03-10 11:19:55 UTC
SHA: 2475911ff75ad7f043eae9834d3ad7073925b3d2
Version: 0.4.2
Date: 2023-08-23 18:49:58 UTC
SHA: 8f37c8a542e617bd3ef83c10e4c6d5a4e64beb9e
6 changes: 3 additions & 3 deletions R/cluster_label_change.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ClusterLabelChange <- function(dpObj, x, newLabel, currentLabel, ...){
ClusterLabelChange <- function(dpObj, x, newLabel, currentLabel, aux=0) {
UseMethod("ClusterLabelChange", dpObj)
}

ClusterLabelChange.conjugate <- function(dpObj, i, newLabel, currentLabel) {
ClusterLabelChange.conjugate <- function(dpObj, i, newLabel, currentLabel, aux=0) {

x <- dpObj$data[i, , drop = FALSE]
pointsPerCluster <- dpObj$pointsPerCluster
Expand Down Expand Up @@ -64,7 +64,7 @@ ClusterLabelChange.conjugate <- function(dpObj, i, newLabel, currentLabel) {
return(dpObj)
}

ClusterLabelChange.nonconjugate <- function(dpObj, i, newLabel, currentLabel, aux) {
ClusterLabelChange.nonconjugate <- function(dpObj, i, newLabel, currentLabel, aux=0) {

pointsPerCluster <- dpObj$pointsPerCluster
clusterLabels <- dpObj$clusterLabels
Expand Down
3 changes: 1 addition & 2 deletions R/mixing_distribution_prior_draw.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
#' @export
PriorDraw <- function(mdObj, n) UseMethod("PriorDraw", mdObj)

#' @export
PriorDraw.hierarchical <- function(mdObj, n = 1) {

##ind <- sample.int(length(mdObj$pi_k), n, prob = mdObj$pi_k, replace = TRUE)

probs <- mdObj$pi_k

ind <- sample(which(probs > 0), n, prob = probs[probs > 0], replace=TRUE)
Expand Down
12 changes: 6 additions & 6 deletions R/plot_dirichletprocess.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ plot_dirichletprocess.default <- function(x, ...){

}

plot_dirichletprocess.gaussian <- function(x, likelihood = FALSE, single = TRUE){
plot_dirichletprocess_univariate(x, likelihood = FALSE, single = TRUE)
plot_dirichletprocess.gaussian <- function(x, ...){
plot_dirichletprocess_univariate(x, ...)
}

plot_dirichletprocess.beta <- function(x, likelihood = FALSE, single = TRUE) {
plot_dirichletprocess_univariate(x, likelihood = FALSE, single = TRUE)
plot_dirichletprocess.beta <- function(x, ...) {
plot_dirichletprocess_univariate(x, ...)
}

plot_dirichletprocess.weibull <- function(x, likelihood = FALSE, single = TRUE) {
plot_dirichletprocess_univariate(x, likelihood = FALSE, single = TRUE)
plot_dirichletprocess.weibull <- function(x, ...) {
plot_dirichletprocess_univariate(x, ...)
}

plot_dirichletprocess.mvnormal <- function(x, ...) {
Expand Down

0 comments on commit e61280a

Please sign in to comment.