I would intend for the file to have more observations than this; each row may have hundreds to thousands of numbers. For the first row, I would calculate y = a+bx for the first row of numbers, then calculate it again for the second, etc, and the output would show the linear regression equation for each row.
Can somebody also tell me how one would calculate a row in isolation? e.g. if I had this text file but only wanted to do calculations on the fifth row down for example, how would I do this?
The list will store vector of integers. Each row will have a separate vector for it
Read the number into the vector. Do calculations on the numbers.
You can have another vector to store row-wise results.
For calculating for nth row
1) you can read till nth row and then calculate, this is inefficient
OR
2) Skip n-1 rows read only nth row and then do the calculations