Davide Passaretti Davide Passaretti - 9 days ago 6
R Question

RStudio notebook does not show data.frames when I compile

I have a temporary windows 7 laptop (32 bit) on which I have R 3.3.2 and RStudio 1.0.44.

I am using RStudio notebook, and it works fine when I execute code in its window. However, as I compile to html (pressing Preview), the data.frames disappear (there is a chunk with no output). Everything else (vectors or figures) are shown.
It seems to be linked to the new cute printing format for data.frames that the notebook exploits. Indeed, if I use R-markdown (switching to

output: html_document
), the data.frames are shown with no problem in the basic R format.
Any help is appreciated.

Answer

For the ones having this problem, it turned out the issue was related to rmarkdown 1.2.
I solved installing rmarkdown 1.1:

remove.packages("rmarkdown")
library(devtools)
install_version("rmarkdown", version = "1.1", 
                repos = "http://cran.us.r-project.org")

Then everything worked.