On 03/30/03 03:25, Marcus V. Stecklow wrote:
>I`m doing a program and it`s have a loop using the for command. inside the
>loop i have a variable and in each step of loop she have a new value.
>
>The question is: How can i store the values and make a table?
For example:
Squares <- rep(NA,10) # make an empty vector with 10 places
for (i in 1:10) Squares[i] <- i^2 # fill it with squares
Squares # print it
Lots of other ways to do this. For example, you can use
Squares <- {}
for the first step.
--
Jonathan Baron, Professor of Psychology, University of Pennsylvania
R page: http://finzi.psych.upenn.edu/
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help