Re: [R] Turning off return warning messages.

From: Mulholland, Tom <Tom.Mulholland_at_dpi.wa.gov.au>
Date: Wed 20 Jul 2005 - 17:01:39 EST


doubleEm <- function(p1,p2,p3,p4){return(p1 *p1,p2 * p2, p3 * p3, p4 * p4)} suppressWarnings(doubleEm(1,2,3,4))
[[1]]
[1] 1

[[2]]
[1] 4

[[3]]
[1] 9

[[4]]
[1] 16

> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch]On Behalf Of Paul Roebuck
> Sent: Wednesday, 20 July 2005 1:50 PM
> To: R Help Mailing List
> Subject: Re: [R] Turning off return warning messages.
>
>
> On Wed, 20 Jul 2005, Steve Su wrote:
>
> > Is there a way I can turn off the following warning message
> > for using multi-argument returns?
> >
> > multi-argument returns are deprecated in: return(p1, p2, p3, p4)
>
> doubleEm <- function(p1, p2, p3, p4) {
> return(list(p1 = p1*p1,
> p2 = p2*p2,
> p3 = p3*p3,
> p4 = p4*p4))
> }
>
> res <- doubleEm(1, 2, 3, 4)
> cat("p3 =", res$p3, "\n")
>
> ----------------------------------------------------------
> SIGSIG -- signature too long (core dumped)
>
> ______________________________________________
> R-help@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
>



R-help@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 Received on Wed Jul 20 17:07:05 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:51 EST