{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/r4ds/issues/296","repository_url":"https://api.github.com/repos/hadley/r4ds","labels_url":"https://api.github.com/repos/hadley/r4ds/issues/296/labels{/name}","comments_url":"https://api.github.com/repos/hadley/r4ds/issues/296/comments","events_url":"https://api.github.com/repos/hadley/r4ds/issues/296/events","html_url":"https://github.com/hadley/r4ds/issues/296","id":172317981,"number":296,"title":"Book will not compile to PDF","user":{"login":"melindahiggins2000","id":7952816,"avatar_url":"https://avatars.githubusercontent.com/u/7952816?v=3","gravatar_id":"","url":"https://api.github.com/users/melindahiggins2000","html_url":"https://github.com/melindahiggins2000","followers_url":"https://api.github.com/users/melindahiggins2000/followers","following_url":"https://api.github.com/users/melindahiggins2000/following{/other_user}","gists_url":"https://api.github.com/users/melindahiggins2000/gists{/gist_id}","starred_url":"https://api.github.com/users/melindahiggins2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melindahiggins2000/subscriptions","organizations_url":"https://api.github.com/users/melindahiggins2000/orgs","repos_url":"https://api.github.com/users/melindahiggins2000/repos","events_url":"https://api.github.com/users/melindahiggins2000/events{/privacy}","received_events_url":"https://api.github.com/users/melindahiggins2000/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-08-21T12:04:53Z","updated_at":"2016-10-26T04:35:01Z","closed_at":"2016-08-21T15:33:03Z","body":"I just downloaded the repository via ZIP `r4ds-master.zip`. After extracting the files, opening the project in RStudio (preview version 0.99.1285), I installed the package `devtools::install_github(\"hadley/r4ds\")`. Then I ran `Build book` via `bookdown::gitbook` which worked great. However, `bookdown::pdf_book` had the following errors (I'm including the last few lines of the build log plus the error messages at the end):\r\n\r\n```\r\nlabel: unnamed-chunk-67 (with options) \r\nList of 1\r\n $ indent: chr \"    \"\r\n\r\n  |.................................................................| 100%\r\n   inline R code fragments\r\n\r\n\r\noutput file: strings.knit.md\r\n\r\nError: Functions that produce HTML output found in document targeting latex output.\r\nPlease change the output type of this document to HTML. Alternatively, you can allow\r\nHTML output in non-HTML formats by adding this option to the YAML front-matter of\r\nyour rmarkdown file:\r\n\r\n  always_allow_html: yes\r\n\r\nNote however that the HTML output will not be visible in non-HTML formats.\r\n\r\nExecution halted\r\nError in Rscript_render(f, render_args, render_meta) : \r\n  Failed to compile strings.Rmd\r\nCalls: <Anonymous> ... render_new_session -> tryCatch -> tryCatchList -> Rscript_render\r\nIn addition: Warning message:\r\nrunning command '\"C:/PROGRA~1/R/R-33~1.1/bin/x64/Rscript\" \"C:/Users/MKHIGGI/Documents/R/win-library/3.3/bookdown/scripts/render_one.R\" \"strings.Rmd\" \".\\render1fb019183b8d.rds\" \"_main.rds\"' had status 1 \r\nExecution halted\r\n\r\nExited with status 1.\r\n```\r\n\r\nHere is my current `sessionInfo()`\r\n\r\n```\r\n> sessionInfo()\r\nR version 3.3.1 (2016-06-21)\r\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\r\nRunning under: Windows >= 8 x64 (build 9200)\r\n\r\nlocale:\r\n[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   \r\n[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          \r\n[5] LC_TIME=English_United States.1252    \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nloaded via a namespace (and not attached):\r\n [1] Rcpp_0.12.6        bookdown_0.1.5     withr_1.0.2        digest_0.6.10     \r\n [5] assertthat_0.1     mime_0.5           R6_2.1.2           xtable_1.8-2      \r\n [9] git2r_0.15.0       magrittr_1.5       evaluate_0.9       httr_1.2.1        \r\n[13] stringi_1.1.1      curl_1.2           miniUI_0.1.1       rmarkdown_1.0.9005\r\n[17] devtools_1.12.0    tools_3.3.1        stringr_1.1.0.9000 shiny_0.13.2      \r\n[21] rsconnect_0.4.3    httpuv_1.3.3       yaml_2.1.13        memoise_1.0.0     \r\n[25] htmltools_0.3.5    knitr_1.14         tibble_1.1-9   \r\n```\r\n\r\nThank you for your time and development on an excellent book! -Melinda\r\n"},"comment":{"url":"https://api.github.com/repos/hadley/r4ds/issues/comments/256247272","html_url":"https://github.com/hadley/r4ds/issues/296#issuecomment-256247272","issue_url":"https://api.github.com/repos/hadley/r4ds/issues/296","id":256247272,"user":{"login":"napaxton","id":970096,"avatar_url":"https://avatars.githubusercontent.com/u/970096?v=3","gravatar_id":"","url":"https://api.github.com/users/napaxton","html_url":"https://github.com/napaxton","followers_url":"https://api.github.com/users/napaxton/followers","following_url":"https://api.github.com/users/napaxton/following{/other_user}","gists_url":"https://api.github.com/users/napaxton/gists{/gist_id}","starred_url":"https://api.github.com/users/napaxton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/napaxton/subscriptions","organizations_url":"https://api.github.com/users/napaxton/orgs","repos_url":"https://api.github.com/users/napaxton/repos","events_url":"https://api.github.com/users/napaxton/events{/privacy}","received_events_url":"https://api.github.com/users/napaxton/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T04:35:01Z","updated_at":"2016-10-26T04:35:01Z","body":"Sorry to re-open this. Having a similar problem with rendering a PDF of the book, and it seems to be the `strings.Rmd` chapter that is at the root of the problem.\r\n\r\nI've added `always_allow_html: yes` to the first line of the `index.rmd` file in the r4ds directory. I.e.,\r\n\r\n```\r\n---\r\nknit: \"bookdown::render_book\"\r\ntitle: \"R for Data Science\"\r\nauthor: [\"Garrett Grolemund\", \"Hadley Wickham\"]\r\ndescription: \"This book will teach you how to do data science with R: You'll learn how to get your data into R, get it into the most useful structure, transform it, visualise it and model it. In this book, you will find a practicum of skills for data science. Just as a chemist learns how to clean test tubes and stock a lab, you'll learn how to clean data and draw plots---and many other things besides. These are the skills that allow data science to happen, and here you will find the best practices for doing each of these things with R. You'll learn how to use the grammar of graphics, literate programming, and reproducible research to save time. You'll also learn how to manage cognitive resources to facilitate discoveries when wrangling, visualising, and exploring data.\"\r\nurl: 'http\\://r4ds.had.co.nz/'\r\ngithub-repo: hadley/r4ds\r\ntwitter-handle: hadley\r\ncover-image: cover.png\r\nsite: bookdown::bookdown_site\r\ndocumentclass: book\r\nalways_allow_html: yes\r\n---\r\n```\r\n\r\nRendering an HTML version works out of the box. But I'm unable to render PDF.\r\n\r\n```\r\n> sessionInfo()\r\nR version 3.3.0 (2016-05-03)\r\nPlatform: x86_64-apple-darwin13.4.0 (64-bit)\r\nRunning under: OS X 10.9.5 (Mavericks)\r\n\r\nlocale:\r\n[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8\r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nloaded via a namespace (and not attached):\r\n [1] Rcpp_0.12.7     bookdown_0.1.16 digest_0.6.10   assertthat_0.1 \r\n [5] mime_0.5        R6_2.2.0        xtable_1.8-2    magrittr_1.5   \r\n [9] evaluate_0.10   stringi_1.1.2   miniUI_0.1.1    rmarkdown_1.1  \r\n[13] tools_3.3.0     stringr_1.1.0   shiny_0.14.1    rsconnect_0.5  \r\n[17] httpuv_1.3.3    yaml_2.1.13     htmltools_0.3.5 knitr_1.14.12  \r\n[21] tibble_1.2  \r\n```"}}
{"actor":{"display_login":"napaxton"}}