R comment faire pour supprimer la ligne de données
Exemples de code
2
0
N
myData[-c(2, 4, 6), ] # remove rows 2, 4, 6
1
0
N
# 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),]