[datatable-help] Playing nice(r) with S4?
Steve Lianoglou
mailinglist.honeypot at gmail.com
Wed Nov 24 20:26:43 CET 2010
Hi,
On Wed, Nov 24, 2010 at 2:13 PM, Matthew Dowle <mdowle at mdowle.plus.com> wrote:
> Try
>
> test(228, setClass("DTS4", representation(info="data.table")), "DTS4")
I tried that at first, but you get an error from (I think) defining a
new class in the wrong place, specifically:
Test 228 Error in assign(mname, def, where) :
cannot add bindings to a locked environment
> In test.data.table we only use try() for when the correct result is an
> error and the test is that we get the right error message with a grep in
> another test just afterwards. Otherwise we can leave test() to try().
>
> Code that shouldn't fail can just be written (and would cause
> test.data.table to stop then and there on error) or inside a test().
So, in light of the above problem, would you rather I just write the
code that defines the new S4 class and not test that "it worked" since
we assume implicitly it works if no error stops test.data.table() form
completing?
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the datatable-help
mailing list