Reputation: 16004
## Arithmetic in R
Operation | Usage | Example
------------- | ------------- | -------------
Addition | a + b |
Subtraction | a - b |
Mulitplication | a * b |
Divison | a / b |
Exponetiation | a ^ b or a ** b |
Modulo | a %% b | 5 %% 3 gives 2
Matrix Mult | a %*% b | hello
I have the above code in rmarkdown in ioslides to create a table. However the last row of the table only renders two columns with the second column containing
a%*%b | hello
instead of putting hello onto the third column? Is this a bug?
Upvotes: 2
Views: 403
Reputation: 78792
Getting rid of the pipes made it work for me:
Operation Usage Example
--------------- --------------- -------------
Addition a + b
Subtraction a - b
Mulitplication a * b
Divison a / b
Exponetiation a ^ b or a ** b
Modulo a %% b 5 %% 3 gives 2
Matrix Mult a %*% b hello
Upvotes: 3