```{r eval=FALSE}
#| output-location: column-fragment
# Make example vector
example = c(1, 2, 3, 3, 4, 5, 7)
# re-create my failed mode from Monday
mode_fail = function(numeric_vector) {
# Get frequency
num_table = table(numeric_vector)
# Find most common
mode_num = num_table[which(num_table == max(num_table))]
# get the name of most common
mode_name = unname(mode_num)
# return result
return(mode_name)
}
# Bad result!
mode_fail(example)
```