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)
}

nhance

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 .

Installation

You can install the released version of nhance from github with:

devtools::install('fanchenzashi/nhance')

Example

This is a basic example which shows you how to solve a common problem:

library(nhance)
nhance('*.xpt','name.csv')
## basic example code


fanchenzashi/nhance documentation built on Dec. 20, 2021, 7:42 a.m.