Over 10 years we helping companies reach their financial and branding goals. Onum is a values-driven SEO agency dedicated.

Coding SEO

What is The Use of Tilde in R? Tilde (~) Operator


Tilde operator is used in statistical formulas where we need to define the relationship between a dependent variable and an independent variable.

Variables on the left-hand side of tilde are considered as dependent variable and variables on right-hand-side of tilde is are called independent variables.

> Regression_Model_relationship <- qa(y~ n1 + n2 + n3)

In the above equation, we have the object Regression_Model_relationship that stores the formula for linear regression and created by qa and y. So, qa and y are on the left-hand side of tilde are dependent variables, and n1, n2, and n3 are independent variables.

Examples of Tilde Operator  in R

> Regression_Data_relationship <- data.frame(n1, n2, n3, y)
> Regression_Model__relationship_New < - qa(y~ . , data = Regression_Data_relationship)


Saalim Tahir

Saalim Tahir, SEO Expert, drives brand growth and profitability using exclusive technology. Let's elevate your online presence together for success!

Leave a comment

Your email address will not be published. Required fields are marked *

Open chat
Hello 👋
How may I assist you today?