forked from minhdb/GCAT
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Milestone
Description
R refuses to initialize a well object with empty @Loess and @nls slots. It requires them to be of "loess" and "nls" class respectively. The current work-around is to initialize them to empty lists with class attributes set to "loess" and "nls". This, however, causes an error when a well object is printed, which required another work-around in the "show" method. This is all clunky. Is there a better way to do it? Consider the following possibilities:
- Use inheritance to define a "well" superclass that does not have @Loess and @nls slots and sub-classes that do have them. A new well would initially be of class "well", then assigned to the appropriate sub-class when the right object is available to populate the @Loess and/or @nls slot.
- Can instead use a generic slot with class set to "ANY". However, this is less rigorous.
Is there another way that we are not thinking about? Investigate and implement the best solution.
The same may be needed for the @equation slot as well.
Reactions are currently unavailable