[R] Is there a way to prevent Rscript from opening help page when given an error

Tan, Johnny Johnny.Tan at moodys.com
Thu Oct 13 23:36:56 CEST 2016


I posted this on stackoverflow but there hasn't been any replies, does anyone know a solution for this?





I am running a script via command line using Rscript nameOfmyRscript. I notice that when there is an error, my browser would open with the help page. Now my script contained repeated errors of the same type so my browser had 10 tabs of the same help page. Is there a command or way to prevent R from opening up these pages? I know that you can suppress all warnings by doing option(warn=-1) and that you can use sink() to write errors and warnings to file. I currently have the errors and warnings written to separate files, but the help page keeps opening. I would prefer to not have any help pages open at all.

The following error would open the mean.html help page

Error in mean.default(workshop) :

(converted from warning) argument is not numeric or logical: returning NA


    Thanks
-----------------------------------------

The information contained in this e-mail message, and any attachment thereto, is confidential and may not be disclosed without our express permission. If you are not the intended recipient or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution or copying of this message, or any attachment thereto, in whole or in part, is strictly prohibited. If you have received this message in error, please immediately notify us by telephone, fax or e-mail and delete the message and all of its attachments. Thank you. Every effort is made to keep our network free from viruses. You should, however, review this e-mail message, as well as any attachment thereto, for viruses. We take no responsibility and have no liability for any computer virus which may be transferred via this e-mail message.

	[[alternative HTML version deleted]]



More information about the R-help mailing list