[R] Returning from a function

Liaw, Andy andy_liaw at merck.com
Tue May 24 06:10:26 CEST 2005


Use invisible(NULL) as the last line. 

Andy

> From: Laura Holt
> 
> Hello again.
> 
> I have a function that plots a series and adds some 
> interesting items to the 
> plot.
> 
> Fair enough.
> 
> The last statement in the function is
> return()
> 
> When the function is executed, NULL appears at the end, which is ok.
> Is there any way to prevent NULL from appearing, or is that 
> just as it 
> should be, please?
> 
> thanks again,
> Shamefacedly,
> Laura Holt
> R Version 2.1.0 Windows
> mailto: lauraholt_983 at hotmail.com
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
> 
>




More information about the R-help mailing list