search for: mydat4

Displaying 2 results from an estimated 2 matches for "mydat4".

Did you mean: mydata
2009 Aug 04
2
Caculate first difference from a dataframe; write a simulation
...ot;State3" ) state4<-transform(state5, State="State4" ) state5<-transform(state5, State="State5" ) state6<-transform(state6, State="State6" ) state7<-transform(state7, State="State7" ) state8<-transform(state8, State="State8" ) mydat4<-data.frame(rbind(state2,state3,state4,state5,state6,state7,state8)) ## To identify states - can it be done in an easier way? ################################################################################# ##Question1:I want to calculate the first difference of mydat4[,1:2] t<-diff(mydat4[,...
2009 Aug 05
1
writing a simulation
...t of the 9 states does ad > fall into with Level =5.04 and spread=0.25? > ##OUTPUT > ad > X6 > Level 5.04 > spread 0.25 > state state8 > > But spread for state7 was -0.34????? > > Had it been 0.24, then this should work (some of the time.) > > subset(mydat4, Level == 5.4 & spread==0.25) > [1] Level spread change State > <0 rows> (or 0-length row.names) > > Perhaps you meant to specify an "or" condition? > > > subset(mydat4, Level == 5.4 | spread==0.24) > Level spread change State > 10 5.40 -0.34...