Q: Why does my for loop return only 1 row,after using rbind in every iteration? I am trying to obtain a set of solutions for the following equation:
y=x^2 - t[i] ,for all the values that the parameter t varies in [2,3].
I tried to implement a for loop that in every iteration computes the calculations and rbinds the result to a dataframe to be used for later. 
t<-seq(from = 2, to = 3, by = 0.005)
x<-seq(from = 0, to = 30, by = 0.05)

d<-data.frame()
for (i in length(t)) {
  y<- x^2 - t[i]
  d<-rbind(d,y)
  }

d

I expect the output of the for loop to be a dataframe of 201 rows and 601 columns, but the actual output is only one 1 row of 601 columns .

A: It will create 201 rows if you change the for loop to iterate through 1:length(t).
t <- seq(from = 2, to = 3, by = 0.005)
x <- seq(from = 0, to = 30, by = 0.05)

d <- data.frame()

for (i in 1:length(t)) {
  y <- x^2 - t[i]
  d <- rbind(d,y)
}

str(d)

