Re: [R] for(variable in [])do

2009-08-13 Thread Allan Engelhardt
On 13/08/09 08:55, Inchallah Yarab wrote: [...] for (LRPhase in c(-1,1)) + {Phase1<- output[output[,2]==LRPhase,]} Phase1<- Phase1[order (Phase1[,6]),] [...] why when i write for LRPhase in c(1,-1), it gives me the result only for Phase = 1?? Because you re-assign the Phase

[R] for(variable in [])do

2009-08-13 Thread Inchallah Yarab
In this code i try to calculate le difference between too number for two value of  th variable phase i have did this > (output <- read.csv2("C:/RM2Param.csv",sep=","))   OptimYear LRPhase   PriorLRPosition  OptimPosition 1  2009  -1  1.15641679414676  0.252662968666702 2  2009