What is ~ operator in R?

0 votes
What is ~ operator in R?
Oct 9 in Data Analytics by anonymous
• 3,290 points
21 views

1 answer to this question.

0 votes

~ operator is used in R for performing bivariate or multivariate analysis of variables.

It is used in various functions such as plot, ggplot, kmeans, rpart, etc.

Used as -

LHS~RHS where LHS is analyzed with respect to RHS variables.

Ex:

tree = rpart(variable~., data = train)

. represents all variables.

Individual variables can also be used by using + operator.

For Example,

function(~.annual_inc+home_ownership+term, ...)
answered Oct 14 by mohan

Related Questions In Data Analytics

0 votes
1 answer
0 votes
1 answer

What is the standard naming convention for the variables in R?

Use of period separator e.g. product.prices <- c(12.01, ...READ MORE

answered Apr 25, 2018 in Data Analytics by shams
• 3,580 points
40 views
0 votes
1 answer

What is the difference between library () and require () functions in R ?

 library() require() Library () function gives an error message ...READ MORE

answered Sep 5, 2018 in Data Analytics by zombie
• 3,710 points
106 views
0 votes
1 answer

What is active binding in R programming

Active bindings in R are much like ...READ MORE

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,040 points
43 views
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
128 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
184 views
0 votes
1 answer

In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

answered Apr 6, 2018 in Data Analytics by DeepCoder786
• 1,720 points
91 views
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
115 views
0 votes
1 answer

What is grob and how to create grobs in ggplot?

A grid graphical object (“grob”) is a ...READ MORE

answered Oct 29 in Data Analytics by Cherukuri
• 32,260 points
75 views
0 votes
1 answer

How to convert a continuous variable to discrete variable and vice versa in R?

Discretize function convert a continuous variable into ...READ MORE

answered Nov 4 in Data Analytics by rajeev
113 views