[datatable-help] Import problem with data.table in packages

Ken Williams Ken.Williams at windlogics.com
Mon May 6 23:29:57 CEST 2013



> -----Original Message-----
> From: datatable-help-bounces at lists.r-forge.r-project.org [mailto:datatable-
> help-bounces at lists.r-forge.r-project.org] On Behalf Of Ken Williams
> Sent: Monday, May 06, 2013 4:27 PM
> To: Matthew Dowle
> Cc: datatable-help at lists.r-forge.r-project.org
> Subject: Re: [datatable-help] Import problem with data.table in packages
>
>
>
> > -----Original Message-----
> > From: Matthew Dowle [mailto:mdowle at mdowle.plus.com]
> > Sent: Wednesday, May 01, 2013 4:13 PM
> > To: Ken Williams
> > Cc: datatable-help at lists.r-forge.r-project.org
> > Subject: Re: [datatable-help] Import problem with data.table in
> > packages
> >
> >
> > Hi,
> >
> > This rings a bell actually. data.table uses .onLoad currently but it
> > should be using .onAttach, I seem to recall.
> >
> >
> > http://r.789695.n4.nabble.com/Error-in-a-package-that-imports-data-tab
> > le-
> > tp4660173p4660637.html
> >
> > I had a hunt around but couldn't find if we decided data.table should
> > move from .onLoad to .onAttach.  Does anyone know/remember?
>
> I'm not sure - but maybe a solution would be to explicitly prefix the package
> name:

[...]

Sorry, didn't notice the backticks - the second patched line should probably go like so:


-        ss[[2]] = parse(text="if (inherits(..1,'data.table')) return(`.rbind.data.table`(...))")[[1]]
+        ss[[2]] = parse(text="if (inherits(..1,'data.table')) return(data.table::.rbind.data.table(...))")[[1]]


 -Ken

________________________________

CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.


More information about the datatable-help mailing list