We've updated our privacy policy.

Download from the NSRR directly through R

Do you do statistics programming using R? Do you wish you could download files from the NSRR without going through the process of installing Ruby? Well, John Muschelli and Ciprian Crainiceanu sure think so.

John and Ciprian created an open-source "R" implementation of the NSRR downloader that is available for download on CRAN, https://cran.r-project.org/web/packages/nsrr/index.html. Here's a short quote from John:

The goal of nsrr is to allow users to access data from the National Sleep Research Resource through an R interface.

Why R? Many packages in R can read and process accelerometry, such as the GGIR, ActivityIndex, and accelerometry; other packages such as edfReader can read in EDF data for polysomnography data. Also, the xml2 package can easily read in XML annotations into R. We believe the interplay with these packages, amongst others, allow for a flexible framework to download, process, and visualize data. The nsrr package is simply the entry point into navigating the files available and downloading the data.

You can install the R package using the following command:

install.packages("nsrr")

Find more details on the available commands (nsrr_dataset_files, nsrr_download_file) the R package provides here: https://github.com/muschellij2/nsrr

Do you have an open source tool you'd like to share with the larger NSRR community? Let us know!

  0
By remomueller on March 1, 2019 Mar 1, 2019 in Tools
no comments
· sorted by
Write a Reply