R: what are Slots?

后端 未结 4 1937
别那么骄傲
别那么骄傲 2021-01-30 02:49

Does anyone know what a slot is in R?

I did not find the explanation of its meaning. I get a recursive definition: \"Slot function returns or set information about the

4条回答
  •  终归单人心
    2021-01-30 03:24

    In addition to the resources @Joris points you to, plus his own answer, try reading ?Classes, which includes the following on slots:

     Slots:
    
          The data contained in an object from an S4 class is defined
          by the _slots_ in the class definition.
    
          Each slot in an object is a component of the object; like
          components (that is, elements) of a list, these may be
          extracted and set, using the function ‘slot()’ or more often
          the operator ‘"@"’.  However, they differ from list
          components in important ways.  First, slots can only be
          referred to by name, not by position, and there is no partial
          matching of names as with list elements.
          ....
    

提交回复
热议问题