Reshaping Data from Wide to Long

When performing data analysis, we often need to “reshape” our data from wide format to long format. A common example of wide data is a data structure with one record per subject and multiple columns for repeated measures. For example: id gender race trt day1 day2 day3 1 F 0 0 19.81310 18.05777 14.84996 2 […]