1,基础包中
取余数:
x %% y
modulus (x mod y)
5%%2 is 1
整除:
x %/% y
integer division
5%/%2 is 2
2,dplyr包中
%>%
类似于管道操作符, x %>% f(y), 即对x执行功能f(y)
3,keras包中
将value中的值赋给x:
x %<-% value
value %->% x
例:
#basic usage
c(a, b) %<-% list(0, 1)
a # 0 (类型为numeric)
b # 1
#unpack and assign nested values
c(c(e, f), c(g, h)) %<-% list(list(2, 3), list(3, 4))
e # 2 (类型为numeric)
f # 3
g # 4
h # 5