Dear All, 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) Steve. ************************************************************************************** Steve Su (s.su@qut.edu.au) Postdoctoral fellow Faculty of Business Queensland University of Technology Postal Address: Steve Su, School of Accountancy, QUT, PO Box 2434, Brisbane, Queensland, Australia, 4001. CRICOS No. 00213J Phone: +61 7 3864 4357 Fax: +61 7 3864 1812 Mobile: 0421 840 586 . _--_|\ / QUT \_.--._/ v ************************************************************************************** [[alternative HTML version deleted]]
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)
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 at stat.math.ethz.ch > [mailto:r-help-bounces at 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 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 >