Thanks, Bill

[email protected] wrote:
fn <- function(x) {
        j <- x+1
        cat("the value of j is ", j, "\n")
        j
 }

fn(1:10)

It is clear for me now the use of cat(). As Steve pointed out in his mail, I've failed at providing an example, one of the rules of thumb of this list! Sorry about that. Also as Steve says, I am trying to use cat() for something it's not meant to do. I am trying to pull out the value of a variable, well, some variables, without making them global by using <<-

Following your example, I was guessing if something like fn.j could be used.

Cheers,

Ricardo

--
Ricardo Rodríguez
Your XEN ICT Team

______________________________________________
[email protected] 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.

Reply via email to