Files Corresponding to Short Course Programming in R
mySummary
that takes in a
single vector and is capable of outputting the min
, max
,
median
, mean
, and sd
of the vector.By default have the function produce the min
, median
, and max
only. Return the appropriate object with names for each item returned.
Allow for the passing of unnamed arguments.
Hint: Create an empty list
using myList <- list()
. If the user
specifies they want an input (or by default it is TRUE
), add an
element to that list (myList$max <-
for instance).
min
, mean
, and sd.
(Recall the na.rm=TRUE
argument for many
of the basic summary functions.x <- c(runif(10), NA)