From ripley at stats.ox.ac.uk  Sun Apr 18 18:08:35 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Sun Apr 18 18:08:41 2004
Subject: [Rd] type.convert (PR#6781)
In-Reply-To: <20040416163133.1085710495@slim.kubism.ku.dk>
Message-ID: <Pine.LNX.4.44.0404181704360.22842-100000@gannet.stats>

On Fri, 16 Apr 2004 hosking@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@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


[Rd] type.convert (PR#6781)
Prof Brian Ripley