Exercise

# Function with Vector Output

To create a function with multiple functions in it, you just type

```
myFun <- function(x) { other_functions }
```

Only the last object that you created will be returned by a function call. So when you would like to return multiple objects, you have to create a vector that contains these objects. In this vector, you can specify a name for each result.

The `pretest`

variable is pre-loaded in your workspace.

Instructions

**100 XP**

- Write a function
`mystats`

that returns the mean (named`mean`

), the standard deviation (named`sd`

), the median (named`median`

), the maximum (named`max`

) and the minimum (named`min`

) of a vector, in that order, removing the missing values. - Apply your function on the
`pretest`

variable.