[R] Matrix set value problem

Valentino Botta bvalen at alice.it
Thu Jul 3 10:02:58 CEST 2008


the following code:

m<-matrix(nrow=10,ncol=10)
i<-1001
mx<-trunc(i/1000)
my<-(i/1000-mx)*1000
m[mx,my]<-1

does not assign the value at the matrix m[1,1]
Any hints?

Thanks
v

-- 
View this message in context: http://www.nabble.com/Matrix-set-value-problem-tp18253809p18253809.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list