Data Visualization Using R for Researchers Who Do Not Use R

Data Visualization Using R for Researchers Who Do Not Use R
复制标题

DOI:
10.1177/25152459221074654
复制
发表时间:
2022-04-01
影响因子:
13.6
通讯作者:
DeBruine, Lisa M.
DeBruine, Lisa M.
中科院分区:
心理学1区
文献类型:
--
作者:
Nordmann, Emily;McAleer, Phil;DeBruine, Lisa M.

文献摘要

被引文献

相似文献

除了有利于再现性和透明性之外,使用R的一个优点是,由于R的开源特性,研究人员拥有比一般的点击式软件更大范围的完全可定制的数据可视化选项。这些可视化选项不仅看起来很有吸引力,而且可以增加底层数据分布的透明度,而不是依赖于常用的聚合可视化。比如均值柱状图。在本教程中,我们提供了使用R进行数据可视化的实用介绍,专门针对那些之前几乎没有使用R的经验的研究人员。首先,我们详细介绍了使用R进行数据可视化的基本原理,并介绍了使用ggplot包进行数据可视化的“图形语法”。然后,该教程引导读者了解如何复制在指向和点击软件中常用的绘图,例如直方图和盒图,并展示如何将这些“基本”绘图的代码轻松扩展到不太常用的选项,例如小提琴盒图。本教程中使用的数据集和代码以及带有活动解决方案、额外资源和高级绘图选项的交互式版本可在https://osf.io/bj83f/上获得。
In addition to benefiting reproducibility and transparency, one of the advantages of using R is that researchers have a much larger range of fully customizable data visualizations options than are typically available in point-and-click software because of the open-source nature of R. These visualization options not only look attractive but also can increase transparency about the distribution of the underlying data rather than relying on commonly used visualizations of aggregations, such as bar charts of means. In this tutorial, we provide a practical introduction to data visualization using R specifically aimed at researchers who have little to no prior experience of using R. First, we detail the rationale for using R for data visualization and introduce the "grammar of graphics" that underlies data visualization using the ggplot package. The tutorial then walks the reader through how to replicate plots that are commonly available in point-and-click software, such as histograms and box plots, and shows how the code for these "basic" plots can be easily extended to less commonly available options, such as violin box plots. The data set and code used in this tutorial and an interactive version with activity solutions, additional resources, and advanced plotting options are available at https://osf.io/bj83f/.