🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.stats.s
Article #270

[S] grouped function arguments

#270
From: "Kurbat, Matt"
Date: Tue, 07 Aug 2001 02:13
30 lines
1817 bytes
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
---
Technical Details
Message-ID: <4495FF893208D411ABEB00508BCA32BB01A3E8C2@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,start
X-Google-Attributes: gidfa931,public
X-Google-ArrivalTime: 2001-08-06 19:24:08 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: [S] grouped function arguments
X-Nntp-Posting-Host: snowy.nsw.cmis.csiro.au
Content-Type: text/plain;
 charset="iso-8859-1"
Message-ID: <4495FF893208D411ABEB00508BCA32BB01A3E8C2@ntserver2.kmv.com>
Sender: majordomo@mailhost.nsw.cmis.CSIRO.AU
Organization: CSIRO Australia
X-To: s-news@lists.biostat.wustl.edu
Mime-Version: 1.0
Date: Tue, 7 Aug 2001 02:13:46 GMT
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Length: 728
X-Precedence: bulk
X-Received: by ntserver2.kmv.com with Internet Mail Service (5.5.2653.19)
 id <NKFF3KTL>; Mon, 6 Aug 2001 19:03:22 -0700
Lines: 30