[R] matrix indices

KAREN KOTSCHY karen at gecko.biol.wits.ac.za
Thu Jul 15 11:09:03 CEST 1999


Hi

Could somebody please explain the following to me:
If x is a 10x10 matrix,
typing x[3] prints all 10 values of column 3, although the length of 
the vector =1. Why?
x[,3] and x[[3]] both give all 10 values of column 3, length=10. 
What is the difference between these two, actually?

Thanks
Karen Kotschy
Centre for Water in the Environment
Department of Botany
University of the Witwatersrand
Johannesburg
South Africa
Tel : +2911 716-2218

Postal address:
P/Bag 3
P.O Wits
2050
South Africa
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list