[R] using double loops and saving the data

ChinChin creami.egg at gmail.com
Mon Apr 12 07:14:14 CEST 2010



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?
> 
>>Really?   I thought you said you had 5200 entries in Price?
> 
> I am sorry, I should mention it earlier that there are initial numbers for
> Ca, Sh, Po and Price. Which means there are totally 5200+1 entries for
> each of them.
> I can get the answer that I want from str(Price[[1]][5200+1]) 
> but str(Ca) gave me all zeros  "num [1:5201] 0 0 0 0 0 0 0 0 0 0 ..."
> Ca[5200+1] = 0
> 
>>You need to read the error message. And you need to offer better  
>>information about the objects you are working with.
> 
> -- 
>>David.
> 
>  View this message in context:
> http://n4.nabble.com/using-double-loops-and-saving-the-data-tp1836591p1836591.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: http://n4.nabble.com/using-double-loops-and-saving-the-data-tp1836591p1836690.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list