search for: subscript_vec

Displaying 1 result from an estimated 1 matches for "subscript_vec".

2013 Apr 29
1
Need help on matrix calculation
Hello again, Let say I have 1 matrix: Mat <- matrix(1:12, 4, 3) rownames(Mat) <- letters[1:4] Now I want to subscript of Mat in following way: Subscript_Vec <- c("a", "e", "b", "c") However when I want to use this vector, I am geting following error: Mat[Subscript_Vec, ] Error: subscript out of bounds Basically I want to get my final matrix in following way: V1 V2 V3 a 1 5 9 e NA NA NA b 2 6 10 c 3...