从日志中复制表格和绘图 [英] Reproduce table and plot from journal

查看:17
本文介绍了从日志中复制表格和绘图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名外科医生,喜欢编码.我尽我最大的努力使 R 的编码适合我的论文,但在创建表格时遇到了问题.我在著名期刊(NEJM)上找到了表格和情节组合,它看起来像这样:

I am a surgeon and love coding. I do my best to fit R's coding for my papers, but have problem with table creation. I found and table and plot combination in famous journal (NEJM) and it look like this:

如何在 R 中重现这种表格和森林图的组合?

How can I reproduce this kind of table and forest plot combination in R?

推荐答案

没关系:它是用元包完成的

所涉及的工作量将受到您是希望 R 代码生成整个信息页面,还是希望使用 R 在中间创建图形并将其添加到文档(MSWord 等)的显着影响.) 包含文本信息.如果后一种方法没问题,那么从水平条形图开始(例如,http://docs.ggplot2.org/current/geom_boxplot.html),使用诸如 theme_classic() 之类的东西来清除背景,并使用 xlim() 来缩放 x 轴.如果你修改你的问题并添加一个实际数据框的文本表示(例如,像这篇文章:超过最大值百分比的日期),我或其他人可能会为您生成 ggplot 代码.

The amount of work involved will be significantly influenced by whether or not you want R code to produce that entire page of information, or want to use R to create the graph in the middle and add it to a document (MSWord, etc.) that contains the text info. If the latter approach is ok, then start with a horizontal bar plot (e.g., http://docs.ggplot2.org/current/geom_boxplot.html), use something like theme_classic() to clear background, and use xlim() to scale the x-axis. If you revise your question and add a text representation of an actual data frame (e.g., like in this post: date at which a percentage of maximum was surpassed), me or someone else would probably generate the ggplot code for you.

这篇关于从日志中复制表格和绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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