From 0a80bfb71360949571a177ca947f44b77550d23f Mon Sep 17 00:00:00 2001 From: Peter Carbonetto Date: Fri, 12 Jan 2024 15:07:00 -0600 Subject: [PATCH] Switched from MCMCpack to gtools. --- .circleci/config.yml | 2 +- .github/workflows/R-CMD-check.yaml | 2 +- DESCRIPTION | 6 +++--- LICENSE | 2 +- NAMESPACE | 2 +- R/datasim.R | 2 +- R/fit_poisson_nmf.R | 2 +- appveyor.yml | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d62f9ffe..ddc1c5b3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: name: Install package dependencies command: | mkdir -p ~/R/Library - Rscript -e 'install.packages(c("devtools","remotes","quadprog","MCMCpack","irlba","Rtsne","uwot","dplyr","Rcpp","RcppArmadillo","RcppParallel","progress","pbapply","ggplot2","ggrepel","cowplot","plotly","htmlwidgets","testthat","Ternary"))' + Rscript -e 'install.packages(c("devtools","remotes","quadprog","gtools","irlba","Rtsne","uwot","dplyr","Rcpp","RcppArmadillo","RcppParallel","progress","pbapply","ggplot2","ggrepel","cowplot","plotly","htmlwidgets","testthat","Ternary"))' Rscript -e 'devtools::install_github("slowkow/ggrepel",upgrade="never",force=TRUE)' Rscript -e 'devtools::install_github("stephens999/ashr",upgrade="never",force=TRUE)' Rscript -e 'devtools::install_github("linxihui/NNLM",upgrade="never",force=TRUE)' diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index dbaeef7e..b9cc84cf 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | install.packages(c("remotes","rcmdcheck")) - install.packages(c("devtools","remotes","quadprog","MCMCpack")) + install.packages(c("devtools","remotes","quadprog","gtools")) install.packages(c("irlba","Rtsne","uwot","dplyr","Rcpp")) install.packages(c("RcppArmadillo","RcppParallel","pbapply")) install.packages(c("progress","ggplot2","ggrepel","cowplot")) diff --git a/DESCRIPTION b/DESCRIPTION index 352dbfe3..ca15a102 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Encoding: UTF-8 Type: Package Package: fastTopics -Version: 0.6-159 -Date: 2023-10-22 +Version: 0.6-160 +Date: 2024-01-12 Title: Fast Algorithms for Fitting Topic Models and Non-Negative Matrix Factorizations to Count Data Authors@R: c(person("Peter","Carbonetto",role=c("aut","cre"), @@ -39,7 +39,7 @@ Imports: methods, stats, Matrix, - MCMCpack, + gtools, quadprog, irlba, dplyr, diff --git a/LICENSE b/LICENSE index 23d5610c..8d35fc3f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,2 @@ YEAR: 2019 -COPYRIGHT HOLDER: Peter Carbonetto annd Matthew Stephens +COPYRIGHT HOLDER: Peter Carbonetto and Matthew Stephens diff --git a/NAMESPACE b/NAMESPACE index a85d54d2..2cb87d67 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -57,7 +57,6 @@ export(volcano_plot_ggplot_call) export(volcano_plot_ly_call) export(volcano_plotly) import(Matrix) -importFrom(MCMCpack,rdirichlet) importFrom(Matrix,colMeans) importFrom(Matrix,colSums) importFrom(Matrix,rowMeans) @@ -97,6 +96,7 @@ importFrom(ggplot2,theme) importFrom(ggplot2,waiver) importFrom(ggrepel,geom_text_repel) importFrom(graphics,plot) +importFrom(gtools,rdirichlet) importFrom(htmlwidgets,saveWidget) importFrom(irlba,irlba) importFrom(methods,as) diff --git a/R/datasim.R b/R/datasim.R index 1fe9acb5..053c1b28 100644 --- a/R/datasim.R +++ b/R/datasim.R @@ -340,7 +340,7 @@ generate_multinom_topic_model_counts <- function (F, L, s) { # (3) sample the nonzero mixture proportions from the Dirichlet # distribution with shape parameter alpha. # -#' @importFrom MCMCpack rdirichlet +#' @importFrom gtools rdirichlet generate_mixture_proportions <- function (n, k, alpha = rep(1,k)) { L <- matrix(0,n,k) k1 <- sample(k,n,replace = TRUE,prob = 2^(-seq(1,k))) diff --git a/R/fit_poisson_nmf.R b/R/fit_poisson_nmf.R index c450e7e0..6f519a91 100644 --- a/R/fit_poisson_nmf.R +++ b/R/fit_poisson_nmf.R @@ -428,7 +428,7 @@ fit_poisson_nmf <- function (X, k, fit0, numiter = 100, method.text <- "CCD" cat(sprintf("Running %d %s updates, %s extrapolation ",numiter, method.text,ifelse(control$extrapolate,"with","without"))) - cat("(fastTopics 0.6-159).\n") + cat("(fastTopics 0.6-160).\n") } # INITIALIZE ESTIMATES diff --git a/appveyor.yml b/appveyor.yml index ef382329..15a5e12a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,7 +24,7 @@ environment: # This is the minimal set of R packages needed to run "R CMD check" on # the package. build_script: - - R -e install.packages(c('devtools','testthat','quadprog','MCMCpack','irlba','Rtsne','uwot','dplyr','Rcpp','RcppArmadillo','RcppParallel','progress','pbapply','ggplot2','cowplot','plotly','htmlwidgets'),head(.libPaths(),1),'http://cran.wustl.edu') + - R -e install.packages(c('devtools','testthat','quadprog','gtools','irlba','Rtsne','uwot','dplyr','Rcpp','RcppArmadillo','RcppParallel','progress','pbapply','ggplot2','cowplot','plotly','htmlwidgets'),head(.libPaths(),1),'http://cran.wustl.edu') - R -e devtools::install_github('slowkow/ggrepel',upgrade='never',force=TRUE) - R -e devtools::install_github('stephens999/ashr',upgrade='never',force=TRUE)