[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

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 a...@piskorski.com 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

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

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 a...@piskorski.comwrote: On Mon, Apr 21, 2014 at 12:43:55PM -0400, Simon Urbanek wrote: And that's how it should be - there is

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

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