This function gives you the mean and the median of a dataset
mean_med(df, var)
df | Name of the Dataset |
---|---|
var | Variable to find the mean and median of |
money1 <- read_csv("https://raw.githubusercontent.com/ryanburge/pls2003_sp17/master/sal_work.csv")#> Warning: Missing column names filled in: 'X1' [1]#>#> #>money1 %>% mean_med(salary)#> # A tibble: 1 x 2 #> mean median #> <dbl> <dbl> #> 1 1247953. 35853