What is ~ operator in R?

0 votes
What is ~ operator in R?
Oct 9 in Data Analytics by anonymous
• 2,430 points
16 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
32 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,690 points
77 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
37 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
106 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
138 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
79 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
90 views
0 votes
1 answer

In R programming language, how do I export data in .txt?

See this image for ways to export ...READ MORE

answered Oct 11 in Data Analytics by ashwini
21 views
0 votes
2 answers

R: Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...)

Use unlist function to convert the list ...READ MORE

answered Oct 14 in Data Analytics by anonymous
• 28,280 points
20 views