[Rd] stringsAsFactors and type.convert()
m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Mon Apr 20 18:23:31 CEST 2020
>>>>> Arni Magnusson
>>>>> on Mon, 13 Apr 2020 22:20:19 +0000 writes:
> If read.table() is defaulting to "character" instead of "factor" data type, shouldn't type.convert() also default to "character" in R 4.0.0?
> This would seem like a good time to change the default to type.convert(as.is=TRUE), to align it with the new default in read.table and data.frame. I think many R >=4.0.0 users would be happy with as.is=TRUE as the default in type.convert.
> I'm happy to work on the patch and run tests if that is helpful.
thank you for the notice, which unfortunately wasn't noticed
(Easter break etc) and was too late in any case to fulfill the
criterion of a small trivial bug fix for R 4.0.0 beta (very close
to becoming RC (= "Release Candidate").
Even when type.convert() may not be used much directly (but
rather indirectly via read.table() where there's no problem), we
found it too risky to destabilize the R 4.0.0 prereleases.
As you all know there were ( / are?) still package changes
needed and a few other important "todo"s, so we had to decide to
postpone this (even for R-devel) to after releasing R 4.0.0
I've committed a change to the help page which does mention that
the default for 'as.is' is planned to be changed.
Also, the help page's "Details" section, for a long time has
Since this is a helper function, the caller should always pass an
appropriate value of 'as.is'.
If useRs and package authors have followed this advice, they
won't be bitten at all.
More information about the R-devel