how to delete a row in r using which code example
Example 1: r remove inf values
df <- df[!is.infinite(rowSums(df)),]
Example 2: 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),]