From jens.oehlschlaegel-akiyoshi@mdfactory.de  Wed Jan 26 16:24:05 2000
From: jens.oehlschlaegel-akiyoshi@mdfactory.de (jens.oehlschlaegel-akiyoshi@mdfactory.de)
Date: Wed, 26 Jan 2000 17:24:05 +0100 (MET)
Subject: data.frame[1,1]<- differs from data.frame[[1]][1]<- (PR#403)
Message-ID: <200001261624.RAA23569@pubhealth.ku.dk>



I observed the following difference:

> ddd <- data.frame(a=1:3, b=1:3)

# assignment of 'X' silently ignored
> ddd[1,1] <- 'X'
> is.factor(ddd[[1]])
[1] FALSE
> ddd
  a b
1 1 1
2 2 2
3 3 3

# assignment of 'X' not ignored
> ddd[[1]][1] <- 'X'
> is.factor(ddd[[1]])
[1] TRUE
> ddd
  a b
1 X 1
2 2 2
3 3 3


Regards



> version
         _
platform Windows
arch     x86
os       Win32
system   x86, Win32
status
major    0
minor    90.1
year     1999
month    December
day      15
language R


--
Dr. Jens Oehlschlgel-Akiyoshi
MD FACTORY GmbH
Bayerstrasse 21

80335 Mnchen

Tel.: 089 545 28-27
Fax.: 089 545 28-10
http://www.mdfactory.de



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


data.frame[1,1]<- differs from data.frame[[1]][1]<- (PR#403)
jens.oehlschlaegel-akiyoshi@mdfactory.de