GtR
0
Q:

del row matrix r

# Remove third row - by row number
MyMatrix <- MyMatrix[-3,]

# Remove third and fifth rows - by feeding the matrix a boolean vector
MyMatrix <- MyMatrix[c(TRUE,TRUE,FALSE,TRUE,FALSE,TRUE),]
0
t1<- t1[-4:-6,-7:-9]
0
> cbind(c(1,2,3),c(4,5,6))
[,1] [,2]
[1,]    1    4
[2,]    2    5
[3,]    3    6
> rbind(c(1,2,3),c(4,5,6))
[,1] [,2] [,3]
[1,]    1    2    3
[2,]    4    5    6
0
> x <- matrix(1:9, nrow = 3, dimnames = list(c("X","Y","Z"), c("A","B","C")))
> x
A B C
X 1 4 7
Y 2 5 8
Z 3 6 9
0

New to Communities?

Join the community