HTML vignettes crashing your RStudio? This may be the reason
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Short version: if RStudio on Windows 7 crashes when viewing vignettes in HTML format, it may be because those packages specify knitr::rmarkdown as the vignette engine, instead of knitr::knitr and you’re using rmarkdown v1.
Longer version with details – read on.
update: looks like this issue relates to the installed version of rmarkdown (1.3 in my case) – see here for details.
At work I run RStudio (currently version 1.0.136) on Windows 7 (because I have no choice). This works:
- open the
Packagestab - click on
broom - click on
User guides, package vignettes and other documentation - click on
HTMLto see documentation forbroom::broom
If I do the same for the dplyr package and choose the HTML documentation for dplyr::two-table, the results is not so pleasing (see image, right). Click on Debug for an uninformative message:
an unhandled win 32 exception occurred in rstudio.exe [10276].
Looking at the RMD source for the vignettes, we see that dplyr specifies knitr::rmarkdown for the vignette engine, whereas broom specifies knitr::knitr.
# dplyr
---
title: "Two-table verbs"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Two-table verbs}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---
# broom
<!-- %\VignetteEngine{knitr::knitr} %\VignetteIndexEntry{Introduction to broom} -->
Some further investigation suggests that the crash occurs for all packages where %\VignetteEngine{knitr::rmarkdown}, but not for those where %\VignetteEngine{knitr::knitr}. As it happens, I’ve just written a package which used knitr::rmarkdown (and crashed RStudio) and so was able to confirm that switching to knitr::knitr fixed the problem.
Filed under: R, statistics Tagged: debug, rstudio, software, windows
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

