r-lib / rlang

Low-level API for programming with R
https://rlang.r-lib.org
Other
508 stars 138 forks source link

sim_slopes encounters an issue with rlang-package #1529

Closed Jendryczko closed 1 year ago

Jendryczko commented 1 year ago

It seems that there is some sort of compatability issue with the latest version of the interactions-package with the latest version of the rlang-package, and -potentially - also the latest version of R and RStudio. If I run the first example provided for "sim_slopes":

fiti <- lm(Income ~ Frost + Murder * Illiteracy,

I get the following error: Error: ! class must be a character vector, not a list. Backtrace:

  1. interactions::sim_slopes(model = fiti, pred = Murder, modx = Illiteracy)
  2. jtools:::summ.lm(...)
  3. jtools:::do_robust(model, robust, cluster, data, vcov)
  4. jtools::get_robust_se(...)
  5. jtools::stop_wrap(...)
  6. rlang (local) <fn>(class = )

versions: packageVersion('interactions')# ‘1.1.5' packageVersion('rlang')# ‘1.0.6’ packageVersion('jtools')# 2.2.1

R-version: 4.2.2.

RStudio-version: 2022.07.2 Build 576

There already exists a stackoverflow entry for this: https://stackoverflow.com/questions/74720514/interactions-and-rlang-error-class-must-be-a-character-vector-not-a-list

But updating the dependencies for jtools and rlang did not help in my case. Does anybody have any solutions?

lionel- commented 1 year ago

rlang::abort() is now stricter with the class argument and checks that it's actually a character vector.

Can you report this in jtools please?