So I have two vectors (they are actually the starting rows and the ending rows for which my data presides in in another R object)
start=c(13,103,202,250)
end=c(102,201,249,300)
I am trying to create a loop where I can pull the data using the dataset_{#number}=read.table(text=data[start:end],sep=",",header=F)
n=1
for (i in start){
dataset_{n}=read.table(text=data[i:end[n]],sep=",",header=F)
n=n+1
}
Desired Output:
dataset_1
dataset_2
dataset_3
..
How do I tell the loop to create a brand new data set to save each contiguous block?? How do I tell R that {n} is not a string but part of the loop??