I am trying to install the trackViewer package in R, following the instructions on the Bioconductor websites https://www.bioconductor.org/packages/devel/bioc/vignettes/trackViewer/inst/doc/trackViewer.html.
https://bioconductor.org/packages/release/bioc/html/trackViewer.html
Every time I run the code
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("trackViewer")
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("Gviz")
I get this error
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details
replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.1 (2022-06-23)
Warning message:
package(s) not installed when version(s) same as current; use `force = TRUE` to re-install: 'Gviz'
I'm not sure how to circumvent this. I am ultimately looking to create a lollipop plot to showcase mutations in a gene of interest with annotations.
I would appreciate any help with this.
Session info:
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.0.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] grid stats4 stats graphics grDevices utils datasets methods
[9] base
other attached packages:
[1] Rcpp_1.0.9 GenomicRanges_1.48.0 GenomeInfoDb_1.32.3 IRanges_2.30.0
[5] S4Vectors_0.34.0 BiocGenerics_0.42.0 BiocManager_1.30.18
loaded via a namespace (and not attached):
[1] MatrixGenerics_1.8.1 Biobase_2.56.0 httr_1.4.3
[4] bit64_4.0.5 assertthat_0.2.1 BiocFileCache_2.4.0
[7] blob_1.2.3 BSgenome_1.64.0 GenomeInfoDbData_1.2.8
[10] Rsamtools_2.12.0 yaml_2.3.5 progress_1.2.2
[13] pillar_1.8.0 RSQLite_2.2.16 lattice_0.20-45
[16] glue_1.6.2 digest_0.6.29 RColorBrewer_1.1-3
[19] XVector_0.36.0 colorspace_2.0-3 htmltools_0.5.3
[22] Matrix_1.4-1 XML_3.99-0.10 pkgconfig_2.0.3
[25] biomaRt_2.52.0 zlibbioc_1.42.0 purrr_0.3.4
[28] scales_1.2.0 BiocParallel_1.30.3 tibble_3.1.8
[31] KEGGREST_1.36.3 generics_0.1.3 ellipsis_0.3.2
[34] cachem_1.0.6 SummarizedExperiment_1.26.1 GenomicFeatures_1.48.3
[37] cli_3.3.0 magrittr_2.0.3 crayon_1.5.1
[40] memoise_2.0.1 fansi_1.0.3 xml2_1.3.3
[43] tools_4.2.1 prettyunits_1.1.1 hms_1.1.1
[46] BiocIO_1.6.0 lifecycle_1.0.1 matrixStats_0.62.0
[49] stringr_1.4.0 munsell_0.5.0 DelayedArray_0.22.0
[52] AnnotationDbi_1.58.0 Biostrings_2.64.0 compiler_4.2.1
[55] rlang_1.0.4 RCurl_1.98-1.8 rstudioapi_0.13
[58] rjson_0.2.21 rappdirs_0.3.3 htmlwidgets_1.5.4
[61] bitops_1.0-7 restfulr_0.0.15 codetools_0.2-18
[64] DBI_1.1.3 curl_4.3.2 R6_2.5.1
[67] GenomicAlignments_1.32.1 dplyr_1.0.9 rtracklayer_1.56.1
[70] fastmap_1.1.0 bit_4.0.4 utf8_1.2.2
[73] filelock_1.0.2 stringi_1.7.8 parallel_4.2.1
[76] vctrs_0.4.1 png_0.1-7 dbplyr_2.2.1
[79] tidyselect_1.1.2
Here warning message suggests that latest version of the package is already installed and if you want to reinstall the package then use force=TRUE like this :
BiocManager::install("Gviz", force = TRUE)
Related
I want to install additional packages besides the default ones every time I restart my R Session.
I have tried this: options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version$platform, R.version$arch, R.version$os)))
install.packages(c(
'shinydashboard',
'shinyWidgets',
'rlist',
'sortable',
'tidyverse',
'XML',
'DescTools',
'plotly',
'leaflet',
'tidyquant',
'umap'
))
And this options(defaultPackages = c(getOption("defaultPackages"), "tidyquant", ...)) neither of which works. If all I want to do is to install the tidyquant package upon the R Session restart, how do I get it to work inside the Rprofile file?
I would definitely take #dirk-eddelbuettel's advice on this (XY problem), but it is possible if you add this to your .Rprofile:
.First <- function(){
utils::install.packages("tidyquant", repos="https://cran.csiro.au/")
library(tidyquant)
}
(This command is run before any packages are loaded so you need to specify the install.packages function comes from utils).
Not sure if this applies to windows; my system info:
> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.4
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] graphics grDevices utils datasets stats methods
[7] base
other attached packages:
[1] tidyquant_1.0.4 quantmod_0.4.20
[3] TTR_0.24.3 PerformanceAnalytics_2.0.4
[5] xts_0.12.1 zoo_1.8-10
[7] lubridate_1.8.0
loaded via a namespace (and not attached):
[1] magrittr_2.0.3 tidyselect_1.1.2 munsell_0.5.0
[4] colorspace_2.0-3 lattice_0.20-45 R6_2.5.1
[7] rlang_1.0.2 quadprog_1.5-8 fansi_1.0.3
[10] dplyr_1.0.9 httr_1.4.3 tcltk_4.1.3
[13] tools_4.1.3 grid_4.1.3 gtable_0.3.0
[16] utf8_1.2.2 DBI_1.1.2 cli_3.3.0
[19] ellipsis_0.3.2 assertthat_0.2.1 tibble_3.1.7
[22] lifecycle_1.0.1 crayon_1.5.1 purrr_0.3.4
[25] ggplot2_3.3.6 vctrs_0.4.1 curl_4.3.2
[28] Quandl_2.11.0 glue_1.6.2 compiler_4.1.3
[31] pillar_1.7.0 generics_0.1.2 scales_1.2.0
[34] jsonlite_1.8.0 pkgconfig_2.0.3
>
N.B. Choose your CRAN mirror accordingly (unless you also happen to be in Australia): https://cran.r-project.org/mirrors.html
I am trying to get started with the fable package in R for forecasting.
I am using the basic examples from their website:
I am trying to run the following example but it doesn't ever run, it runs eternally.
I have upgraded my version of RStudio and have had to restart multiple times but I have had no success.
library(fable)
library(tsibble)
library(tsibbledata)
library(lubridate)
library(dplyr)
aus_retail %>%
filter(
State %in% c("New South Wales", "Victoria"),
Industry == "Department stores"
) %>%
model(
ets = ETS(box_cox(Turnover, 0.3)),
arima = ARIMA(log(Turnover)),
snaive = SNAIVE(Turnover)
) %>%
forecast(h = "2 years") %>%
autoplot(filter(aus_retail, year(Month) > 2010), level = NULL)
Here is my sessioninfo()
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_Ireland.1252 LC_CTYPE=English_Ireland.1252
[3] LC_MONETARY=English_Ireland.1252 LC_NUMERIC=C
[5] LC_TIME=English_Ireland.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.2 magrittr_2.0.1 ellipsis_0.3.1 cli_2.4.0 tools_4.0.2
[6] pillar_1.5.1 glue_1.4.2 rstudioapi_0.13 tibble_3.1.0 crayon_1.4.1
[11] utf8_1.2.1 fansi_0.4.1 vctrs_0.3.4 hardhat_0.1.5 lifecycle_1.0.0
[16] pkgconfig_2.0.3 rlang_0.4.10
Any suggestions would be appreciated
I updated R to 4.1.0 and my issues have disappeared. I had to include some additional packages such as feasts and urca to remove any errors/warnings post upgrade to 4.1.0
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_Ireland.1252 LC_CTYPE=English_Ireland.1252
[3] LC_MONETARY=English_Ireland.1252 LC_NUMERIC=C
[5] LC_TIME=English_Ireland.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] urca_1.3-0 feasts_0.2.2 lubridate_1.7.10 tsibbledata_0.3.0 tsibble_1.0.1
[6] fable_0.3.1 fabletools_0.3.1 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7
[11] purrr_0.3.4 readr_1.4.0 tidyr_1.1.3 tibble_3.1.2 ggplot2_3.3.5
[16] tidyverse_1.3.1
loaded via a namespace (and not attached):
[1] tidyselect_1.1.1 lattice_0.20-44 haven_2.4.1 colorspace_2.0-2
[5] vctrs_0.3.8 generics_0.1.0 utf8_1.2.1 rlang_0.4.11
[9] pillar_1.6.1 glue_1.4.2 withr_2.4.2 DBI_1.1.1
[13] dbplyr_2.1.1 modelr_0.1.8 readxl_1.3.1 distributional_0.2.2
[17] lifecycle_1.0.0 progressr_0.8.0 munsell_0.5.0 gtable_0.3.0
[21] anytime_0.3.9 cellranger_1.1.0 rvest_1.0.0 labeling_0.4.2
[25] fansi_0.5.0 broom_0.7.8 Rcpp_1.0.7 scales_1.1.1
[29] backports_1.2.1 jsonlite_1.7.2 farver_2.1.0 fs_1.5.0
[33] digest_0.6.27 hms_1.1.0 stringi_1.6.2 numDeriv_2016.8-1.1
[37] grid_4.1.0 cli_3.0.1 tools_4.1.0 magrittr_2.0.1
[41] pacman_0.5.1 crayon_1.4.1 pkgconfig_2.0.3 ellipsis_0.3.2
[45] xml2_1.3.2 reprex_2.0.0 assertthat_0.2.1 httr_1.4.2
[49] rstudioapi_0.13 R6_2.5.0 nlme_3.1-152 compiler_4.1.0
I'm trying to install some packages which require compilation in R. I installed RTools from the website and was having the error that "RTools must be installed to build packages". I installed it again directly from Rstudio and am no longer having the same issue. However, I can't install the packages because of an error that path is not writable.
When trying to execute the command BiocManager::install("org.Rn.eg.db")
I get the following output and error message
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details
replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.14 (BiocManager 1.30.16), R 4.1.0 (2021-05-18)
Installing package(s) 'org.Rn.eg.db'
installing the source package ‘org.Rn.eg.db’
trying URL 'https://bioconductor.org/packages/3.14/data/annotation/src/contrib/org.Rn.eg.db_3.13.0.tar.gz'
Content type 'application/x-gzip' length 57471764 bytes (54.8 MB)
downloaded 54.8 MB
'"C:\PROGRA~1\R\R-41~1.0/bin/x64/Rterm.exe"' is not recognized as an internal or external command,
operable program or batch file.
The downloaded source packages are in
‘##MY PATH’
Installation paths not writeable, unable to update packages
path: C:/Program Files/R/R-4.1.0/library
packages:
affy, affyio, airway, AnnotationDbi, Biobase, BiocGenerics, BiocVersion, biomaRt, Biostrings, broom, colorspace, curl,
DelayedArray, devtools, dplyr, edgeR, EnhancedVolcano, fansi, GenomeInfoDb, GenomicRanges, gert, graph, Heatplus, IRanges,
KEGGREST, limma, marray, MatrixGenerics, mime, preprocessCore, S4Vectors, STRINGdb, SummarizedExperiment, topGO, VennDetail,
xfun, XVector, zip, zlibbioc
Old packages: 'BiocFileCache', 'BiocParallel', 'DESeq2', 'genefilter', 'glmnet', 'GSEABase', 'lme4', 'openxlsx', 'rio',
'stringi'
Update all/some/none? [a/s/n]:
n
Warning message:
In .inet_warning(msg) :
installation of package ‘org.Rn.eg.db’ had non-zero exit status
From running sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C LC_TIME=English_Canada.1252
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] gprofiler2_0.2.0 DESeq2_1.32.0 SummarizedExperiment_1.22.0 Biobase_2.52.0
[5] MatrixGenerics_1.4.0 matrixStats_0.59.0 GenomicRanges_1.44.0 GenomeInfoDb_1.28.0
[9] IRanges_2.26.0 S4Vectors_0.30.0 BiocGenerics_0.38.0 factoextra_1.0.7
[13] dendextend_1.15.1 RColorBrewer_1.1-2 pheatmap_1.0.12 ggpubr_0.4.0
[17] ggtext_0.1.1 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.6
[21] purrr_0.3.4 readr_1.4.0 tidyr_1.1.3 tibble_3.1.2
[25] tidyverse_1.3.1 EnhancedVolcano_1.10.0 ggrepel_0.9.1 ggplot2_3.3.4
loaded via a namespace (and not attached):
[1] readxl_1.3.1 backports_1.2.1 lazyeval_0.2.2 splines_4.1.0 BiocParallel_1.26.0
[6] digest_0.6.27 htmltools_0.5.1.1 viridis_0.6.1 fansi_0.5.0 magrittr_2.0.1
[11] memoise_2.0.0 openxlsx_4.2.3 Biostrings_2.61.1 annotate_1.71.0 modelr_0.1.8
[16] extrafont_0.17 extrafontdb_1.0 colorspace_2.0-1 blob_1.2.1 rvest_1.0.0
[21] haven_2.4.1 xfun_0.24 crayon_1.4.1 RCurl_1.98-1.3 jsonlite_1.7.2
[26] genefilter_1.74.0 survival_3.2-11 glue_1.4.2 gtable_0.3.0 zlibbioc_1.39.0
[31] XVector_0.33.0 DelayedArray_0.19.0 proj4_1.0-10.1 car_3.0-10 Rttf2pt1_1.3.8
[36] maps_3.3.0 abind_1.4-5 scales_1.1.1 DBI_1.1.1 rstatix_0.7.0
[41] Rcpp_1.0.6 viridisLite_0.4.0 xtable_1.8-4 gridtext_0.1.4 foreign_0.8-81
[46] bit_4.0.4 htmlwidgets_1.5.3 httr_1.4.2 ellipsis_0.3.2 farver_2.1.0
[51] pkgconfig_2.0.3 XML_3.99-0.6 dbplyr_2.1.1 locfit_1.5-9.4 utf8_1.2.1
[56] labeling_0.4.2 tidyselect_1.1.1 rlang_0.4.11 AnnotationDbi_1.54.1 munsell_0.5.0
[61] cellranger_1.1.0 tools_4.1.0 cachem_1.0.5 cli_2.5.0 generics_0.1.0
[66] RSQLite_2.2.7 broom_0.7.7 fastmap_1.1.0 knitr_1.33 bit64_4.0.5
[71] fs_1.5.0 zip_2.2.0 KEGGREST_1.33.0 ash_1.0-15 ggrastr_0.2.3
[76] xml2_1.3.2 compiler_4.1.0 rstudioapi_0.13 beeswarm_0.4.0 plotly_4.9.4.1
[81] curl_4.3.1 png_0.1-7 ggsignif_0.6.2 reprex_2.0.0 geneplotter_1.71.0
[86] stringi_1.6.1 ggalt_0.4.0 lattice_0.20-44 Matrix_1.3-4 markdown_1.1
[91] vctrs_0.3.8 pillar_1.6.1 lifecycle_1.0.0 BiocManager_1.30.16 data.table_1.14.0
[96] bitops_1.0-7 R6_2.5.0 KernSmooth_2.23-20 gridExtra_2.3 rio_0.5.26
[101] vipor_0.4.5 MASS_7.3-54 assertthat_0.2.1 withr_2.4.2 GenomeInfoDbData_1.2.6
[106] hms_1.1.0 grid_4.1.0 carData_3.0-4 lubridate_1.7.10 ggbeeswarm_0.6.0
I met the exact same problem as you at the first use after installing the newest R and Rstudio. Then I just run Rstuio as Administrator and it worked. You can refer to the similar question for other solutions: https://community.rstudio.com/t/error-after-r-update-lib-c-program-files-r-r-3-5-0-library-is-not-writable/7947/2
As the title states, both R and RStudio crash with a 'fatal error' when I try to run
read_parquet('abc.parquet')
For reference, read_parquet() is a function from the arrow() library
Using:
Macbook Pro M1 2020
Macbook Pro M1 2020
R version 4.1.0 (I think it is running through rosetta, activity monitor says 'Intel')
RStudio 1.4.1717
arrow 4.0.1
R sessionInfo():
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] arrow_4.0.1 data.table_1.14.0 dplyr_1.0.7 bsts_0.9.6 xts_0.12.1
[6] zoo_1.8-9 BoomSpikeSlab_1.2.4 Boom_0.9.7 MASS_7.3-54 reshape2_1.4.4
[11] DescTools_0.99.42 lubridate_1.7.10
loaded via a namespace (and not attached):
[1] Rcpp_1.0.6 compiler_4.1.0 pillar_1.6.1 plyr_1.8.6 class_7.3-19 tools_4.1.0
[7] bit_4.0.4 boot_1.3-28 tibble_3.1.2 lifecycle_1.0.0 rootSolve_1.8.2.1 lattice_0.20-44
[13] pkgconfig_2.0.3 rlang_0.4.11 Matrix_1.3-3 DBI_1.1.1 rstudioapi_0.13 mvtnorm_1.1-2
[19] expm_0.999-6 xfun_0.24 e1071_1.7-7 stringr_1.4.0 generics_0.1.0 vctrs_0.3.8
[25] bit64_4.0.5 tidyselect_1.1.1 gld_2.6.2 grid_4.1.0 glue_1.4.2 R6_2.5.0
[31] fansi_0.5.0 lmom_2.8 purrr_0.3.4 magrittr_2.0.1 ellipsis_0.3.2 assertthat_0.2.1
[37] Exact_2.1 utf8_1.2.1 tinytex_0.32 stringi_1.6.2 proxy_0.4-26 crayon_1.4.1
Here is a parquet file (one of many) which I am failing to import:
file.parquet
I'm trying to run topic models in R and calculate the best number of topics using the FindTopicsNumber function from the ldatuning package. If I run the following code on a macbook pro it fits the models but once it starts to calculate the first metric I get a fatal error and the R session is terminated. The code runs on a windows machine without problems. Does anyone know why it might not run on mac?
sessionInfo() output:
R version 4.0.5 (2021-03-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5.4 rstudioapi_0.13 xml2_1.3.2 magrittr_2.0.1 tidyselect_1.1.0
[6] munsell_0.5.0 colorspace_2.0-0 tm_0.7-8 R6_2.5.0 rlang_0.4.8
[11] dplyr_1.0.2 tools_4.0.5 parallel_4.0.5 grid_4.0.5 gtable_0.3.0
[16] modeltools_0.2-23 ellipsis_0.3.1 tibble_3.0.4 lifecycle_0.2.0 crayon_1.3.4
[21] NLP_0.2-1 purrr_0.3.4 ggplot2_3.3.2 vctrs_0.3.5 glue_1.4.2
[26] slam_0.1-47 compiler_4.0.5 pillar_1.4.7 topicmodels_0.2-12 generics_0.1.0
[31] scales_1.1.1 stats4_4.0.5 pkgconfig_2.0.3 ldatuning_1.0.2
The error producing mac:
MacBook Pro 13-inch late 2013
macOS Catalina 10.15.7
(tried with R 4.0.3 and 4.0.5)
The working windows machine:
Dell XPS 15 9550
Windows 10.0.14393
(tried with R 4.0.4 and 4.0.5)
library(topicmodels)
data("AssociatedPress")
owl <- ldatuning::FindTopicsNumber(AssociatedPress, topics = c(1:10),
metrics = c("Griffiths2004", "CaoJuan2009",
"Arun2010", "Deveaud2014"),
method = "Gibbs", control = list(seed = 1234),
mc.cores = parallel::detectCores() - 1,
verbose = T)
Based on this github issue, and the observation that only the griffiths metric causes the failure, the problem appears to be caused by the Rmpfr package. Reinstalling the package (i.e. install.packages("Rmpfr"); library(Rmpfr)) and/or building the package from source may solve the issue. For detailed instruction on compiling R packages from source see https://stackoverflow.com/a/65334247/12957340
Edit
I was able to install and run the command above using the following steps:
Install required dependancies using homebrew:
brew install gsl
brew install gmp
brew install mpfr
Edit .R/Makevars file to include these lines (after following instructions in https://stackoverflow.com/a/65334247/12957340):
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++
CC=/usr/local/gfortran/bin/gcc
CXX=/usr/local/gfortran/bin/g++
PKG_LIBS=-L/usr/local/opt/gettext/lib
CFLAGS=-I/usr/local/opt/gsl/include -I/usr/local/opt/gmp/include -I/usr/local/opt/mpfr/include
LDFLAGS=-L/usr/local/opt/gsl/lib -L/usr/local/opt/gmp/lib -L/usr/local/opt/mpfr/lib -lgsl -lgslcblas
Install the required packages:
install.packages("topicmodels", type = "source")
install.packages("ldatuning", type = "source")
install.packages("Rmpfr")
And finally, run the example:
library(topicmodels)
library(ldatuning)
data("AssociatedPress")
owl <- ldatuning::FindTopicsNumber(AssociatedPress, topics = c(1:10),
metrics = c("Griffiths2004", "CaoJuan2009",
"Arun2010", "Deveaud2014"),
method = "Gibbs", control = list(seed = 1234),
mc.cores = parallel::detectCores() - 1,
verbose = T)
#> warning: topics count can't to be less than 2, incorrect values was removed.
#> fit models... done.
#> calculate metrics:
#> Griffiths2004... done.
#> CaoJuan2009... done.
#> Arun2010... done.
#> Deveaud2014... done.
>sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ldatuning_1.0.2 topicmodels_0.2-12
loaded via a namespace (and not attached):
[1] readxl_1.3.1 backports_1.2.1 Hmisc_4.5-0
[4] systemfonts_1.0.1 plyr_1.8.6 splines_4.0.3
[7] gmp_0.6-2 tfruns_1.5.0 usethis_2.0.1
[10] ggplot2_3.3.3 digest_0.6.27 htmltools_0.5.1.9000
[13] matrixcalc_1.0-3 viridis_0.5.1 fansi_0.4.2
[16] magrittr_2.0.1 checkmate_2.0.0 memoise_2.0.0
[19] tm_0.7-8 cluster_2.1.1 openxlsx_4.2.3
[22] remotes_2.2.0 readr_1.4.0 extrafont_0.17
[25] vroom_1.4.0 extrafontdb_1.0 prettyunits_1.1.1
[28] jpeg_0.1-8.1 sem_3.1-11 colorspace_2.0-1
[31] haven_2.3.1 xfun_0.22 dplyr_1.0.5
[34] jsonlite_1.7.2 callr_3.6.0 crayon_1.4.1
[37] microbenchmark_1.4-7 lme4_1.1-26 zeallot_0.1.0
[40] survival_3.2-10 zoo_1.8-9 glue_1.4.2
[43] gtable_0.3.0 mi_1.0 car_3.0-10
[46] pkgbuild_1.2.0 Rttf2pt1_1.3.8 Rmpfr_0.8-4
[49] abind_1.4-5 scales_1.1.1 DBI_1.1.1
[52] rstatix_0.7.0 Rcpp_1.0.6 viridisLite_0.4.0
[55] htmlTable_2.1.0 tmvnsim_1.0-2 reticulate_1.18
[58] foreign_0.8-81 bit_4.0.4 Formula_1.2-4
[61] stats4_4.0.3 htmlwidgets_1.5.3 RColorBrewer_1.1-2
[64] lavaan_0.6-8 modeltools_0.2-23 ellipsis_0.3.2
[67] pkgconfig_2.0.3 rJava_0.9-13 farver_2.1.0
[70] nnet_7.3-15 utf8_1.2.1 janitor_2.1.0
[73] tidyselect_1.1.0 rlang_0.4.11 munsell_0.5.0
[76] cellranger_1.1.0 tools_4.0.3 cachem_1.0.5
[79] cli_2.5.0 generics_0.1.0 devtools_2.3.2
[82] broom_0.7.5 evaluate_0.14 stringr_1.4.0
[85] fastmap_1.1.0 arm_1.11-2 yaml_2.2.1
[88] processx_3.5.0 knitr_1.31 bit64_4.0.5
[91] fs_1.5.0 zip_2.1.1 purrr_0.3.4
[94] randomForest_4.6-14 nlme_3.1-152 whisker_0.4
[97] slam_0.1-48 xml2_1.3.2 compiler_4.0.3
[100] rstudioapi_0.13 curl_4.3.1 png_0.1-7
[103] testthat_3.0.2 ggsignif_0.6.1 gt_0.2.2
[106] reprex_1.0.0 tibble_3.1.1 statmod_1.4.35
[109] pbivnorm_0.6.0 stringi_1.5.3 ps_1.6.0
[112] desc_1.3.0 gdtools_0.2.3 forcats_0.5.1
[115] hrbrthemes_0.8.0 lattice_0.20-41 Matrix_1.3-2
[118] tensorflow_2.4.0 keras_2.4.0 Amelia_1.7.6
[121] nloptr_1.2.2.2 tabulizerjars_1.0.1 vctrs_0.3.8
[124] pillar_1.6.1 lifecycle_1.0.0 BiocManager_1.30.12
[127] data.table_1.14.0 cowplot_1.1.1 R6_2.5.0
[130] latticeExtra_0.6-29 gridExtra_2.3 rio_0.5.26
[133] sessioninfo_1.1.1 boot_1.3-27 MASS_7.3-53.1
[136] assertthat_0.2.1 pkgload_1.2.0 rprojroot_2.0.2
[139] withr_2.4.2 mnormt_2.0.2 parallel_4.0.3
[142] hms_1.0.0 grid_4.0.3 rpart_4.1-15
[145] labelled_2.8.0 tidyr_1.1.3 coda_0.19-4
[148] minqa_1.2.4 rmarkdown_2.7 snakecase_0.11.0
[151] carData_3.0-4 NLP_0.2-1 snowfall_1.84-6.1
[154] lubridate_1.7.10 base64enc_0.1-3 bmem_1.8
[157] tabulizer_0.2.2