Session | Date | Level |
---|---|---|
Scope of the possible with R | 15:00-16:00 Mon 24th June 2024 | 💼: non-technical |
Iteration in R | 09:30-11:00 Fri 5th July 2024 | |
Getting more out of dplyr | 10:30-12:00 Wed 17th July 2024 |
18/06/2024
Session | Date | Level |
---|---|---|
Scope of the possible with R | 15:00-16:00 Mon 24th June 2024 | 💼: non-technical |
Iteration in R | 09:30-11:00 Fri 5th July 2024 | |
Getting more out of dplyr | 10:30-12:00 Wed 17th July 2024 |
function
if
/else
Vectorize
lapply
/ purrr::map
with Vectorize
{{}}
?mtcars$hp
/ mtcars |> select(hp)
hp
like an object, and R figures out the scope etc for ushp
{{}}
carmo_woo <- function(column){
mtcars |>
dplyr::summarise(average = round(mean({{column}})))
}
carmo_woo(hp)
average
1 147
{{}}
as a purely empirical fix{{}}
defuses and injects the column name!!enquo(var)
Writing functions in R feedback link