Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r4ds build fails at model-building.Rmd #514

Closed
stuzog opened this issue Jan 9, 2018 · 3 comments
Closed

r4ds build fails at model-building.Rmd #514

stuzog opened this issue Jan 9, 2018 · 3 comments
Labels
question general questions - not an issue
Milestone

Comments

@stuzog
Copy link

stuzog commented Jan 9, 2018

Attempts to build r4ds consistently fail at model-building.Rmd with this error:

Line 144 Error in overscope_eval_next(overscope, expr) : object 'G' not found

No help from Stack Overflow https://stackoverflow.com/search?q=r+bookdown+%22Execution+halted%22


> devtools::session_info('bookdown')
Session info ---------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.4.3 (2017-11-30)
 system   x86_64, darwin15.6.0        
 ui       RStudio (1.1.412)           
 language (EN)                        
 collate  en_CA.UTF-8                 
 tz       America/Vancouver           
 date     2018-01-09                  

Packages -------------------------------------------------------------------------------------------
 package   * version date       source                           
 backports   1.1.2   2017-12-13 CRAN (R 3.4.3)                   
 base64enc   0.1-3   2015-07-28 CRAN (R 3.4.0)                   
 bookdown    0.5.15  2018-01-09 Github (rstudio/bookdown@38efc82)
 digest      0.6.13  2017-12-14 CRAN (R 3.4.3)                   
 evaluate    0.10.1  2017-06-24 CRAN (R 3.4.1)                   
 graphics  * 3.4.3   2017-12-07 local                            
 grDevices * 3.4.3   2017-12-07 local                            
 highr       0.6     2016-05-09 CRAN (R 3.4.0)                   
 htmltools   0.3.6   2017-04-28 CRAN (R 3.4.0)                   
 jsonlite    1.5     2017-06-01 CRAN (R 3.4.0)                   
 knitr       1.18    2017-12-27 CRAN (R 3.4.3)                   
 magrittr    1.5     2014-11-22 CRAN (R 3.4.0)                   
 markdown    0.8     2017-04-20 CRAN (R 3.4.0)                   
 methods   * 3.4.3   2017-12-07 local                            
 mime        0.5     2016-07-07 CRAN (R 3.4.0)                   
 Rcpp        0.12.14 2017-11-23 CRAN (R 3.4.3)                   
 rmarkdown   1.8     2017-11-17 CRAN (R 3.4.2)                   
 rprojroot   1.3-2   2018-01-03 CRAN (R 3.4.3)                   
 stats     * 3.4.3   2017-12-07 local                            
 stringi     1.1.6   2017-11-17 CRAN (R 3.4.2)                   
 stringr     1.2.0   2017-02-18 CRAN (R 3.4.0)                   
 tools       3.4.3   2017-12-07 local                            
 utils     * 3.4.3   2017-12-07 local                            
 yaml        2.1.16  2017-12-12 CRAN (R 3.4.3)                   
> rmarkdown::pandoc_version()
[1] ‘1.19.2.1’
> system('pdflatex --version')
pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017)
kpathsea version 6.2.3
Copyright 2017 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.29; using libpng 1.6.29
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 3.04
> 
> 


@yihui yihui added this to the v0.6 milestone Jan 10, 2018
@yihui yihui added the question general questions - not an issue label Jan 10, 2018
@yihui
Copy link
Member

yihui commented Jan 10, 2018

Please consult the book authors first, since I'm not very familiar with the content of this book, and I have no idea what G is in this case. You may come back if it turns out to be a bug of bookdown. Thanks!

@yihui yihui closed this as completed Jan 10, 2018
@stuzog
Copy link
Author

stuzog commented Jan 10, 2018

Thanks, yihui. The error was in the model-building.Rmd file, solution 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)

See:

hadley/r4ds#608
and
tidyverse/modelr#58

Stuart

@github-actions
Copy link

github-actions bot commented Nov 6, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question general questions - not an issue
Projects
None yet
Development

No branches or pull requests

2 participants