[R] sustraction of two vectors of matrix
malika yassa
y@@@@_m@lik@ @ending from y@hoo@fr
Wed Dec 5 15:30:40 CET 2018
helloplease I want to make a sustration of two vectors of a matrix
i have this program
aa<-matrix(outer(0:3,0:4,function(x,y) x+y*2),nrow=4,ncol=5)
for(i in 1:4)
+ {for(j in 2:5)
+ {bb[i,j-1]=aa[i,j]-aa[i,j-1]
+ }
+ }
at the end i obtain the bb=matrix( nrow=4,ncol=4)
but i cann't obtain this matrix
thank you very much
[[alternative HTML version deleted]]
More information about the R-help
mailing list