Closed bappa10085 closed 2 years ago
Let me look into this and get back to you. We have had issues with eval() in a few other cases and looks like this might be related as well.
Please try with the development version of olsrr from GitHub and let me know if the error persists.
Using the development version of olsrr
from GitHub, it is working. Thank you very much for your help.
I am trying to use
ols_step_both_p
withgroup_by
function ofdplyr
package. I am using the following codeIf we see the output, they are the same for both locations.
If you apply
ols_step_both_p
for a single location it works fine likeWhy is this not working for all the locations when using with
dplyr
?Edit I have further dig it down and find that if I use
data = .
indo(mod = lm(y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12, data = ., na.action=na.omit))
, then the outputs for 2 locations are different. Butols_step_both_p(model$mod[[1]], pent = 0.05, prem = 0.1)
returns me following errorIf I use
data = df
indo(mod = lm(y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12, data = df, na.action=na.omit))
, then the error does not appear but output ofmodel$mod[[1]]
andmodel$mod[[2]]
are same. How to remove the following error