Re: [Rd] unexpected '[<-.data.frame' result

2005-10-26 Thread Charles C. Berry
On Wed, 26 Oct 2005, Peter Dalgaard wrote: > "Charles C. Berry" <[EMAIL PROTECTED]> writes: > >> Is this a bug? >> >> If not, I am curious to know why '[<-.data.frame' was designed to yield >> a.frame$y != a.frame$z rather than refusing to carry out the operation at >> all. >> >>> a.frame <- data.

Re: [Rd] unexpected '[<-.data.frame' result

2005-10-26 Thread Peter Dalgaard
"Charles C. Berry" <[EMAIL PROTECTED]> writes: > Is this a bug? > > If not, I am curious to know why '[<-.data.frame' was designed to yield > a.frame$y != a.frame$z rather than refusing to carry out the operation at > all. > > > a.frame <- data.frame( x=letters[1:5] ) > > a.frame[ 2:5, "y" ] <

[Rd] unexpected '[<-.data.frame' result

2005-10-26 Thread Charles C. Berry
Is this a bug? If not, I am curious to know why '[<-.data.frame' was designed to yield a.frame$y != a.frame$z rather than refusing to carry out the operation at all. > a.frame <- data.frame( x=letters[1:5] ) > a.frame[ 2:5, "y" ] <- letters[2:5] > a.frame[[ "z" ]][ 2:5 ] <- letters[2:5] > a.fr