{"action":"created","issue":{"url":"https://api.github.com/repos/ramnathv/htmlwidgets/issues/81","labels_url":"https://api.github.com/repos/ramnathv/htmlwidgets/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/ramnathv/htmlwidgets/issues/81/comments","events_url":"https://api.github.com/repos/ramnathv/htmlwidgets/issues/81/events","html_url":"https://github.com/ramnathv/htmlwidgets/issues/81","id":57734515,"number":81,"title":"allow pandoc option setting from saveWidget","user":{"login":"hrbrmstr","id":509878,"avatar_url":"https://avatars.githubusercontent.com/u/509878?v=3","gravatar_id":"","url":"https://api.github.com/users/hrbrmstr","html_url":"https://github.com/hrbrmstr","followers_url":"https://api.github.com/users/hrbrmstr/followers","following_url":"https://api.github.com/users/hrbrmstr/following{/other_user}","gists_url":"https://api.github.com/users/hrbrmstr/gists{/gist_id}","starred_url":"https://api.github.com/users/hrbrmstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrbrmstr/subscriptions","organizations_url":"https://api.github.com/users/hrbrmstr/orgs","repos_url":"https://api.github.com/users/hrbrmstr/repos","events_url":"https://api.github.com/users/hrbrmstr/events{/privacy}","received_events_url":"https://api.github.com/users/hrbrmstr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-15T15:50:09Z","updated_at":"2015-03-08T14:14:38Z","closed_at":null,"body":"When trying to prep some examples for a blog post for a new widget I tripped the following error:\r\n\r\n    Stack space overflow: current size 33632 bytes.\r\n    Use `+RTS -Ksize -RTS' to increase it.\r\n    Error: pandoc document conversion failed with error 2\r\n\r\nIt doesn't happen when knitting, though, so this may just be a weird edge case.\r\n\r\n    library(dplyr)\r\n    library(babynames)\r\n    library(streamgraph) # devtools::install_github(\"hrbrmstr/streamgraph\")\r\n\r\n    babynames %>%\r\n      filter(grepl(\"^Kr\", name)) %>%\r\n      group_by(year, name) %>%\r\n      tally(wt=n) %>%\r\n      streamgraph(\"name\", \"n\", \"year\", offset=\"zero\", interpolate=\"linear\", width=750, height=310) %>%\r\n      sg_legend(show=TRUE, label=\"Kr- names: \") -> two\r\n\r\n    saveWidget(two, \"two.html\", TRUE)\r\n\r\nto reproduce (but a restart of RStudio also cleared the error at least one time for me).\r\n\r\nUPDATE\r\n\r\nIt's pretty reproducible, but even using the extra parameters from the command line (bash, pandoc 1.13.x, os x 10.10.x) didn't solve the issue. I think it requires compiling pandoc to support rts options. ugh. \r\n\r\nfolks might just want to be careful when making ginormous vis."},"comment":{"url":"https://api.github.com/repos/ramnathv/htmlwidgets/issues/comments/77751038","html_url":"https://github.com/ramnathv/htmlwidgets/issues/81#issuecomment-77751038","issue_url":"https://api.github.com/repos/ramnathv/htmlwidgets/issues/81","id":77751038,"user":{"login":"kbroman","id":53972,"avatar_url":"https://avatars.githubusercontent.com/u/53972?v=3","gravatar_id":"","url":"https://api.github.com/users/kbroman","html_url":"https://github.com/kbroman","followers_url":"https://api.github.com/users/kbroman/followers","following_url":"https://api.github.com/users/kbroman/following{/other_user}","gists_url":"https://api.github.com/users/kbroman/gists{/gist_id}","starred_url":"https://api.github.com/users/kbroman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbroman/subscriptions","organizations_url":"https://api.github.com/users/kbroman/orgs","repos_url":"https://api.github.com/users/kbroman/repos","events_url":"https://api.github.com/users/kbroman/events{/privacy}","received_events_url":"https://api.github.com/users/kbroman/received_events","type":"User","site_admin":false},"created_at":"2015-03-08T14:14:38Z","updated_at":"2015-03-08T14:14:38Z","body":"The problem can be related to the size of the data being placed in the widget. With [R/qtlcharts](http://github.com/kbroman/qtlcharts), I get this stack space overflow error only for the `iplotMScanone` function, and only with larger data sets. Here's an example (a subset of [this gist](https://gist.github.com/kbroman/5d8a4ad051e23b9155b7)):\r\n\r\n```r\r\nlibrary(qtl)\r\nlibrary(qtlcharts)\r\nlibrary(htmlwidgets)\r\ndata(grav)\r\ngrav$pheno <- grav$pheno\r\ngrav <- calc.genoprob(grav)\r\nout <- scanone(grav, phe=1:nphe(grav), method=\"hk\")\r\n\r\n# this is okay\r\nout_plot1 <- iplotMScanone(out, lodcolumn=1:103)\r\nsaveWidget(out_plot1, file=\"tmp1.html\")\r\n \r\n# this gives \"stack space overflow\"\r\nout_plot3 <- iplotMScanone(out, lodcolumn=1:104)\r\nsaveWidget(out_plot3, file=\"tmp3.html\")\r\n```"}}