简体   繁体   English

无法使用 sjPlot 的 plot_model function — 两个错误

[英]Unable to use sjPlot's plot_model function — two errors

I have a script that usually allows me to plot Odds Ratios with plot_model .我有一个脚本,通常允许我使用plot_model计算 plot 赔率。 However, when I tried to run it today, I got two errors.但是,当我今天尝试运行它时,出现了两个错误。

When using plot_model on a model that runs, RStudio told me the function could not be found.在运行的plot_model上使用 plot_model 时,RStudio 告诉我找不到 function。

I ensured sjPlot was installed and loaded and then tried using sjPlot::plot_model... to make sure R looked in the right package, but I got another error: object 'standard_error_robust' is not exported by 'namespace:parameters'我确保 sjPlot 已安装并加载,然后尝试使用sjPlot::plot_model...以确保 R 看起来正确 package,但我收到另一个错误: object 'standard_error_robust' is not exported by 'namespace:parameters'

  1. What might cause that error?什么可能导致该错误?

  2. How might I solve the problem to get the plot_model function working again?我该如何解决问题才能让plot_model function 再次工作?

@Stefan found the answer for me on a GitHub page. @Stefan 在 GitHub 页面上为我找到了答案。

I'm pasting the steps that I used from that page below:我正在粘贴我从下面该页面使用的步骤:

  1. Restart R (or RStudio, or whatever you're using)重新启动 R(或 RStudio,或任何您正在使用的)
  2. If RStudio, also press Shift + F10如果是 RStudio,还要按 Shift + F10
  3. Run easystats::install_latest()运行easystats::install_latest()
  4. Run install.packages(c("sjstats", "sjPlot"))运行install.packages(c("sjstats", "sjPlot"))

For this, I tried everything but ultimately one thing worked for me:为此,我尝试了一切,但最终有一件事对我有用:

I had to update all the libraries in R console, it worked for me我必须更新 R 控制台中的所有库,它对我有用

update.packages(ask = FALSE)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM