R生成latex表格代码
来源:互联网 发布:c语言中的echo 编辑:程序博客网 时间:2024/06/06 03:56
R语言生产latex代码
只需加载程序辑:xtable。
代码如下:
# Goal: To make latex tabular out of an R matrix# Setup a nice R object:m <- matrix(rnorm(8), nrow=2)rownames(m) <- c("Age", "Weight")colnames(m) <- c("Person1", "Person2", "Person3", "Person4")m# Translate it into a latex tabular:library(xtable)xtable(m, digits=rep(3,5))# Production latex code that goes into a paper or a book --print(xtable(m, caption="String", label="t:"), type="latex", file="blah.gen", table.placement="tp", latex.environments=c("center", "footnotesize"))# Now you do \input{blah.gen} in your latex file.# You're lazy, and want to use R to generate latex tables for you?data <- cbind( c(7,9,11,2), c(2,4,19,21))colnames(data) <- c("a","b")rownames(data) <- c("x","y","z","a")xtable(data)# or you could dodata <- rbind( c(7,2), c(9,4), c(11,19), c(2,21))# and the rest goes through identically.
You can Go Go Go!!!
\input
阅读全文
0 0
- R生成latex表格代码
- 用R语言快速生成Latex表格
- Latex生成并列表格
- R-Latex sweave 如何隐藏R代码
- R 语言生成eps,latex文件
- Latex插图和插入表格代码模板
- LaTeX中图形表格等格式代码
- Latex表格
- Latex 表格
- Latex表格
- [latex]表格
- LaTeX 表格
- latex表格
- Latex表格
- 解析表格生成lua代码
- 如何在Latex中高亮显示R语言代码
- 可以把cvs转换成latex表格的代码
- 【LaTeX】LaTeX绘制三线表格
- 分布式,集群概念简介
- 关于在 Virtualenv环境下安装Flask_SQLAlchemy报错
- com.seventh7.plugin.mybatis IDEA插件初始化失败,导致IDEA不能启动
- springmvc+ajax时controller中return跳转不了前台页面
- Android第七天
- R生成latex表格代码
- Linux/Unix系统编程-基本概念
- TFIDF算法Java实现
- Oracle优化——LIKE与索引(以%开头的LIKE会不走索引或走索引全扫描)
- Java类的生命周期
- 计算几何模板
- 简单理解:一维单高斯 多维单高斯 混合多高斯GMM
- Android开发艺术探索读书笔记-View的事件体系(一)
- 前端