diff --git a/lists.Rmd b/lists.Rmd index 27f7d04..258f594 100644 --- a/lists.Rmd +++ b/lists.Rmd @@ -192,6 +192,7 @@ results If you do this a lot, you should probably make a function for it: ```{r} +df <- data.frame(x = 1:10, y = rnorm(100)) col_medians <- function(df) { out <- vector("numeric", ncol(df)) for (i in 1:ncol(df)) {