🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.stats.s
Article #271

Re: [S] grouped function arguments

#271
From: "Kurbat, Matt"
Date: Tue, 07 Aug 2001 02:39
107 lines
3796 bytes
>Like this?
>
>	FakeFunc<-function(Y, x5)
>	{
>		sum(Y)+x5
>	}

I'm sorry if my posting wasn't clear.  
My real function is much more complicated. 
I'm using the one I gave as a simplified example of my problem.

My intent was to find a way to convert (Y, x5)
to the same format as (x1, x2, x3, x4, x5).  

So for example, the appropriate function call might look something like
	FakeFunc(unpaste(Y), x5)

That solution fails, but it gives you the flavor - I can't modify
the inside of the function at all.

Thanks,
Matt


-----Original Message-----
From: McDonald, Simon, [mailto:smcdonald@csu.edu.au]
Sent: Monday, August 06, 2001 7:22 PM
To: Kurbat, Matt
Subject: RE: [S] grouped function arguments


Like this?

	FakeFunc<-function(Y, x5)
	{
		sum(Y)+x5
	}

Is this what you mean?

Simon

:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:
Simon McDonald
Information Technology Officer (Spatial Analysis)
Charles Sturt University

Spatial Data Analysis Network (SPAN) - Albury/Thurgoona
Division of Information Technology
Charles Sturt University
PO Box 789
ALBURY  NSW
Australia  2640

Phone: +61 (02) 6051 9922
Fax: +61 (02) 6051 9919
Email: smcdonald@csu.edu.au
Website: http://wwwdb.csu.edu.au/division/dit/span/
:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:




> -----Original Message-----
> From: Kurbat, Matt [mailto:Matt.Kurbat@kmv.com]
> Sent: Tuesday, 7 August 2001 12:03
> To: s-news@lists.biostat.wustl.edu
> Subject: [S] grouped function arguments
> 
> 
> 
> Dear Splus Users,
> 
> Say I have a function that takes five numeric arguments.
> 	FakeFunc<-function(x1, x2, x3, x4, x5)
> 	{
> 		x1+x2+x3+x4+x5
> 	}
> 
> Four of the arguments are already in the vector Y:
> 	Y<-c(0.6765, 0.9602, 0.6889, 0.7836)
> 
> To call my function, I'd like to be able to feed it Y and x5, 
> instead of
> x1-x5,
> something like
> 	FakeFunc(Y, x5)
> 
> My question is: is it possible to do this so as not to get an error, 
> and if so, how?
> 
> Thank you and Best Regards,
> 
> Matt Kurbat
> 
> 
> ---------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
> 
---------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news
---
Technical Details
Message-ID: <4495FF893208D411ABEB00508BCA32BB01A3E8C3@ntserver2.kmv.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!news1.optus.net.au!optus!news.usyd.edu.au!news.nsw.CSIRO.AU!cmis.csiro.au!owner-s-news

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fa931,daed7d039bfd621f
X-Google-Attributes: gidfa931,public
X-Google-ArrivalTime: 2001-08-06 19:45:16 PST
Newsgroups: aus.stats.s
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!news1.optus.net.au!optus!news.usyd.edu.au!news.nsw.CSIRO.AU!cmis.csiro.au!owner-s-news
From: Matt.Kurbat@kmv.com ("Kurbat, Matt")
Subject: Re: [S] grouped function arguments
X-Nntp-Posting-Host: snowy.nsw.cmis.csiro.au
Content-Type: text/plain;
 charset="iso-8859-1"
Message-ID: <4495FF893208D411ABEB00508BCA32BB01A3E8C3@ntserver2.kmv.com>
X-Cc: "'s-news@lists.biostat.wustl.edu'" <s-news@lists.biostat.wustl.edu>
Sender: majordomo@mailhost.nsw.cmis.CSIRO.AU
Organization: CSIRO Australia
X-To: "'McDonald, Simon,'" <smcdonald@csu.edu.au>
Mime-Version: 1.0
Date: Tue, 7 Aug 2001 02:39:34 GMT
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Length: 2542
X-Precedence: bulk
X-Received: by ntserver2.kmv.com with Internet Mail Service (5.5.2653.19)
 id <NKFF3K4J>; Mon, 6 Aug 2001 19:33:21 -0700
Lines: 107