Large Data R Packages

It can take a long time to load and create R packages with a lot of data, such as images. Since that data is already compressed to some extent, considerable speed-up is obtained in the following way:

usethis::use_data(data1, compress=FALSE, overwrite = TRUE)

The option

The option compress=FALSE replaces the default compress=’gzip’; it is much faster. The second step is during the build, use the --data-compress=none flag. Go to Build => Configure Build Tools => R CMD INSTALL, and add this flag.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.