Re: [R] + and - in RODBC : no longer considered factors

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed, 30 Apr 2008 15:34:05 +0100 (BST)

> So the only workaround to make the large old code base to work is get
> the old type.convert implementation and inject it.

That would be rather hard. Try R-patched (from tomorrow, say) instead.

Note that in well over a month of testing no one else has reported this.

On Wed, 30 Apr 2008, Dieter Menne wrote:

> Prof Brian Ripley <ripley <at> stats.ox.ac.uk> writes:
>
>>
>> It is nothing to do with RODBC, which follows read.table here:
>>
>> % cat > foo.txt
>> x
>> +
>> -
>> ...
>>
>>> read.table("foo.txt", header=TRUE)
>> x
>> 1 0
>> 2 0
>>
>> and that uses
>>
>>> type.convert(c("+", "-"))
>> [1] 0 0
>>> type.convert(c("+", "a"))
>> [1] + a
>> Levels: + a
>>
>
> Thank, Prof. Ripley, this makes sense as an explanation. So even
>
> a = type.convert(c("+", "-"),as.is=TRUE)
> str(a)
> # num [1:2] 0 0
>
> does not help, because "num" bites first. Since the docs say
> "convert it it to logical, integer, numeric or complex"
>
> I would have expected this to be integer, but that's only of academic interest.
> So the only workaround to make the large old code base to work is get the old
> type.convert implementation and inject it.
>
> Dieter
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

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

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 30 Apr 2008 - 15:09:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 Apr 2008 - 15:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive