Import your data

data("mtcars")

Repeat the same operation over different columns of a data frame

Case of numeric variables

Create your own function

Repeat the same operation over different elements of a list

When you have a grouping variable (factor)

Create your own

Choose either one of the two cases above and apply it to your data