Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple errors: can’t run the package #19

Closed
DanDKL opened this issue Apr 14, 2019 · 11 comments
Closed

multiple errors: can’t run the package #19

DanDKL opened this issue Apr 14, 2019 · 11 comments

Comments

@DanDKL
Copy link

DanDKL commented Apr 14, 2019

Dear all,
I'd really like to use report, I think it's a very neat package. But I'm having some problems.
I ran a bays mix model and report does not seem to work.

If i run:

fit1 <- stan_lmer(Agency ~ Condition + Time + IAc_tot + (1|Soggetti), data = df )
r <- report:::report(fit1)

I get:

Error: 'rope_bounds' is not an exported object from 'namespace:bayestestR'

If I run:

r <- psycho::analyze(fit1)

I get:

Warning messages:
1: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.
 
2: In R2_LOO_Adjusted(fit) :
  Something went wrong in the Loo-adjusted R2 computation.

But I'm able to see a summary of the model and all the relevant information (which I'm not able to do with report).

r

We fitted a Markov Chain Monte Carlo gaussian (link = identity) [... etc.]
The model has an explanatory power (R2) of about 64.88% (MAD = 0.06, 90% CI [0.54, 0.74]). The intercept is at 3.90 (MAD = 0.64, 90% CI [2.88, 4.93]). Within this model:

  • The effect of Conditionas has a probability of 99.15% of being negative (Median = -0.67, MAD = 0.27, 90% CI [-1.09, -0.22], Overlap = 22.75%). etc...

I can also just extract the summary with

summary(r, round = 2)

And everything works fine.

I'm running R 3.5.3 (x64) and R studio Version 1.2.1335 on a Windows 10 machine.
other attached packages:
[1] lme4_1.1-21 Matrix_1.2-17 report_0.1.0 tidyr_0.8.3 estimate_0.1.0 dplyr_0.8.0.1 rstanarm_2.18.2 Rcpp_1.0.1
[9] psycho_0.4.9 ggplot2_3.1.1
[97] parameters_0.1.0

Side note: I had several problems in installing report package and estimate package.
They required the parameters package but this one always failed to install (zero exit error).
I solved by manually installing the parameters package v 0.1.0 and then when I ran

library(devtools)
devtools::install_github("easystats/report")
devtools::install_github("easystats/estimate")

Everything worked fine.

Anyway, I'd really appreciate any help.
Thank you very much.

Dan

@DominiqueMakowski
Copy link
Member

Short answer

Try re-installing all report's dependencies from github as follows:

install.packages("devtools")
devtools::install_github("easystats/easystats")

Does it work then?

Long answer

@DanDKL, as you might know, report is a very recent package, still not stable (that's why it is not yet on CRAN) and in active development. This active development can lead to frequent updates, changes and breaks (although we try to avoid them as much as possible). (That's why it might work for your colleague that has an older version and not with yours 😅)

The major part of this instability is due to the fact that report relies heavily on two other packages, namely parameters and performance, which themselves are not yet "stable" (but we're getting there). That's why it is possible that we updated something there which then broke the whole thing.

Thus, while we work on having the ecosystem stable and bug-free, we recommend installing all the most recent versions of the easystats packages (the collection of packages to which report belong), directly from github. This can be done by either installing easystats (see above), or forced by running:

easystats::install_easystats_latest()

Also, please do report any bug, issue, feelings or suggestions that could help us making these tools. If you have any issues, we are generally quite reactive and will try to make it work.

We apologise in advance for the issues related to this "early-access" nature of report, and hope that it is worth the trouble 😉

@DanDKL
Copy link
Author

DanDKL commented Apr 14, 2019

Hi @DominiqueMakowski,
thank you very much for your reply and do no apologize. You all are doing great work that is useful for a lot of people :)

regarding the short answer... I forgot to mention that Yes, the other day I also tried to run all the dependencies installing easy stats with the same code:

install.packages("devtools")
devtools::install_github("easystats/easystats")

But nothing changed.

If I run the command now I get the same zero exit error on the parameters package:

Installing package into ‘C:/Users/DDL/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)

  • installing source package 'parameters' ...
    ** R
    Error : (contertito da avviso) namespace 'caret' is not available and has been replaced
    by .GlobalEnv when processing object 'classify_distribution'
    ERROR: unable to build sysdata DB for package 'parameters'
  • removing 'C:/Users/DDL/Documents/R/win-library/3.5/parameters'
  • restoring previous 'C:/Users/DDL/Documents/R/win-library/3.5/parameters'
    In R CMD INSTALL
    Error in i.p(...) :
    (converted from warning) installation of package ‘C:/Users/DDL/AppData/Local/Temp/RtmpeqBQm8/fileac050ac36c2/parameters_0.1.0.tar.gz’ had non-zero exit status

And the installation gets terminated.
Other packages seem to have installed, although some of them are skipped:

Skipping install of 'bayestestR' from a github remote, the SHA1 (e7ea39b7) has not changed since last install.
Use force = TRUE to force installation

Unfortunately, I still got the problem:

r <- report::report(fit1)
Error: 'rope_bounds' is not an exported object from 'namespace:bayestestR'

on the other hand the following code does not work for me either...

library(easystats)
easystats::install_easystats_latest()

