README.md

nhanesA

CRAN
status LICENSE metacran
downloads

nhanesA is an R package for browsing and retrieving data from the National Health And Nutrition Examination Survey (NHANES). This package is designed to be useful for research and instructional purposes.

The functions in the nhanesA package allow for fully customizable selection and import of data directly from the NHANES website thus it is essential to have an active network connection.

Install from CRAN

install.packages("nhanesA")

Install from the dev repo

install.packages("devtools")
devtools::install_github("cjendres1/nhanes")

Use nhanesA in Docker

The Docker container hosts the data, allowing for faster access and manipulation directly from the local Docker environment. The summary of the differences between using the standard nhanesA and using it inside Docker is as follows:

Standard nhanesA:

Docker-enhanced nhanesA:

In essence, while the Docker-enhanced version offers blazing-fast access to a majority of the data, it will fetch data in the standard nhanesA manner for datasets not present in its database.

To use nhanesA inside Docker, you can follow the two steps below: start Docker using the provided command and access RStudio through the given link.

1. Start Docker

Start Docker on Mac or Linux

docker \
    run \
        --rm \
        --platform=linux/amd64 \
        --name nhanes-workbench \
        -v <YOUR LOCAL PATH>:/mnt/ \
        -d \
        -p 8787:8787 \
        -p 2200:22 \
        -p 1433:1433 \
        -e 'CONTAINER_USER_USERNAME=USER' \
        -e 'CONTAINER_USER_PASSWORD=PASSWORD' \
        -e 'ACCEPT_EULA=Y' \
        -e 'SA_PASSWORD=yourStrong(!)Password' \
         hmsccb/nhanes-workbench:version-0.2.0

Start Docker on Windows

docker ^
    run ^
        --rm ^
        --platform=linux/amd64 ^
        --name nhanes-workbench ^
  -v <YOUR LOCAL PATH>:/mnt/ ^
  -p 8787:8787 -p 2200:22 -p 1433:1433 ^
  -e "CONTAINER_USER_USERNAME=USER" ^
  -e "CONTAINER_USER_PASSWORD=PASSWORD" ^
  -e "ACCEPT_EULA=Y" ^
  -e "SA_PASSWORD=yourStrong(!)Password" ^
  hmsccb/nhanes-workbench:version-0.2.0

2. Log into Rstudio

Log into RStudio via: \://localhost:8787> and using the username set in the command above. In the above command, the username and password are set as USER and PASSWORD,respectively, but you can modify them if you prefer.

More details about NHANES Docker.

Working with nhanesA

Manual

Vignette: Introducing nhanesA

drawing



Try the nhanesA package in your browser

Any scripts or data that you put into this service are public.

nhanesA documentation built on July 4, 2024, 9:08 a.m.