[R] Debug help

Duncan Murdoch murdoch at stats.uwo.ca
Wed Feb 4 15:03:50 CET 2009


On 2/4/2009 6:28 AM, ehxpieterse wrote:
> Hi, 
> 
> I am getting the following error: argument is of length zero
> 
> My code:
> temp <- 0
> for (j in 1 : 3) {
> for (k in 1 : 12) {
> temp <- temp + as.double(C[k, (q - 1) * 3 + j]) * as.double(m_ret_reb[i + k
> - 1, j+1])
> }
> }
> 
> Why would R handle my temp variable as numeric(0)?

You need to send a reproducible example if you want an answer.  It's 
more likely a problem with C or m_ret_reb or q, and we don't have those.

Duncan Murdoch




More information about the R-help mailing list