Help about exception handling in r-project.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help about exception handling in r-project.

Anusha-2

Respected Sir,
 
I am working on something in R. I am getting the following error.
 
Warning messages:1: the standard deviation is zero in: cor(x, y, na.method, method == "kendall")
 
I like to handle this error.
 
I like to know how to do error handling in R.
 
I want to write the WARNING MESSAGES to a text file and exit R. Please help me with a solution.
 
My mailid is [hidden email]
 
Thanking you,
Anusha
_________________________________________________________________
Climb to the top of the charts!  Play Star Shuffle:  the word scramble challenge with star power.

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: Help about exception handling in r-project.

Uwe Ligges


ANUSHA AIYALU KANNAN wrote:

> Respected Sir,
>  
> I am working on something in R. I am getting the following error.
>  
> Warning messages:1: the standard deviation is zero in: cor(x, y, na.method, method == "kendall")
>  
> I like to handle this error.
>  
> I like to know how to do error handling in R.
>  
> I want to write the WARNING MESSAGES to a text file and exit R. Please help me with a solution.
>


See ?warning, ?stop and particularly ?try and the other links and
references given on those help pages.

Uwe Ligges

> My mailid is [hidden email]
>  
> Thanking you,
> Anusha
> _________________________________________________________________
> Climb to the top of the charts!  Play Star Shuffle:  the word scramble challenge with star power.
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

RE : Help about exception handling in r-project.

GOUACHE David
In reply to this post by Anusha-2
?try
?tryCatch

worked for me

David Gouache
Arvalis - Institut du Végétal
Station de La Minière
78280 Guyancourt
Tel: 01.30.12.96.22 / Port: 06.86.08.94.32


-----Message d'origine-----
De : ANUSHA AIYALU KANNAN [mailto:[hidden email]]
Envoyé : dimanche 4 novembre 2007 04:50
À : [hidden email]
Objet : [R] Help about exception handling in r-project.


Respected Sir,
 
I am working on something in R. I am getting the following error.
 
Warning messages:1: the standard deviation is zero in: cor(x, y, na.method, method == "kendall")
 
I like to handle this error.
 
I like to know how to do error handling in R.
 
I want to write the WARNING MESSAGES to a text file and exit R. Please help me with a solution.
 
My mailid is [hidden email]
 
Thanking you,
Anusha
_________________________________________________________________
Climb to the top of the charts!  Play Star Shuffle:  the word scramble challenge with star power.

        [[alternative HTML version deleted]]

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