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

Problem installing FingertipsR #98

Open tristan-childs opened 3 years ago

tristan-childs commented 3 years ago

Hello

There seems to be a problem with installing the FingertipsR package. The exact error is below – it seems to be saying that FingertipsR isn’t available for my version of R (4.1.0). I have tried in RGui but it doesn’t work either.

Is this a known bug or am I doing something wrong?

Thanks, Tristan

My code, error message and session info:

install.packages("fingertipsR", repos = "https://dev.ropensci.org") Installing package into ‘C:/LocalRData/Library’ (as ‘lib’ is unspecified) Warning in install.packages : unable to access index for repository https://dev.ropensci.org/src/contrib: Line starting ' ...' is malformed! Warning in install.packages : package ‘fingertipsR’ is not available for this version of R

A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages Warning in install.packages : unable to access index for repository https://dev.ropensci.org/bin/windows/contrib/4.1: Line starting ' ...' is malformed!

sessionInfo() R version 4.1.0 (2021-05-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] compiler_4.1.0 tools_4.1.0

sebastian-fox commented 3 years ago

Hi @tristan-childs - thanks for this. This isn't a known bug not do I think you are doing anything wrong. I've not seen this before, so this may take some time to get to the bottom of.

I've just copied and pasted your line of code in my RStudio

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

...and it worked fine. This was my first google result, have you checked this in your Global options? Otherwise, google results suggest is might just be a temporary thing while servers refresh. Have you tried again since you got the issue?

tristan-childs commented 3 years ago

Thanks for the quick reply @sebastian-fox and for the suggestions. I have amended the package option as suggested in the linked thread and retried running the code this morning. Still getting the same error message.

Other colleagues in my organisation are getting the same error so maybe this is an issue with our IT setup. I will speak with our IT team to see if it is something at our end.

Thanks.

sebastian-fox commented 3 years ago

Thanks for trying these out. Yes, it could be something with your IT's configuration. Can you access this page in a normal browser: https://dev.ropensci.org/?

I'll leave the issue open in case I need to follow up.

Thank you

tristan-childs commented 3 years ago

Yes, I can access that page.

Tasnim-Khanom commented 3 years ago

Hello,

I've just tried out installing fingertipsR (I know I'm quite late) however for some reason R does not let me install it. It states that it is not available in my version of R which is 4.1.1, similar to @tristan-childs issue.

This is what happens.

install.packages("fingertipsR", repos = "https://dev.ropensci.org") Warning: unable to access index for repository https://dev.ropensci.org/src/contrib: cannot open URL 'https://dev.ropensci.org/src/contrib/PACKAGES' Warning: unable to access index for repository https://dev.ropensci.org/bin/macosx/contrib/4.1: cannot open URL 'https://dev.ropensci.org/bin/macosx/contrib/4.1/PACKAGES' Warning message: package ‘fingertipsR’ is not available for this version of R

A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

Is there a way I can sort it out or am I missing out on anything?

Thank you, Tasnim

sebastian-fox commented 3 years ago

Hi @Tasnim-Khanom - I can't replicate your issue; I've just managed to run your first line of code successfully. Could you try again? It will rule out whether or not there was some downtime on the ropensci server if you get the same message.

If you still get the error, do you know whether there are any firewalls where you are trying to install it that might be preventing you from accessing the site?

Thank you

Tasnim-Khanom commented 3 years ago

Hi @sebastian-fox

I've ran it again however I'm still receiving the same message, even after turning the Firewall off in my settings.

"https://dev.ropensci.org" - This website works for me.

However, when click the link to open: "https://dev.ropensci.org/src/contrib/PACKAGES", the following page opens:

FingertipsR issue

Thanks

russell-phe commented 3 years ago

Hi @Tasnim-Khanom!

Can you install packages from CRAN ok (e.g. running install.packages('dplyr')? If not, then it might be checking this post out. Failing that, if it is still a problem and you need FingertipsR sooner you can try and install using remotes:

install.packages('remotes')
remotes::install_github("rOpenSci/fingertipsR",
                        build_vignettes = TRUE,
                        dependencies = "suggests")

If you're still having problems, reply on here and we can look into it.

Cheers,

Russell

Tasnim-Khanom commented 3 years ago

Hi @russell-phe

Thanks for your reply. I can successfully install packages from CRAN. The 'install.packages("dplyr")' works for me. It's just the 'install.packages("fingertipsR", repos = "https://dev.ropensci.org")' that doesn't work. Do I still use the remotes version although CRAN works?

Thank you, Tasnim

russell-phe commented 3 years ago

@Tasnim-Khanom

Yes, try using the remotes code - that tries to install from github rather than through ropensci. If there is a problem with your machine accessing ropensci then is should be able to be installed from github. If its a wider problem then you might still have issues installing, and we'll need to investigate further.

Cheers,

Russell

Tasnim-Khanom commented 3 years ago

@russell-phe

Thanks - I tried using the remotes code. However, for some reason, there appears to be an error installing the FingertipsR package from github.

Attached are screenshots of the output from the code.

Remote Install Error 1 R Install Error 2

Thank You, Tasnim

russell-phe commented 3 years ago

hmmmm, ok, try installing the dependencies first:

install.packages(c('curl', 'httr', 'miniUI'))

Then try the remotes code again

Tasnim-Khanom commented 3 years ago

@russell-phe

I've installed the dependencies (which was successful), but doing the remotes again after the dependencies, I got the same error message as last time (with a bit more detail I believe such as 'failed rebuilding 'lifeExpectancy.Rmd')

Error 3

Thank you,

Tasnim

GemmaDonnelly commented 2 years ago

Hi

I'm having the same issue - I get an error saying fingertipsR cannot be installed with the version of R that I have (4.1.3). I've tried the above as well as installing different R versions but still can't get it to work.

Any help would be greatly appreciated.

Many thanks

Gemma

sebastian-fox commented 2 years ago

Hi @GemmaDonnelly - could you paste your code in please along with the error messages you are getting. Thank you

GemmaDonnelly commented 2 years ago

Hi Sebastian

Thanks for your quick reply. Below is the error I'm getting, I've tried to install on my own PC, an organisation PC and a university PC and all are giving the same error so I think it's something I'm doing wrong but I can't work out what.

Thanks for the help.

install.packages("fingertipsR") WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/Gemma/Documents/R/win-library/4.1’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘fingertipsR’ is not available for this version of R

A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

sebastian-fox commented 2 years ago

Hi @GemmaDonnelly - thank you. The package isn't on CRAN, so the regular install.packages() function doesn't work like it does for other packages. Please could you try:

install.packages("fingertipsR", repos = "https://dev.ropensci.org")
GemmaDonnelly commented 2 years ago

Thank you - I'm now getting the following error: (I've tried adding dependencies=TRUE)

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

sebastian-fox commented 2 years ago

Sorry @GemmaDonnelly - this must be frustrating for you. I don't know how to remedy this centrally, but I'm happy to get to the bottom of it with you. It looks like you need to install the DT packages with install.packages("DT") then try again

GemmaDonnelly commented 2 years ago

Thank you - got there in the end! A lot of it is my inexperience with R but I had to download a few of the packages separately and now it's working fine. Thanks so much for your quick responses.

sebastian-fox commented 2 years ago

Great - glad you have got it working :)