I am writing a for loop program in RStudio.
When I use the following command,
a <- 10
for (i in c(1:10335) {
a <- a + 0.005
print(a)
}
I get a very large output in console, since the loop runs 10335 times. That large output is also a small fraction of the total output (a few, maybe 1000 or so, values from the last). I also loose my written program in the console. How do I fix this issue? How can I get a complete set of 10335 values in the output?
Also, is there any way to export this output in excel or in text format?