How to do it…

The S4 object class has a generic function equivalent to the print() generic function for the S3 class of objects. The function "show" is a generic function that works similarly to the print() function in the S3 system. You will write a method for the "show" function for the "robustSummary" S4 class as follows:

    setMethod("show",
"robustSummary",
function(object) {
cat("The median is ",object@median, " with median
absolute deviation (MAD) = ", object@mad, " ")
cat("First and Third Quartile is", object@q1, "and",
object@q3)
}
)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset