I thought that invisible works like return()
However, it appears that it doesn't exit a function.  Is it supposed to work
this way?


funInvisible = function(){
    invisible(10)
    cat('I was not expecting this to print\n')
    cat('because it occurs after the invisible return\n')
}
funInvisible()


funVisible = function(){
    cat('start of function\n')
    return(10)
    cat('This error is safely avoided: \n')
    cat(1 / 0)
}
funVisible()

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to