Published our R package fastreg

packaging
publishing
programming

Continuing and formalising prior work on DST, we’ve built an R package to standardise and parallelise the conversion of large Danish register SAS files to Parquet. And finally, we’ve published it to CRAN!

Author

Signe Kirk Brødbæk

Published

August 12, 2026

Earlier this year, we published our second R package to CRAN. The package, fastreg, continues Luke’s earlier work, previously known as “dstDataPrep”, to convert large Danish register SAS files to the Apache Parquet format.

The package’s purpose, as described on the package website, is to simplify the process of converting the large Danish registers into the more modern Parquet format as well as to simplify reading these Parquet files in R. By converting data from SAS to the more modern and efficient Parquet format, the package reduces storage costs and aims to improve performance in data analysis workflows.

Note

Luke gave a presentation on fastreg at Steno Diabetes Center Aarhus and Aarhus University in June 2026. The slides for that presentation can be found here.

Luke also gave a similar presentation on using Parquet data format in Denmark Statistics last year.

Who is it for and why use it?

The main reason for building the fastreg package was to provide a tool for data managers and researchers who work with Danish register data to convert the increasingly larger SAS files provided by Statistics Denmark (DST) to Parquet.

This conversion has multiple benefits:

  1. Parquet is smaller on disk. Parquet’s efficient compression significantly reduces disk space, especially for large datasets. This is especially beneficial since DST charges for storage space.
  2. Parquet is faster to read. The columnar layout speeds up analytical queries that only need a subset of columns. With fastreg, it also converts the registers into year-based Hive-partitioned datasets and provides functionality to more easily read a register in R.
  3. Parquet works well with modern tools like DuckDB and Arrow in R (DuckDB and Arrow) and Python ( DuckDB and pyarrow).

One drawback of this conversion we’ve become aware of is that researchers working in, e.g., Stata can’t load the Parquet files on the Statistics Denmark servers.

Functionality

fastreg provides functionality to:

  • convert a single SAS register file to Parquet
  • convert multiple SAS registers in parallel with a targets pipeline
  • read converted registers

You can find an overview of the functions in the reference documentation and a guide on how to Get started on the fastreg website.

Next steps

The next step is to train the data managers at Steno Diabetes Center Aarhus how to convert their register SAS files using the targets template—e.g., in their Register Project Database and the DARTER project.

After the conversion, we’ve discussed using the converted Parquet files with osdc to create a diabetes population in the Register Project Database.