Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

remove row from 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),]
 
PREVIOUS NEXT
Tagged: #remove #row #matrix
ADD COMMENT
Topic
Name
2+6 =