QuickLookR – A macOS QuickLook plugin for R Data files

August 6, 2016

(This article was first published on R – rud.is, and kindly contributed to R-bloggers)

I had tried to convert my data-saving workflows to feather but there have been issues with it supporting large files (that seem to be near resolution), so I’ve been continuing to use R Data files for local saving of processed/cleaned data.

I make many of these files and sometimes I do it as a one-off effort, thinking that I’ll come back to it quickly. Inevitably, I don’t do that and also end up naming those one-offs badly. I made a small R helper package to make it easier to wrap up checking out these files at the command-line (via a bash function) but it hit me that it’d be even easier if there was a way to use the macOS Quick Look feature (hitting on a file icon) to see the previews.

Thus, QuickLookR was born.

You need to download the ZIP file, unzip it and save the QuickLookR.qlgenerator component into ~/Library/QuickLook. Then devtools::install_github('hrbrmstr/rdatainfo') in an R session. If you’ve got R/Rscript in the standard /usr/local/bin location, then you should be able to hit on any .rdata, .rda or .rds file and see a str() preview like this:


I haven’t cracked open Xcode in a while and my Objective-C is super-rusty, but this works on my El Capitan MacBook Pro (though I’m trying to see why some .rds files embedded in packages on my system have no previews).

If you have suggestions or issues, please use github to file them. For issues, it’d be really helpful if you included a copy of or link to files that don’t work well.

For the next revision, I plan on generating prettier HTML-based previews and linking against R.framework to avoid a call out to the system.

If Wes/Hadley really have fixed feather, I’ll be making a QuickLook plugin for that file format as well in the very near future.

To leave a comment for the author, please follow the link and comment on their blog: R – rud.is.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)