October 2017
Beginner to intermediate
236 pages
7h 38m
English
Though you can directly use the new() function to define a new S4 class, there is another more generalized way to define a new S4 class using a constructor function as follows:
> robustSummary <- setClass("robustSummary", slots=list(median="numeric", mad="numeric", q1="numeric", q3="numeric")) > robustSummary class generator function for class "robustSummary" from package '.GlobalEnv' function (...) new("robustSummary", ...)