[Rd] Changing the generic of as.data.frame

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon May 22 12:53:32 CEST 2006

I have changed the generic to as.data.frame in R-devel by adding a '...'
argument.  This means that any methods which do not have a '...' argument 
(quite a few do) will generate a warning in R CMD check: the fix is very 
simple (and backwards compatible): just add a '...' argument to the 

We already had a problem with as.data.frame.table which had an extra 
argument (at the request of users), but required that the method had to be 
called explicitly to use.  Adding as.data.frame.ftable compounded that 

Packages that have S4 methods for as.data.frame still work *unless* they 
set an explicit generic (as FLCore does).

The other motivation was to allow the option to not convert character 
vectors to factors, which needed an additional argument to 
as.data.frame.character.  So data.frame now has an argument 'charToFactor' 
controlled by a global option (which also controls the default of as.is in 
read.table).  More experience will be needed as to whether it is safe to 
work with the global option set to FALSE, so that aspect should be 
regarded as experimental until 2.4.0 is released or it is withdrawn.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-devel mailing list