Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. mean <- function (x, ...) UseMethod("mean", x)
  2. mean.numeric <- function(x, ...) sum(x) / length(x)
  3. mean.data.frame <- function(x, ...) sapply(x, mean, ...)
  4. mean.matrix <- function(x, ...) apply(x, 2, mean)
  5. mean.default <- function(x, ...) {
  6. # do something
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement