What is the use of function ~ in generalization?
I am using dplyr's summaryise function and got curious about using ~.
eg,
summarise_(school, .dots = list(~ mean(PE), ~ mean(Math), ~n()))
gives me the result of two variables and the number of observations. But why should I use ~ before every function? I don't need this when using the generalize function, so you want to know what it is for!
+3
source to share
No one has answered this question yet
Check out similar questions: