0 votes
When is ~ used in R? Why is y~x used instead of x,y in some ploting functions?
Aug 7, 2019 1,100 views

## 1 answer to this question.

0 votes
One use of ~ is to mention x,y dimensions for plots.

Such as boxplot(y~x, [attr] = [val].....)

Where y, x are fields to plot in y and x-axis.

Some of the functions in R take values as (y,x), that is when ~ is used. In most of the functions (x,y) form is followed.
answered Aug 7, 2019 by anonymous
• 33,030 points

0 votes
1 answer

## Use of \$ and %% operators in R

According to help('percent in percent'), percent in ...READ MORE

0 votes
0 answers

## Use of ggplot() within another function in R

Using the ggplot2 package, I'm attempting to ...READ MORE

0 votes
1 answer

## Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

0 votes
1 answer

## How to use a function to repeat a set of procedures on specific set of columns in a data frame?

You can parse the strings to symbols. ...READ MORE

0 votes
1 answer

## By using dpylr package sum of multiple columns

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

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

0 votes
1 answer

## In a dpylr pipline how to use sample and seq?

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

0 votes
1 answer

## How to create a list of Data frames?

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

+2 votes
2 answers

## Change data type of one column in R

You can change data types using as.* ...READ MORE

+1 vote
3 answers

## How to change the value of a variable using R programming in a data frame?

Try this: df\$symbol <- as.character(df\$symbol) df\$symbol[df\$sym ...READ MORE