Re: [Rd] read.table() code fails outside of the utils package

2014-04-21 Thread Andrew Piskorski
On Mon, Apr 21, 2014 at 06:44:05PM +0100, Prof Brian Ripley wrote: > On 21/04/2014 18:08, Andrew Piskorski wrote: > >> .External(utils:::C_readtablehead, ...) > > > > Ah, that works fine, and is nice and simple. So problem solved, thank > > you! > > > > I do still wonder though, with the C symbol

Re: [Rd] Can the output of Sys.getenv() be improved?

2014-04-21 Thread William Dunlap
> >> structure(Sys.getenv(), class="simple.list") > >_ ! > > Good idea; this is something we could do unconditionally, i.e., > return from Sys.getenv(). As the OP noted, the print method for simple.list will pad all lines to have the same length, so if, say, PA

[Rd] how to get old type.convert() numeric behavior?

2014-04-21 Thread Andrew Piskorski
Regarding this change: > CHANGES IN R 3.1.0: > NEW FEATURES: > * type.convert() (and hence by default read.table()) returns a > character vector or factor when representing a numeric input as a > double would lose accuracy. Similarly for complex inputs. > > If a fil

Re: [Rd] read.table() code fails outside of the utils package

2014-04-21 Thread Prof Brian Ripley
On 21/04/2014 18:08, Andrew Piskorski wrote: On Mon, Apr 21, 2014 at 12:43:55PM -0400, Simon Urbanek wrote: And that's how it should be - there is not reason why any other code should link to it. Why don't you just use .External(utils:::C_readtablehead, ...) Ah, that works fine, and is nice

Re: [Rd] read.table() code fails outside of the utils package

2014-04-21 Thread Gabriel Becker
Andrew, I haven't checked, but probably because it wasn't registered as a native routine for that package. ~G On Mon, Apr 21, 2014 at 10:08 AM, Andrew Piskorski wrote: > On Mon, Apr 21, 2014 at 12:43:55PM -0400, Simon Urbanek wrote: > > > And that's how it should be - there is not reason why a

Re: [Rd] read.table() code fails outside of the utils package

2014-04-21 Thread Andrew Piskorski
On Mon, Apr 21, 2014 at 12:43:55PM -0400, Simon Urbanek wrote: > And that's how it should be - there is not reason why any other code should > link to it. Why don't you just use > > .External(utils:::C_readtablehead, ...) Ah, that works fine, and is nice and simple. So problem solved, thank yo

Re: [Rd] read.table() code fails outside of the utils package

2014-04-21 Thread Simon Urbanek
Andrew, On Apr 21, 2014, at 11:53 AM, Andrew Piskorski wrote: > One of the great things about R is how readable and re-usable much of > its own implementation is. If an R function doesn't do quite what you > want but is close, it is usually very easy to read its code and start > adapting that a

[Rd] read.table() code fails outside of the utils package

2014-04-21 Thread Andrew Piskorski
One of the great things about R is how readable and re-usable much of its own implementation is. If an R function doesn't do quite what you want but is close, it is usually very easy to read its code and start adapting that as the base for a modified version. In the 2.x versions of R, that was th

Re: [Rd] type.convert and doubles

2014-04-21 Thread McGehee, Robert
Agreed. Perhaps even a global option would make sense. We already have an option with a similar spirit: 'options(³stringsAsFactors"=T/F)'. Perhaps 'options(³exactNumericAsString²=T/F)' [or something else] would be desirable, with the option being the default value to the type.convert argument. I

Re: [Rd] R 3.1.0: 'R CMD Sweave' deletes non tex files created upon batch mode exit

2014-04-21 Thread Duncan Murdoch
On 20/04/2014, 6:43 PM, Jeroen Ooms wrote: On Sun, Apr 20, 2014 at 11:19 AM, Martin Maechler wrote: you are welcome, and thanked again together with everyone who spends the little extra time for checking / using "the next version of R" -- in general, i.e., on a regular basis. With the risk of