A computational analysis of the dynamics of R style based on 108 million lines of code from all CRAN Packages in the past 21 years
Chung-hong Chan, Huai-Wen Chang, Chia-Yi Yen
June, 2022
Abstract
The flexibility of R and the diversity of the R community leads to a large number of programming styles applied in R packages. We have analyzed 108 million lines of R code from CRAN and quantified the evolution in popularity of 12 style-elements from 1998 to 2019. We attribute 3 main factors that drive changes in programming style: the effect of style-guides, the effect of introducing new features, and the effect of editors. We observe in the data that a consensus in programming style is forming, such as using lower snake case for function names (e.g. softplus_func) and <- rather than = for assignment.
Publication
The R Journal, 14(1), 6-21
Presentations:
- UseR! Toulouse 2019 (poster)
- R-Ladies Taipei monthly meeting, July 2019
Ph.D. Candidate in Finance
Chia-Yi Yen is currently a finance Ph.D. candidate at the Mannheim Business School in Germany. Her research interest lies in empirical macro finance, mutual funds, and corporate governance. She has published empirical macro finance papers on decent field journals and diligently worked on a number of research projects. Prior to her doctoral studies, she worked as a financial engineer in the fund industry and a data science consultant for financial institutions.