You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regarding the % operators: They signal a special binary operator. %/% means integer division, %% modulo.
In your example: (1:5) %/% t(2:6) the integer division will be applied and the t() will make the output a matrix, because the second argument is treated as a column vector.
That %*% means matrix multiplication, but %/% integer division is a bit unfortunate in R. But R is not a mathematical language (like Matlab), matrix multiplication is seen as special so get's a special syntax.
BTW: you can define a special binary operator yourself: %s% <- function(x,y) x + y
3 %s% 4
In the R user meeting of Nov 16th, we had a question why
but
??
I don't know, but the solution (given by another participant) is:
The text was updated successfully, but these errors were encountered: