Full_Name: Frédéric Gosselin
Version: 2.5 vs 2.4 and 2.2.1
OS: windows XP
Submission from: (NULL) (195.221.118.52)


#############
L3 <- LETTERS[1:3]
 (d <- data.frame(cbind(x=1, y=1:10), fac=as.factor(sample(L3, 10,
repl=TRUE))))
mode(d[,3])<-"numeric"
###############

when trying to change the mode of a column in a data.frame that is a factor to
numeric(cf. preceding code), the following error occurs (in French) in R 2.5:

Erreur dans `storage.mode<-`(`*tmp*`, value = "double") : 
        le mode de stockage d'un objet "factor" ne peut être modifié

The same thing works fine in R2.4 and 2.2.1. 

It does not seem to correspond to new things announced in the NEWS file for the
2.5 version...

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to