## ----eval=FALSE---------------------------------------------------------------
# .libPaths("<path_to_your_P_drive_package_folder>")


## ----eval=FALSE---------------------------------------------------------------
# library(chmsflow)
# library(recodeflow)
# library(dplyr)


## ----eval=FALSE---------------------------------------------------------------
# source("my_custom_functions.R")
# my_variable_details <- read.csv("my_variable_details.csv")


## ----eval=FALSE---------------------------------------------------------------
# # Cycles 1-6: Stata format
# cycle1 <- haven::read_stata("cycle1.dta")
# cycle2 <- haven::read_stata("cycle2.dta")
# cycle3 <- haven::read_stata("cycle3.dta")
# cycle4 <- haven::read_stata("cycle4.dta")
# cycle5 <- haven::read_stata("cycle5.dta")
# cycle6 <- haven::read_stata("cycle6.dta")
# 
# # Medication data: Stata for cycles 3-6, SAS for cycles 1-2
# cycle1_meds <- haven::read_sas("cycle1_meds.sas7bdat")
# cycle2_meds <- haven::read_sas("cycle2_meds.sas7bdat")
# cycle3_meds <- haven::read_stata("cycle3_meds.dta")
# cycle4_meds <- haven::read_stata("cycle4_meds.dta")
# cycle5_meds <- haven::read_stata("cycle5_meds.dta")
# cycle6_meds <- haven::read_stata("cycle6_meds.dta")


## ----eval=FALSE---------------------------------------------------------------
# names(cycle1) <- tolower(names(cycle1))
# names(cycle4) <- tolower(names(cycle4))
# names(cycle6) <- tolower(names(cycle6))
# 
# names(cycle1_meds) <- tolower(names(cycle1_meds))
# names(cycle4_meds) <- tolower(names(cycle4_meds))
# names(cycle6_meds) <- tolower(names(cycle6_meds))

