Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

remove column from matrix r

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

# Remove third and fifth columns - by feeding the matrix a boolean vector
MyMatrix <- MyMatrix[,c(TRUE,TRUE,FALSE,TRUE,FALSE,TRUE)]
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #remove #column #matrix
ADD COMMENT
Topic
Name
7+8 =