Skip to content
Prev 12076 / 21307 Next

[Bioc-devel] R6 class v.s. S4 class

On Thu, Oct 19, 2017 at 9:23 PM, Chunlei Wu <cwu at scripps.edu> wrote:

            
Yes, there will probably be way more users of R wanting to use BioThings
than BioThings users wanting to use R.
As Herve points out, R users will expect queries to be vectorized
implicitly. queryBioThings() or whatever should probably return a tabular
structure describing the things. There is no need for distinguishing
singular and plural.
There seems to be a misconception here. S4 has two types of classes,
conventional value classes, and reference classes. The reference classes
have the same syntax as the R6 classes. R6 is mostly a stripped down
version of S4 reference classes. In this particular case, R is sufficiently
flexible that it would be easy to support the reference class syntax on
ordinary value classes. So you could use the reference class syntax, but I
wouldn't recommend it, for the aforementioned reasons. Moreover, be careful
about carrying over notions from Python and JS into R. R is unique in
fundamental ways.

Does this sound good to the group? Any more suggestions?

  
  
Message-ID: <CAOQ5Nye70nXrvuYcRHQfd23FQW_2Ta4BOmHB35YiT3hTiiOaSA@mail.gmail.com>
In-Reply-To: <CY4PR11MB140024D01364DA902208C86CB9430@CY4PR11MB1400.namprd11.prod.outlook.com>