Hi, I am really new at R. Does anyone know what is the real difference of vector and array, except that many operations that expect an array does not work on a vector? Thanks, Geoffrey _______________________________________________________=0A= =0A= =0A= The information in this email or in any file attached hereto is=0A= intended only for the personal and confidential use of the individual=0A= or entity to which it is addressed and may contain information that is=0A= proprietary and confidential. If you are not the intended recipient of=0A= this message you are hereby notified that any review, dissemination,=0A= distribution or copying of this message is strictly prohibited. This communi= cation is for information purposes only and should not be regarded as an off= er to sell or as a solicitation of an offer to buy any financial product. Em= ail transmission cannot be guaranteed to be secure or error-free.
Difference of array and vector
3 messages · Geoffrey Zhu, Michael Kubovy, Farrel Buchinsky
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20061229/522c5e30/attachment.pl
I had had problems getting my head around what an array was as opposed to a data frame and where vectors fitted into the two. I found a useful URL on the same website eluded to below. http://www.burns-stat.com/pages/Tutor/unwilling_S.pdf Go to the heading "The Look and Feel of Objects" Farrel "Michael Kubovy" <kubovy at virginia.edu> wrote in message news:E770E5A1-053B-4FB3-B290-B984350536C0 at virginia.edu...
# Here's a vector: letv <- letters is.vector(letv) # Here's an array: leta <- as.array(letters) is.array(leta) attributes(letv) attributes(leta) To understand the importance of attributes: http://www.burns-stat.com/pages/Spoetry/essentials.pdf There Burns writes (p. 3): "An S array is merely a vector that has a dim attribute, and optionally a dimnames attribute."
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102 Gilmer Hall
McCormick Road Charlottesville, VA 22903
Office: B011 +1-434-982-4729
Lab: B019 +1-434-982-4751
Fax: +1-434-982-4766
WWW: http://www.people.virginia.edu/~mk9y/
[[alternative HTML version deleted]]
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.