kbenoit/sophistication

quanteda.textmodels dependency for data function call

Closed this issue · 2 comments

Needed to install install.packages('quanteda.textmodels') prior to running data(data_corpus_irishbudget2010, package = "quanteda.textmodels").

The error message shown is below:

> library(sophistication)
> data(data_corpus_irishbudget2010, package = "quanteda.textmodels")
Error in find.package(package, lib.loc, verbose = verbose) : 
  there is no package called ‘quanteda.textmodels’

Resolved by installing quanteda.textmodels:

> install.packages('quanteda.textmodels')
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/quanteda.textmodels_0.9.1.tgz'
Content type 'application/x-gzip' length 5867161 bytes (5.6 MB)
==================================================
downloaded 5.6 MB


The downloaded binary packages are in
	/var/folders/w5/p8sm469n19n_gtsshmv6_lym0000gn/T//RtmpDiSmbN/downloaded_packages
> data(data_corpus_irishbudget2010, package = "quanteda.textmodels")

Session info is below:

> sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Mojave 10.14.6

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

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 
 
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] spacyr_1.2.1        sophistication_0.70

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4.6        lattice_0.20-41     prettyunits_1.1.1   ps_1.3.3           
 [5] gtools_3.8.2        assertthat_0.2.1    rprojroot_1.3-2     digest_0.6.25      
 [9] R6_2.4.1            BradleyTerry2_1.1-2 plyr_1.8.6          backports_1.1.8    
[13] quanteda_2.0.1      ggplot2_3.3.2       pillar_1.4.4        qvcalc_1.0.2       
[17] rlang_0.4.6         curl_4.3            rstudioapi_0.11     minqa_1.2.4        
[21] data.table_1.12.8   callr_3.4.3         nloptr_1.2.2.1      Matrix_1.2-18      
[25] reticulate_1.16     desc_1.2.0          devtools_2.3.0      splines_4.0.0      
[29] lme4_1.1-23         statmod_1.4.34      stringr_1.4.0       munsell_0.5.0      
[33] compiler_4.0.0      pkgconfig_2.0.3     pkgbuild_1.0.8      tidyselect_1.1.0   
[37] tibble_3.0.1        brglm_0.6.2         fansi_0.4.1         crayon_1.3.4       
[41] dplyr_1.0.0         withr_2.2.0         MASS_7.3-51.5       grid_4.0.0         
[45] jsonlite_1.7.0      xtable_1.8-4        nlme_3.1-147        gtable_0.3.0       
[49] lifecycle_0.2.0     magrittr_1.5        scales_1.1.1        RcppParallel_5.0.2 
[53] cli_2.0.2           stringi_1.4.6       reshape2_1.4.4      fs_1.4.1           
[57] remotes_2.1.1       testthat_2.3.2      ellipsis_0.3.1      stopwords_2.0      
[61] vctrs_0.3.1         generics_0.0.2      boot_1.3-24         fastmatch_1.1-0    
[65] tools_4.0.0         glue_1.4.1          purrr_0.3.4         processx_3.4.2     
[69] profileModel_0.6.0  pkgload_1.1.0       colorspace_1.4-1    sessioninfo_1.1.1  
[73] memoise_1.1.0       usethis_1.6.1   

It's true that

data(data_corpus_irishbudget2010, package = "quanteda.textmodels")

requires that quanteda.textmodels be installed first, but where in the sophistication package is that referenced at all? I don't think this is part of sophistication.

This was just one of the initial lines we ran to get more familiar with sophistication. I thought this was part of the package, but I see its part of utils now, though!