我很难理解运算符%o%
same.prac.op <- v.attr.lazega$Practice %o% v.attr.lazega$Practice
此运算符是igraph
还是sand
的一部分?
https://github.com/kolaczyk/sand/blob/master/sand/inst/code/chapter6.R
答案 0 :(得分:3)
%o%
是外部产品。它是base
R。例如,
1:3 %o% 4:6
# [,1] [,2] [,3]
# [1,] 4 5 6
# [2,] 8 10 12
# [3,] 12 15 18
相当于
matrix(1:3, nc = 1) %*% matrix(4:6, nr = 1)
# [,1] [,2] [,3]
# [1,] 4 5 6
# [2,] 8 10 12
# [3,] 12 15 18
请参阅https://stat.ethz.ch/R-manual/R-devel/library/base/html/outer.html。