Skip to content
Prev 155201 / 398503 Next

loop

I have to calculate a formula that gives me a ten components vector. I want
to see how the components behave at varying the variable i.
But when i run the following function:
+ xx<-t(X1_10)%*%X1_10
+ xxmeno1<-solve(xx)
+ V<-xxmeno1*i
+ Vmeno1<-solve(V)
+ tx<-t(X1_10)
+ prpar<-solve(Vmeno1+xx)
+ snpar<-tx%*%y
+ bbayes<-prpar%*%snpar
+ }

it oly gives me the vector calculated with the last value of the sequence,
in this case 100.
Could you please suggest how to print all the 100 vectors calculated for i
in 1:100.

Thank you in advance.

Davide Crapis