[datatable-help] Override the data.frame print function

Chris Neff caneff at gmail.com
Mon Nov 7 20:09:31 CET 2011


Yes, that exactly.  The main time it happens for me is with the
reshape package, and plyr the rare amount i use it still.

In fact my case is the exact one in the FR.  I want melt(DT) to be a
data.table, and in general if f(DT) returns a data.frame, i want it to
be a data.table.

-Chris

On 7 November 2011 14:03, Matthew Dowle <mdowle at mdowle.plus.com> wrote:
>
> I don't quite follow, need context and example please.
>
> Like FR#984?
> https://r-forge.r-project.org/tracker/index.php?func=detail&aid=984&group_id=240&atid=978
>
> In the past we tried masking data.frame itself but at the time that
> didn't work. We know a bit more now, so with fresh eyes ...
>
>
> On Mon, 2011-11-07 at 11:50 -0500, Chris Neff wrote:
>>  Thanks Tom, this works great.  What I really want in the long term is
>> a way for it to be auto transformed into a data.table but I don't see
>> an easy general solution for that.
>> On 4 November 2011 09:24, Tom Short <tshort.rlists at gmail.com> wrote:
>> > On Fri, Nov 4, 2011 at 9:15 AM, Chris Neff <caneff at gmail.com> wrote:
>> >> I'd rather have the print.data.table function override the
>> >> print.data.frame one. How can I do this?
>> >
>> > Try:
>> >
>> > print.data.frame <- data.table:::print.data.table
>> >
>> _______________________________________________
>> datatable-help mailing list
>> datatable-help at lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>
>
>


More information about the datatable-help mailing list