2011/11/8 Matthew Dowle <[email protected]>
>
>  > Interesting! I posted that problematic suggestion is because it worked
> > for me in other case before. I was trying to overwrite data.table's
> > default argument: 'nomatch' = 0 instead of NA. I can't find a smart
> > way to do it,
>
We could very easily make the default changeable by user. It's just
> changing the argument to be nomatch=getOption("datatable-nomatch",NA),
> so then you can put "options(datatable-nomatch=0)" in your .Rprofile.
> Shall we do that?


Oh, I will be moved to tears if you are willing to do that! ^^ Actually, I
remember we already used this option for some arguments. And I was wishing
'nomatch' has it, too. I was afraid to ask for this favor, but I am glad
you are willing help now.


> > and I end up with overwrite whole data.table function. At that time,
> > data.table.fn <- function() {...} is not enough.
>
> It would be enough, normally. But most data.table functions start with a
> call to cedta() [Calling Environment Data Table Aware]. That's how the
> switch to [.data.frame happens for non-datatable-aware packages.  As
> soon as a function exists in .GlobalEnv, though, cedta() believes it is
> datatable aware and it won't work as expected when called by a
> non-datatable-aware package (guessing what the problem was in your
> case). It depends on namespaces to do that, and where the function is,
> see data.table:::cedta.


This is out of my knowledge and I appreciate that you point it out. Thank
you, Matthew!

Best regards,
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help

Reply via email to