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=0AThe information in this email or in any file attached hereto is=0Aintended only for the personal and confidential use of the individual=0Aor entity to which it is addressed and may contain information that is=0Aproprietary and confidential. If you are not the intended recipient of=0Athis message you are hereby notified that any review, dissemination,=0Adistribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product. Email transmission cannot be guaranteed to be secure or error-free.
On Dec 29, 2006, at 2:16 PM, Geoffrey Zhu wrote:> Does anyone know what is the real difference of vector and array?# 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]]