From ripley@stats.ox.ac.uk  Sun Apr  1 18:40:16 2001
From: ripley@stats.ox.ac.uk (Prof Brian Ripley)
Date: Sun, 1 Apr 2001 18:40:16 +0100 (BST)
Subject: [Rd] dim "heritage"
In-Reply-To: <3AC758AD.52E7E6B2@univie.ac.at>
Message-ID: <Pine.LNX.4.31.0104011839000.1244-100000@gannet.stats>

On Sun, 1 Apr 2001, Erich Neuwirth wrote:

> when i do
>
> x<-4:1
> dim(x)<-c(4,1)
>
> and then
> z<-sin(x)
> dim(z) is c(4,1)
>
> sort(x)
> however, does not have a dim attribute.
>
> is this intended behavior?

Yes.  You would expect x^2 to act elementwise, and all elementwise
arithmetic operations keep the dimensions.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] dim "heritage"
Prof Brian Ripley