问题
Why does b have a value? I think b should be null, because there is no return in function f.
f <- function(){
a <- 10
}
b <- f()
b
# [1] 10
回答1:
<-
operator returns assignement invisibly, which allows
b <- a <- 1
b
a
> b
[1] 1
> a
[1] 1
来源:https://stackoverflow.com/questions/63950864/why-does-b-have-a-value