Creating a Quick Report with knitr, xtable, R Markdown, Pandoc (and some OpenBLAS Benchmark Results)
2016-05-16 10:40
846 查看
To cut a long story short, I always wanted to write professional-looking documents (technical reports and potentially my thesis) with R codes. No more copy and paste. No more Microsoft Word. At the same time, I don’t feel comfortable with LaTeX. Somehow I found
a workaround with knitr, xtable, R
Markdown and Pandoc.
I must say that my solution is far from perfect as I haven’t mastered the document layout configuration yet. But I did manage to get some satisfactory results (well, from a seasoned MS Word user’s point of view) with minimal R Markdown, xtable and knitr codes.
Instead of showing some dummy results, I created a simple report on R-25 benchmark results with two versions of OpenBLAS (ver.
0.2.6-1: the default, 2-threaded version on my Linux and ver. 0.2.8-1: the latest, multi-threaded version which had been made availablerecently).
In short, the latest OpenBLAS performed slightly better in most of the R-25 tests but two. For more details, download
the full pdf here.
The code-generated report looks like this …
… which I think is pretty enough for a quick report. When I look at the source R Markdown file which is nothing but geeky plain text (see below), I just can’t find words to describe the awesomeness of knitr + xtable + pandoc. Thank you very much Yihui, RStudio
team, David, Charles and John.
The codes are available on Github. This was my first attempt
to code a report, the code structure isn’t pretty enough for showcase but I had commented as much as possible. I hope you enjoy this blog post and give this code-generated report routine a try!
a workaround with knitr, xtable, R
Markdown and Pandoc.
I must say that my solution is far from perfect as I haven’t mastered the document layout configuration yet. But I did manage to get some satisfactory results (well, from a seasoned MS Word user’s point of view) with minimal R Markdown, xtable and knitr codes.
Instead of showing some dummy results, I created a simple report on R-25 benchmark results with two versions of OpenBLAS (ver.
0.2.6-1: the default, 2-threaded version on my Linux and ver. 0.2.8-1: the latest, multi-threaded version which had been made availablerecently).
In short, the latest OpenBLAS performed slightly better in most of the R-25 tests but two. For more details, download
the full pdf here.
The code-generated report looks like this …
… which I think is pretty enough for a quick report. When I look at the source R Markdown file which is nothing but geeky plain text (see below), I just can’t find words to describe the awesomeness of knitr + xtable + pandoc. Thank you very much Yihui, RStudio
team, David, Charles and John.
The codes are available on Github. This was my first attempt
to code a report, the code structure isn’t pretty enough for showcase but I had commented as much as possible. I hope you enjoy this blog post and give this code-generated report routine a try!
相关文章推荐
- 使用 RequireJS 优化 Web 应用前端
- android-UI(pulltorefresh)
- 生成UUID的一个工具类
- [HDOJ4027]Can you answer these queries?(线段树,特殊成段更新,成段查询)
- MySQL中因为unique key 非空唯一索引存在导致修改主键失败案例
- 347. Top K Frequent Elements
- 解决tableView separate 分割线不从最左边开始问题
- hibernate提供了强大的查询系统,query.setFirstResult,query.setMaxResults
- uva 11572 unique snowflakes——yhx
- uva 1152 4 values whose sum is zero ——yhx
- uva 1605 building for UN ——yhx
- 通过Service Builder改变了原数据库的主键,所有原有记录被删除。
- NUI四种提交数据方式c
- Hibernate动态条件查询(Criteria Query)
- HZAU 21——Arithmetic Sequence——————【暴力 or dp】
- this android sdk requires a...adt
- android:layout_centerInParent = "true"和 android:layout_gravity = "center"
- Android中UI的单位dp,sp和px使用问题
- 通过添加uiTOOLBAR制作毛玻璃效果
- 自定义UICollectionViewLayout(能滚动)需要实现的方法