[R] Matrix set value problem

From: Valentino Botta <bvalen_at_alice.it>
Date: Thu, 03 Jul 2008 01:02:58 -0700 (PDT)

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.

______________________________________________
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.
Received on Thu 03 Jul 2008 - 08:20:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Jul 2008 - 10:31:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive