[R] tm[,-1]

Rubén Roa rroa at azti.es
Thu Mar 11 15:54:13 CET 2010


-----Mensaje original-----
De: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] En nombre de ManInMoon
Enviado el: jueves, 11 de marzo de 2010 12:22
Para: r-help at r-project.org
Asunto: [R] tm[,-1]


This does what I was hoping it would:

aggregate(tm[,-1],by=list(tm[,10]),FUN="mean")

but I don't know what "tm[,-1]" means (well - the -1 bit anyway. 

Does it somehow means the whole matrix?

---

No, it means the matrix 'tm' minus the 1st column,

(a <- matrix(rnorm(16,4,5),4,4))
a[,-1]

____________________________________________________________________________________ 

Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN



More information about the R-help mailing list