8-bit-sheep / googleAnalyticsR

Use the Google Analytics API from R
https://8-bit-sheep.com/googleAnalyticsR/
Other
259 stars 76 forks source link

measurementProtocol not available for R 4.0.4 #397

Closed FranciscoKerche closed 2 years ago

FranciscoKerche commented 2 years ago

What goes wrong

I am trying to install the most recent version of the googleAnalyticsR package, on a virtual machine but it returns an error that it failed to install measurementProtocol for my version of R. The package documentation states that it needs an R that has a version greater than 3.3.0. Mine is 4.0.4 and it is not being able to run it.

Steps to reproduce the problem

The issue I was having was similar to this former issue. We store our files locally to keep them safe, and just get the environment to use them as information. So, we used ga_auth(json_file = Sys.getenv('GOOGLE_CREDENTIAL_PASSWORD')) to read the JSON file contents, as we can't access the file itself. However, the package is not able to read it. As I was reading the previous issue, I realized that the problem was the same, and it happened because the package was out of date, it was downloaded the version 0.8.0, and the issue was solved on 1.0.0.

To avoid this error, I attempted to install it with the most recent package version using remotes::install_github("MarkEdmondson1234/googleAnalyticsR") . We, then, received an error where MarkEdmondson1234/measurementProtocol wasn't available for download on our current version of R.

Expected output

It was expected that the googleAnalyticsR would be downloaded considering the specifications and, once it is downloaded, that it was able to read the JSON file content stored on GOOGLE_CREDENTIAL_PASSWORD.

Actual output

This is the error log:

02/07/2022 11:54:37 AM Error: Failed to install 'googleAnalyticsR' from GitHub: 02/07/2022 11:54:37 AM (converted from warning) package 'measurementProtocol' is not available for this version of R

However, the documentation states that the package is available for R version 3.3.0 or greater, which is clearly the case. Is there any suggestion on how to deal with it?

Session Info

The sessionInfo() is the following:

R version 4.0.4 (2021-02-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.2 LTS

Matrix products: default BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=C
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

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

Thank you very much for any help!

MarkEdmondson1234 commented 2 years ago

Hmm I'm sorry you are having trouble, I can only think its a temporary issue with CRAN or you need to upgrade perhaps to R 4.1.1 ? I've tried it again locally and it works, but on CRAN I can't find the check results https://cran.r-project.org/web/checks/check_results_measurementProtocol.html

Perhaps you can try installing it from GitHub on your VM? remotes::install_github("MarkEdmondson1234/measurementProtocol")

MarkEdmondson1234 commented 2 years ago

I think this should be sorted now? Please reopen if not.