#original data was 500 observations, 2 varying variables HOMAR and INSULIN. 3 time periods
reshaped_data<-reshape(test.reshape,
direction = "long",
varying = c("HOMA_M0", "HOMA_M3","HOMA_M6", "INSULIN_M0", "INSULIN_M3", "INSULIN_M6"),
v.names = c("HOMAR", "INSULIN"),
idvar = c("id"),
timevar = "visit",
new.row.names = 1:1500,
times = 1:3)