You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error in overscope_eval_next(overscope, expr) : object 'G' not found #58
Thank you for all your efforts in making these libraries available. Much appreciated!
I believe I have found a minimal(ish) reproducible example of an issue I am also encountering.
library(tidyverse)
library(modelr)
smaller<-diamonds %>% filter(carat<3)
mod_diamond2<- lm(price~carat+color+cut+clarity, data=smaller)
grid<-smaller %>%
data_grid(cut, .model=mod_diamond2) %>%
add_predictions(mod_diamond2)
#> Error in eval_tidy(xs[[i]], unique_output): object 'G' not found
Activity
pkq commentedon Oct 17, 2017
fenghaolin commentedon Nov 20, 2017
hughchipman commentedon Nov 22, 2017
FWIW, a specific fix to the R for Data Science book is to replace
grid <- diamonds2 %>%
data_grid(cut, .model = mod_diamond2) %>%
add_predictions(mod_diamond2)
with this:
grid <- diamonds2 %>%
data_grid(cut, lcarat = -0.515, color = "G", clarity = "SI1") %>%
add_predictions(mod_diamond2)
Basically explicitly specifying the levels of all factors that are not to be gridded.
subaiwen commentedon Mar 30, 2018
hadley commentedon May 10, 2018
Minimal reprex:
Created on 2018-05-10 by the reprex package (v0.2.0).