The tilde symbol (
R is very highly used for statistical and data analysis. It contains the use of many formulas for different purposes. That is why the tilde symbol (
~) is used very frequently in R.
The dependent variable is taken on the left of the
~ symbol, and the right side consists of explanatory variables. A sample formula that will demonstrate the use of the
~ symbol is shown below:
s <- lhs ~ rhs s lhs ~ rhs
In the example,
s is a sample formula. Notice the use of the tilde symbol (
~) in the formula.
In R programming, we can use the
help() function to find information about any function, operator, or any other object. We can also use it to find out more about the tilde symbol (
~). The code below shows how:
It returns the documentation of the
~ symbol in the file browser tab in R-Studio.