User Defined Functions
- Describe the components and arguments of the following function.
largest <- function(x,y,z){
a <- c(x,y,z)
l <- which.max(a)
paste(a[l],"is the largest number")
}
- Create and test a function that takes in two vectors and determines which is the longer vector.