Hi David,
This was useful, thanks.
The example was just that, there are no "a"s, "b",s etc I was
just trying to show what I was trying to do.
Using m[v,]
where m was the matrix in my example and v the vector of
index values works great as you suggested Thanks.
R is quite a powerful language
Since you do not offer reproducible code, I must guess that you were
thinking of this as a matrix with 6 instances of "a" across the top
row. See if this helps:
> mtx<-matrix( rep(letters[1:4], 6), nrow=4)
> mtx
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] "a" "a" "a" "a" "a" "a"
[2,] "b" "b
2 matches
Mail list logo