rsleep is a R package providing tools for sleep data management, visualization and analysis.
Stable version can be downloaded and installed from CRAN [1] :
install.packages("rsleep", repos = "https://cloud.r-project.org")
Development version can be directly installed from
Github using the devtools
package :
devtools::install_github("boupetch/rsleep")
library(rsleep)
- Managing Sleep Records Files
- Spectral analysis of sleep electroencephalography signals
- Automatic Stages Classification
The rsleep package can be used through Docker, with the automatic build from Dockerhub or by building the image using the provided Dockerfile.
Automatic sleep stages scoring using rsleep Docker image:
wget -O 15012016HD.edf https://osf.io/57j2u/download
docker run --rm -v $(pwd):/shared boupetch/rsleep R -e "write.csv(rsleep::score_stages_edf('/shared/15012016HD.edf'),'/shared/hypnodensity.csv')"
[1] K. Hornik, The comprehensive r archive network, Wiley Interdisciplinary Reviews: Computational Statistics. 4 (2012) 394–398. https://cran.r-project.org/.