'R function %^% not found even though dplyr is loaded

I dont understand why this doesn't work. I have the following matrix ma1

             [,1]         [,2]        [,3]         [,4]
[1,] 5.996807e-01 1.114280e-01 0.288891231 4.235966e-40
[2,] 4.405318e-26 9.200561e-01 0.079943925 2.926447e-98
[3,] 8.174676e-01 1.388150e-24 0.121288003 6.124443e-02
[4,] 8.145808e-02 3.090223e-22 0.002188103 9.163538e-01

and I am trying to do

ma1 %^% 100

but I am getting this error

Error in ma1 %^% 100 : could not find function "%^%"

even though I have loaded the library beforehand.

library(dplyr)

I have run this code after not looking at it for a long time, did something change in the R versions or libraries? I think it worked in Version 3.0 perfectly (2019).

version.string R version 4.0.3 (2020-10-10)

What's going wrong here?



Solution 1:[1]

library(expm) 

is the library to use for powers of matrices.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AndiAna