# Tools for analyzing R code the tidy way

**Authors:** Lucy D'Agostino McGowan, Sean Kross, Jeffrey T. Leek

arXiv: 1905.08327 · 2020-11-17

## TL;DR

This paper introduces two R packages, matahari and tidycode, designed to facilitate the analysis of R code for reproducibility and variability studies by leveraging natural language processing techniques.

## Contribution

The paper presents novel R packages that enable detailed, tidy analysis of R code, enhancing reproducibility and variability assessment in data analysis workflows.

## Key findings

- Successfully logged R console and script inputs into tidy data frames
- Provided tools for analyzing R calls in a structured, tidy manner
- Demonstrated utility through two practical examples

## Abstract

With the current emphasis on reproducibility and replicability, there is an increasing need to examine how data analyses are conducted. In order to analyze the between researcher variability in data analysis choices as well as the aspects within the data analysis pipeline that contribute to the variability in results, we have created two R packages: matahari and tidycode. These packages build on methods created for natural language processing; rather than allowing for the processing of natural language, we focus on R code as the substrate of interest. The matahari package facilitates the logging of everything that is typed in the R console or in an R script in a tidy data frame. The tidycode package contains tools to allow for analyzing R calls in a tidy manner. We demonstrate the utility of these packages as well as walk through two examples.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1905.08327/full.md

## Figures

4 figures with captions in the complete paper: https://tomesphere.com/paper/1905.08327/full.md

---
Source: https://tomesphere.com/paper/1905.08327