I have data, which looks like this:These data are only for one subject. I will have a lot more.These data will be analyzed in R.Now I'm storing them like this:subject <- rep(1, times = 24)measurement <- factor(x = rep(x = 1:3, each = 8),                       labels = c(Distance, Frequency, Energy))speed <- factor(x = rep(x = 1:2, each = 4, times = 3),                 labels = c(speed1, speed2))condition <- factor(x = rep(x = 1:2, each = 2, times = 6),                     labels = c(Control, Experm))Try <- factor(x = rep(x = 1:2, times = 12),               labels = c(Try1, Try2))result <- c(1:8,             11:18,             21:28)dt <- data.frame(subject, measurement, speed, condition, Try, result)What is the appropriate way to store these data in R (in a data frame)? 
Appropriate way to store data in R
r;dataset;data formats
Without more information all I can say is that:the say you're storing it is fine in general you can further transform/store your data depending on your use caseTo expand on #2, if I want to study Distance vs Energy across all subjects, then I would format my data like this:> library(reshape2)> dt2 <- dt[dt$measurement %in% c('Distance','Energy'),]> dt_cast <- dcast(dt2, subject+Try~measurement+speed+condition, value.var='result')The transformed data (dt_cast) would then look like:  subject  Try Distance_speed1_Control Distance_speed1_Experm Distance_speed2_Control1       1 Try1                       1                      3                       52       1 Try2                       2                      4                       6  Distance_speed2_Experm Energy_speed1_Control Energy_speed1_Experm Energy_speed2_Control1                      7                    21                   23                    252                      8                    22                   24                    26  Energy_speed2_Experm1                   272                   28Allowing me to, for example, look at the relationship between the Distance_speed1_Control vs Energy_speed1_Control columns.Basically subset/aggregate your data and then use the dcast to get the rows and columns the computer needs.