Hi everyone, I'm new to R.
I'm trying to conduct a pairwise comparison using emmeans for a random intercept model with covariate. My codes ran smoothly on my work laptop (Mac). No error message, everything is fine. When I ran the same exact codes on my home computer (also Mac), all of a sudden, I get the following error message for the codes below:
emm1 <- emmeans(object = lm4re,
specs = ~ Group,
ref_grid(object = lm4re,
at = list(Pretest = mean(dat2$Pretest))),
adjust = "tukey")
Error in as.vector(y) : no method for coercing this S4 class to a vector
What does this error mean? Also, the most perplexing issue for me is the fact that the data set and the codes are exactly the same. I thought maybe my version of R was corrupted, so I uninstalled and reinstalled the latest R version. 3.6.1 and the latest Rstudio version 1.2.5019 but that did not solve the issue. I am still getting the same error.
I tried the same codes and data set on a 3rd computer and once again, there was no error message.