library(easystats)
Attaching package: ‘insight’
The following object is masked from ‘package:psycho’:
get_data
Carico il pacchetto richiesto: performance
Carico il pacchetto richiesto: bayestestR
Attaching package: ‘bayestestR’
The following objects are masked from ‘package:psycho’:
rnorm_perfect, rope
Carico il pacchetto richiesto: parameters
Attaching package: ‘parameters’
The following object is masked from ‘package:bayestestR’:
ci
The following object is masked from ‘package:insight’:
get_priors
The following objects are masked from ‘package:psycho’:
odds_to_probs, standardize
Carico il pacchetto richiesto: correlation
Attaching package: ‘correlation’
The following object is masked from ‘package:psycho’:
correlation
Carico il pacchetto richiesto: see
easystats::install_easystats_latest()
Error: 'install_easystats_latest' is not an exported object from 'namespace:easystats'

I'd like to point out that I'm no expert in R at all :)
so it could be something silly and trivial that I'm missing, and I have to apologize for that :D

@strengejacke
Copy link
Member

The methods mentioned were not exported yet... I tried to fix this here:
easystats/easystats@781e71e

Either, re-install easystats from GitHub, or - without needing to re-install - use:

easystats:::install_easystats_latest()

(note the triple colons)

@DanDKL
Copy link
Author

DanDKL commented Apr 14, 2019

Hi @strengejacke,
thank for the reply:
If I use easystats:::install_easystats_latest()
(triple colons) I get:

easystats:::install_easystats_latest()
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'install_easystats_latest' not found

If I try to reinstall from github, the installation gets terminated with the zero exit error in the parameters pack. I previously solved this manually installing this specific pack

@DominiqueMakowski
Copy link
Member

😕 something must have gone bad.

Could you try:

devtools::install_github("easystats/insight", force=TRUE)
devtools::install_github("easystats/bayestestR", force=TRUE)
devtools::install_github("easystats/performance", force=TRUE)
devtools::install_github("easystats/parameters", force=TRUE)
devtools::install_github("easystats/correlation", force=TRUE)
devtools::install_github("easystats/estimate", force=TRUE)
devtools::install_github("easystats/report", force=TRUE)

And paste the console output? Thanks and sorry for the trouble!

@DanDKL
Copy link
Author

DanDKL commented Apr 14, 2019

Ok guys, I have I small update that I hope can help solve the problem
I opened a machine with an old R version: 3.5.1.
I already tried yesterday on this machine and I:

  1. did not get the zero exit error on the parameters pack.
  2. but got the same error on the report pack

So I used your suggestions on this machine, and it works :)
If I reinstall easystats via github I do not get the zero exit error on the parameters pack (as before) and everything get updated fine.
But then if I run the report... it works too :)

> r <- report::report(fit1)
Warning message:
Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.
 
> to_text(r)
We fitted a Bayesian linear mixed model to predict Agency with Condition, Time and IAc_tot. The model included etc...
 The model's explanatory power is substantial (R2's median = 0.65, LOO adj. R2 = 0.47). Within this model etc...

Side note: if I run
easystats:::install_easystats_latest()
on this machine with r 3.5.1... it works without any problem.

So... could it be some incomaptibility issue with the 3.5.3?
@DominiqueMakowski I'll try as soon as possibile, right now github tells me that I have exceeded my API rate limit and I have to wait :\

@DominiqueMakowski
Copy link
Member

🎉 Glad it works! I believe it is because we did some updates between yesterday and now :)

@DanDKL
Copy link
Author

DanDKL commented Apr 14, 2019

🎉 Glad it works! I believe it is because we did some updates between yesterday and now :)

I'm glad too, at least I can use report for the current analyses I'm running. :)
Since I have to send the code to my coworkers, do you suggest to downgrade the R version on their machines from 3.5.3. to 3.5.1?
Or this update helped you to figured out the problem and it will be fixed in the next repo update, therefore they just have to wait?

Obviously I'll tried to force the installation on the 3.5.3 as soon as github will allow me and report back :)

@DanDKL
Copy link
Author

DanDKL commented Apr 14, 2019

btw thanks you all for the support :)

@DominiqueMakowski
Copy link
Member

Normally it should (hopefully) now work on almost all R versions, as we designed easystats to be quite compatible. So if your coworkers install easystats (devtools::installl_github("easystats/easystats"), every package should correctly install itself), If there are any problems though, please advise your coworkers to report them (no pun intended) here. We will try to address them: all reported bugs or issues are good for us, as it makes the tools better in the end ☺️.

Let us know of anything

@DanDKL
Copy link
Author

DanDKL commented Apr 14, 2019

here the last update :)
So, I tried to force the installation as @DominiqueMakowski suggested.
I can force install all the packages but parameters. Parameters keeps giving the "zero exit" error.

Error in i.p(...) : 
  (converted from warning) installation of package ‘C:/Users/DDL/AppData/Local/Temp/Rtmp6FmOA3/file276c735c165/parameters_0.1.0.tar.gz’ had non-zero exit status

Nonetheless, since I was able to force install the report package... now it works on r 3.5.3 too :)
I still do not understand that zero exit error. I'll probably reinstall r from scratch to see if I something changes. :) But for now, it works!

Thanks for the support and for the great work! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants