xTable错误,尽管内存中有对象

时间:2015-09-29 14:53:54

标签: r markdown r-markdown xtable

使用普通R文件创建了包含13行和2列的数据框ofp.1。数据帧存在于内存中。

现在我想在xtable中使用此表来打印R Markdown文件。

`---
title: "abc"
output: html_document

---


<table border = 1 align='center'>
<tr>
<td  style='text-align:center'>
```{r include=FALSE}
    library(xtable)
```
```{r results='asis', echo=FALSE}

  print(xtable(ofp.1),type='html',include.rownames=F)
```
</td>
</tr>
</table>

我收到错误Error in xtable(ofp.1) : object 'ofp.1' not found Calls: <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> print -> xtable Execution halted

我能弄明白的是Markdown虽然存在于内存中,却找不到我的桌子。需要帮助。谢谢

0 个答案:

没有答案