What is the difference between %% and % in R programming?

0 votes

I've executed the following:

> 5%%2
[1] 1
> 5%2
Error: unexpected input in "5%2" 

Why am I getting an error while using '%'?

Apr 23 in Data Analytics by Tyrion anex
• 8,280 points
51 views

1 answer to this question.

0 votes

There is no such '%' operator in R programming. The '%%' stands for the logical AND operator.

You can check this by using the following command:

help('%%')
answered Apr 23 by Sophie may
• 9,430 points

Related Questions In Data Analytics

0 votes
1 answer
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
54 views
0 votes
1 answer

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

Structured query language (SQL) is a programming ...READ MORE

answered Aug 24, 2018 in Data Analytics by Anmol
• 3,620 points
56 views
0 votes
1 answer

What is the difference between R and SPSS?

One of the main difference is R ...READ MORE

answered Dec 11, 2018 in Data Analytics by Maverick
• 10,040 points
69 views
0 votes
1 answer

Error saying "vector size cannot be NA" when using R with data mining

You can use the removesparseterm function.  Removes sparse ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,040 points
293 views
+1 vote
2 answers
0 votes
1 answer

Trying to find frequent itemsets of a data set using arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", "milk", ...READ MORE

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

Error saying "Error in df$item : object of type 'closure' is not subsettable" when trying to use arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,040 points
85 views
0 votes
1 answer

R programming: Finding the difference between 2 vectors

Try this function, it worked for me: f ...READ MORE

answered Dec 27, 2018 in Data Analytics by Sophie may
• 9,430 points
32 views
0 votes
1 answer

What is the paradigm of R language?

R provides features of object-oriented and functional programming ...READ MORE

answered Jan 10 in Data Analytics by Sophie may
• 9,430 points
53 views