Hi Please explain why the function 'foo()' is not printing x as 8 in the following code :
> foo <- function(){ + x <- 10 + if(x){ + x <<- 8 + } + print(x) + } > foo() [1] 10 > x [1] 8 > -- *AROONALOK PYNE* BE Graduate Department Of Computer Science And Engineering Jadavpur University, Kolkata-32 India ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.