[Rd] type.convert (PR#6781)

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Apr 18 18:08:35 CEST 2004


On Fri, 16 Apr 2004 hosking at watson.ibm.com wrote:

[...]

> Rider: it would be nice if type.convert had a strip.white argument, so that
>   type.convert(c(" 6"," -"),na.strings="-",strip.white=T) 
> would return a numeric vector. Stripping leading and trailing blanks can be
> time-consuming, and could presumably be done more quickly by an .Internal
> function such as the one called by type.convert.

It can be done very rapidly by sub(), for example.

Given that type.convert is documented as a helper function for read.table, 
we will not be encumbering it with features read.table does not need.  It 
would be helpful if you did not encumber bug reports with other issues, 
too.

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