Re: [R] Help for i-else iwth more than one alternative

2014-10-16 Thread MacQueen, Don
If I understand what you¹re trying to do, then I believe this will do the same as your little loop: opt.fc <- fc opt.fc[rmax < 0.1] <- fc1[rmax < 0.1] (this is an example of vectorization, and it¹s fundamental to how R works and the power of R) Then to extend it, use the same method opt.f

[R] Help for i-else iwth more than one alternative

2014-10-16 Thread moeby
I try to run an if-else command line where the else argument should be the corresponding value of the pmax command. # #opt.fc is the optimal forecast #rmax is the vector of the maximized r squared from pmax-command of 2 data sets containing r squares #fc1 are the estimates of