Re: [R] using double loops and saving the data

2010-04-12 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 12.04.2010 12:51:24: > > > Petr Pikal wrote: > > > > > > > > Nobody except you has your data available, so without providing more clues > > you can not expect mor relevant answers. > > > > Try str(your.objects) and maybe you could use debug to

Re: [R] using double loops and saving the data

2010-04-12 Thread ChinChin
Petr Pikal wrote: > > > You did not tell much more about your data and procedures. Each object > type has some distinct way of indexing and you can not mix them up. > > x<-1:10 >> x[5] > [1] 5 >> x[[5]] > [1] 5 >> x[5,] > Error in x[5, ] : incorrect number of dimensions > >> x<-list(1:10) >

Re: [R] using double loops and saving the data

2010-04-12 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 12.04.2010 07:14:14: > > > David Winsemius wrote: > > > > > > > >>I am guessing that the first time through when i= 5200 that i+1 is > >>indexing an entry that does not exist. What does str( Price[[1]] > >>[5200+1] ) return? What about str(Ca)? >

Re: [R] using double loops and saving the data

2010-04-11 Thread ChinChin
David Winsemius wrote: > > > >>I am guessing that the first time through when i= 5200 that i+1 is >>indexing an entry that does not exist. What does str( Price[[1]] >>[5200+1] ) return? What about str(Ca)? > > >>So what is supposed to happen when you try "Ca[5200+1] <- "... anything? > >

Re: [R] using double loops and saving the data

2010-04-11 Thread David Winsemius
On Apr 11, 2010, at 8:23 PM, ChinChin wrote: Hi, I am the first R user, I have met some problem and I am seeking for help. I am estimating the wealth of a shareholder. First, I simulated 1 set of price, each set of price contains 5200 prices which reflect the price goes up and down th