[Rd] fix() changes character to factor (PR#415)

Andreas.Weingessel@ci.tuwien.ac.at Andreas.Weingessel@ci.tuwien.ac.at
Tue, 8 Feb 2000 10:48:11 +0100 (MET)


If x is a data.frame containing a column of mode character, this
column is changed to a factor after applying fix(x).
Example:

R> x_data.frame(a=1:3,b=letters[1:3],c=c("hansi","pepi","karli"))
R> x$c_as.character(x$c)
R> is.character(x$c)
[1] TRUE
R> is.factor(x$c)
[1] FALSE
R> fix(x)
## I change "karli" to "sepp"
R> x$c
[1] hansi pepi  sepp 
Levels:  hansi pepi sepp 
R>  is.character(x$c)
[1] FALSE
R> is.factor(x$c)
[1] TRUE

Now, it is not possible to apply fix(x) again to undo your change,
because edit does not allow to introduce new factor levels.


--please do not edit the information below--

Version:
 platform = i686-unknown-linux
 arch = i686
 os = linux
 system = i686, linux
 status = 
 major = 0
 minor = 99.0
 year = 2000
 month = February
 day = 7
 language = R

Search Path:
 .GlobalEnv, Autoloads, package:base

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