ropensci / fingertipsR

R package to interact with Public Health England’s Fingertips data tool
https://docs.ropensci.org/fingertipsR
92 stars 18 forks source link

Issue installing/loading fingertipsR in R #96

Open DS-Rodrigues opened 3 years ago

DS-Rodrigues commented 3 years ago

I am trying to load the fingertipsR package. I am on a MacBook Air and I am using RStudio version Version 1.3.1093. I am running the following line of code:

install.packages("fingertipsR", repos = "https://dev.ropensci.org")

And getting the following message:

Warning in install.packages :
  dependencies ‘miniUI’, ‘shiny’, ‘shinycssloaders’ are not available
installing the source package ‘fingertipsR’

trying URL 'https://dev.ropensci.org/src/contrib/fingertipsR_1.0.5.tar.gz'
Content type 'application/x-gzip' length 351361 bytes (343 KB)
==================================================
downloaded 343 KB

ERROR: dependencies ‘miniUI’, ‘shiny’, ‘shinycssloaders’ are not available for package ‘fingertipsR’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/fingertipsR’
Warning in install.packages :
  installation of package ‘fingertipsR’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/7x/yhkdjwwd08l7zdxy1m4gsw2h0000gn/T/RtmpEGSqeB/downloaded_packages’

If I then run: library(fingertipsR)

or try to use the function fingertips_data, it is not available. Any thoughts on what might be happening? Thanks!

sebastian-fox commented 3 years ago

HI @DS-Rodrigues - thanks for the message. This is a strange one and something a little out of my control/understanding. Can you try installing the package in RGui instead of RStudio (and make sure RStudio is closed)? If the installation works there, it should be available when you re-open RStudio. Please let me know how you get on...

VictimOfMaths commented 3 years ago

I have the same issue (on a Windows PC), which happens whether I run the installation in RStudio or the R GUI.

image

DS-Rodrigues commented 3 years ago

HI @DS-Rodrigues - thanks for the message. This is a strange one and something a little out of my control/understanding. Can you try installing the package in RGui instead of RStudio (and make sure RStudio is closed)? If the installation works there, it should be available when you re-open RStudio. Please let me know how you get on...

Sorry Sebastian for my really slow reply. I ended up not using the package. But I just tried to install it now and I get the messages below. I can now install the package but cannot load it.

install.packages("fingertipsR", repos = "https://dev.ropensci.org") Warning in install.packages : dependencies ‘miniUI’, ‘shiny’, ‘shinycssloaders’ are not available trying URL 'https://dev.ropensci.org/bin/macosx/contrib/4.0/fingertipsR_1.0.5.9000.tgz' Content type 'application/x-gzip' length 193703 bytes (189 KB)

downloaded 189 KB

The downloaded binary packages are in /var/folders/7x/yhkdjwwd08l7zdxy1m4gsw2h0000gn/T//RtmpUfAvtb/downloaded_packages

library(fingertipsR) Error: package or namespace load failed for ‘fingertipsR’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘miniUI’

sebastian-fox commented 3 years ago

Thanks @DS-Rodrigues and @VictimOfMaths . Would you be able to share your sessionInfo()?

DS-Rodrigues commented 3 years ago

Sure, here it is:

sessionInfo() R version 4.0.4 (2021-02-15) 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 [6] methods base

loaded via a namespace (and not attached): [1] modeltools_0.2-23 tidyselect_1.1.0 xfun_0.19
[4] remotes_2.2.0 kernlab_0.9-29 purrr_0.3.4
[7] lattice_0.20-41 vctrs_0.3.6 generics_0.1.0
[10] testthat_3.0.0 htmltools_0.5.1.1 usethis_2.0.1
[13] stats4_4.0.4 yaml_2.2.1 utf8_1.2.1
[16] rlang_0.4.10 pkgbuild_1.1.0 pillar_1.5.1
[19] glue_1.4.2 withr_2.3.0 DBI_1.1.0
[22] prabclus_2.3-2 sessioninfo_1.1.1 fpc_2.2-9
[25] lifecycle_1.0.0 robustbase_0.93-7 devtools_2.3.2
[28] memoise_2.0.0 evaluate_0.14 knitr_1.30
[31] callr_3.5.1 fastmap_1.1.0 ps_1.4.0
[34] parallel_4.0.4 flexmix_2.3-17 class_7.3-18
[37] fansi_0.4.2 DEoptimR_1.0-8 diptest_0.75-7
[40] cachem_1.0.3 desc_1.2.0 pkgload_1.1.0
[43] fs_1.5.0 digest_0.6.27 processx_3.4.5
[46] dplyr_1.0.5 rprojroot_2.0.2 grid_4.0.4
[49] cli_2.3.1 tools_4.0.4 magrittr_2.0.1
[52] tibble_3.1.0 cluster_2.1.0 crayon_1.4.1
[55] pkgconfig_2.0.3 ellipsis_0.3.1 MASS_7.3-53
[58] prettyunits_1.1.1 assertthat_0.2.1 rmarkdown_2.5
[61] R6_2.5.0 mclust_5.4.7 nnet_7.3-15
[64] compiler_4.0.4

TomPapePHE commented 3 years ago

I was just running into the same issue ; and the solution was simply to first execute install.packages("shinycssloaders") and the other two packages before proceeding with install.packages("fingertipsR", repos = "https://dev.ropensci.org"). Thus the option of automatically installing dependencies may just be missing in the code -- just a guess.

sebastian-fox commented 3 years ago

Thanks @TomPapePHE - sorry @VictimOfMaths / @DS-Rodrigues , this completely dropped off my radar. I don't know if you are still facing issues, and if so, whether @TomPapePHE 's solution helps?