我遇到了一个新的管道 R 运算符 %<-%
在这个博客上:https://blogs.rstudio.com/ai/posts/2019-09-30-bert-r/在tokenize_fun()
功能。
这个运算符叫什么?它有什么作用?
我在谷歌上找不到任何关于它的信息。我知道其他管道运营商,如 %>%
, %T>%
, %$%
最佳答案
它是来自 zeallot
的多重赋值运算符
%<-% and %->% invisibly returnvalue.
These operators are used primarily for their assignment side-effect. %<-% and %->% assign into the environment in which they are evaluated.
即它从一行代码创建多个对象
> library(zeallot)
> c(x, y, z) %<-% c(1, 3, 5)
> x
[1] 1
> y
[1] 3
> z
[1] 5
关于r - R 中的 %<-% 运算符是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68970084/