rdata: A Python library for R datasets

Carlos Ramos-Carreño, Tuomas Rossi · The Journal of Open Source Software · 2024

Research work usually requires the analysis and processing of data from different sources.Traditionally in statistical computing, the R language has been widely used for this task, and a huge amount of datasets have been compiled in the Rda and Rds formats, native to this programming language.As these formats contain internally the representation of R objects, they cannot be directly used from Python, another widely used language for data analysis and processing.The library rdata allows to load and convert these datasets to Python objects, without the need of exporting them to other intermediate formats which may not keep all the original information.This library has minimal dependencies, ensuring that it can be used in contexts where an R installation is not available.The capability to write data in Rda and Rds formats is also under development.Thus, the library rdata facilitates data interchange, enabling the usage of the same datasets in both languages (e.g. for reproducibility, comparisons of results against methods in both languages, or the creation of complex processing pipelines that involve steps in both R and Python).

Read the paper · More papers on PaperTik