“Remova a linha da matriz r” Respostas de código

Remova a linha da matriz 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),]
YEGdad

Del Row Matrix R

> 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
Cheerful Cormorant

Respostas semelhantes a “Remova a linha da matriz r”

Perguntas semelhantes a “Remova a linha da matriz r”

Mais respostas relacionadas para “Remova a linha da matriz r” em R

Procure respostas de código populares por idioma

Procurar outros idiomas de código