I am new to R. I read that ~ is used to connect a dependent variable with an independent variables. But I see ~ being used at the front of string as in the below 2 examples.