1

hat will be the output of the following R code? > centre <- function(x, type) { + switch(type, + mean = mean(x), + median = median(x), + trimmed = mean(x, trim = .1)) + } > x <- rcauchy(10) > centre(x, "mean")

Correct Answer: gives mean with values depending on rcauchy values

Make the most of this question

This page focuses on one R Programming MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

R Programming MCQs MCQ: hat will be the output of the following R code? > centre x centre(x, "mean") | Extra Education