From pgilbert@bank-banque-canada.ca  Wed Nov 18 15:47:40 1998
From: pgilbert@bank-banque-canada.ca (Paul Gilbert)
Date: Wed, 18 Nov 1998 10:47:40 -0500
Subject: more on "[<-"
Message-ID: <98Nov18.105038est.13462@mailgate.bank-banque-canada.ca>

"[<-" in R 0.63 does not appear to strip attributes, whereas Splus and previous
versions of R did.

Paul
_____

R 0.63:
>  data <- matrix(rnorm(300),100,3)
>  attr(data, "tframe") <- c(1981.50, 2006.25 ,   4.00)
> attributes(data)
$dim
[1] 100   3
$tframe
[1] 1981.50 2006.25    4.00
> z <- data[10:90,]
> attributes(z)
$dim
[1] 81  3
$tframe
[1] 1981.50 2006.25    4.00

Splus:
>   data <- matrix(rnorm(300),100,3)
>  attr(data, "tframe") <- c(1981.50, 2006.25 ,   4.00)
> attributes(data)
$dim:
[1] 100   3
$tframe:
[1] 1981.50 2006.25    4.00
> z <- data[10:90,]
> attributes(z)
$dim:
[1] 81  3


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


more on "[<-"
Paul Gilbert