Skip to content

Instantly share code, notes, and snippets.

Created February 11, 2017 17:01
What would you like to do?
Join NHANES tables by sequence ID
# Use Reshape2 to melt exercise data from "wide" to "long" format
# Perform left_join on sequence ID to combine exercise information with demographic
exerciseMins <- melt(data = exercise,id.vars = "seqID",
measure.vars = c('minsVigWork','minsModWork','minsWalkBike','minsVigRec','minsModRec'), = 'exercise.type', = '') %>%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment