Suppose you had tabular data that was concatenated into one large vector, and you had to find a way to convert this vector into a dataframe. You could certainly do this manually, but there is a better way.
So suppose you had this raw vector:
You could do this manually- subset into rows, then rbind into df:
a<-v[1:6] b<-v[7:12] c<-v[13:18] d<-v[19:24] e<-v[25:30] f<-v[31:36] df<-as.data.frame(rbind(a,b,c,d,e,f))
But there’s an easier way to subset.
So now each row x I need in the data frame can be referenced by sub[x].