title: R S4 best practice: slot with "vector of S4 objects"
body: <p>How does one correctly do the following:</p>
  
  <p>I have a class SpectraSet with slots parentSpectrum, childSpectra, name (to keep it simple)</p>
  
  <p>name is character()</p>
  
  <p>parentSpectrum should contain one object of class ParentSpec (so it is of type ParentSpec)</p>
  
  <p>childSpectra should contain n objects of class ChildSpec. However I can't make it of type ChildSpec because vectors can only contain atomic types. What is best practice in this case? I can make it a list() and type check in the validity check, but is there anything better?</p>