Restructure data in r: reshape, dcast, melt…nothing seems to work for this dataframe
问题 Here is an example of what the first few rows of my imported dataframe looks like (in the full dataset there are a total of five levels/factors for the subject variable the other two are Algebra II and Geometry). SID firstName lastName subject sumScaleScore sumPerformanceLevel 604881 JIM Ro Mathematics 912 2 604881 JIM Ro ELA 964 4 594181 JERRY Chi ELA 997 1 594181 JERRY Chi Mathematics 918 3 564711 KILE Gamma ELA 933 5 564711 KILE Gamma Algebra I 1043 7 I want to restructure it from the