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
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
<-
operator returns assignement invisibly, which allows
b <- a <- 1
b
a
> b
[1] 1
> a
[1] 1