[R] mapply assign to generate functions

2012-03-12 Thread J Toll
Hi, I have a problem that I'm finding a bit tricky. I'm trying to use mapply and assign to generate curried functions. For example, if I have the function divide divide - function(x, y) { x / y } And I want the end result to be functionally equivalent to: half - function(x) divide(x, 2)

Re: [R] mapply assign to generate functions

2012-03-12 Thread Brian Diggs
On 3/12/2012 10:47 AM, J Toll wrote: Hi, I have a problem that I'm finding a bit tricky. I'm trying to use mapply and assign to generate curried functions. For example, if I have the function divide divide- function(x, y) { x / y } And I want the end result to be functionally equivalent

Re: [R] mapply assign to generate functions

2012-03-12 Thread William Dunlap
] 3.33 quarter(10) [1] 2.5 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of J Toll Sent: Monday, March 12, 2012 10:47 AM To: r-help Subject: [R] mapply assign

Re: [R] mapply assign to generate functions

2012-03-12 Thread J Toll
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of J Toll Sent: Monday, March 12, 2012 10:47 AM To: r-help Subject: [R] mapply assign to generate functions Hi, I have a problem that I'm finding a bit tricky.  I'm trying to use mapply