Difference between %% and % in R [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Difference between %% and % in R [closed]



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


%%


%



I am getting the following result:


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



where can we use a single % in R?


%



This question appears to be off-topic. The users who voted to close gave this specific reason:





There is no single % in R. help("%")# No documentation for ‘%’ in specified packages and libraries:
– akrun
Aug 12 at 13:28



%


help("%")# No documentation for ‘%’ in specified packages and libraries:




2 Answers
2



In R , there is no %. We can find it from


R


%


help(`%`)



No documentation for ‘%’ in specified packages and libraries: you
could try ‘??%’



In R %% gives remainder of first vector with the second as follows a example.


%%


first <- c( 2,5.5,6)
second <- c(8, 3, 4)
print(first%%second)



Output will be as follows.


[1] 2.0 2.5 2.0



As already mentioned by akrun sir in comments there is nothing like % in R.


%

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard