RStudio笔记本在编译时不显示data.frames [英] RStudio notebook does not show data.frames when I compile

查看:191
本文介绍了RStudio笔记本在编译时不显示data.frames的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台临时的Windows 7笔记本电脑(32位),其上装有R 3.3.2和RStudio 1.0.44.

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

我正在使用RStudio笔记本,当我在其窗口中执行代码时,它可以正常工作.但是,当我编译为html(按Preview)时,data.frames消失了(有一个没有输出的块).显示了其他所有内容(矢量或图形). 它似乎与笔记本计算机利用的data.frames新的可爱打印格式有关.的确,如果我使用R-markdown(切换到output: html_document),则显示的data.frames在基本R格式中没有问题. 感谢您的帮助.

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.

推荐答案

对于有此问题的人,事实证明该问题与rmarkdown 1.2有关.
我解决了安装rmarkdown 1.1:

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")

然后一切正常.

这篇关于RStudio笔记本在编译时不显示data.frames的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