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)?
Thanks
--
View this message in context:
http://www.nabble.com/Debug-help-tp21828706p21828706.html
Sent from the R help mailing list archive at Nabble.com.
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