knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
nhance <- function(file,output){ i <- haven::read_xpt(file) seqn <- data.frame(SEQN=1:max(a$SEQN)) o <- dplyr::full_join(i,seqn,by='SEQN') write.csv(o,output) }
The goal of nhance is to Process the data in the NHance database and output the XPT format file into CSV format with a short code .
You can install the released version of nhance from github with:
devtools::install('fanchenzashi/nhance')
This is a basic example which shows you how to solve a common problem:
library(nhance) nhance('*.xpt','name.csv') ## basic example code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.