October 2017
Beginner to intermediate
236 pages
7h 38m
English
The newly created S4 object rStatsS4 displays the results into the R console as follows:
> rStatsS4 An object of class "robustSummary" Slot "median": [1] 19 Slot "mad": [1] 5.9304 Slot "q1": [1] 16 Slot "q3": [1] 23.75
This is the default method of the show() generic function. Once you have defined the method for the class robustSummary, the result will display as you defined within the method. Here is the result using the newly defined method for the robustSummary class:
> show(rStatsS4) The median is 19 with median absolute deviation (MAD) = 5.9304 First and Third Quartile is 16 and 23.75 > rStatsS4 The median is 19 with median absolute deviation (MAD) = 5.9304 First and Third Quartile is 16 and 23.75