I know the wide to long has been asked way too many times on here but I can\'t figure out how to turn the following into long format. Shoot I even asked one of the wide to
Another way to approach the problem that requires very little code but would likely be slower,:
DF.1 <- DF[, 1:2]
DF.2 <- DF[, 3:6]
DF.3 <- DF[, 7:10]
names(DF.2) <- names(DF.3) <- unlist(strsplit(names(DF.2), ".", fixed=T))[c(T,F)]
time <- rep(1:2, each=nrow(DF.1))
data.frame(rbind(DF.1, DF.1), time, rbind(DF.2, DF.3))