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)
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
] 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
-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
4 matches
Mail list logo