> Behalf
> Of ivo welch
> Sent: Wednesday, January 09, 2013 1:00 PM
> To: David Winsemius
> Cc: r-help
> Subject: Re: [R] multiple versions of function
>
> mea culpa.
>
> f <- function(...) {
> ## parse out the arguments and then do something with them
>
On Jan 9, 2013, at 9:00 PM, ivo welch wrote:
> mea culpa.
>
> f <- function(...) {
> ## parse out the arguments and then do something with them
> }
>
> ## all of these should result in the same actions
> f(2,3) ## interprets a to be first and b to be second
> f(a=2,b=3)
> f(b=3,a=2)
These
mea culpa.
f <- function(...) {
## parse out the arguments and then do something with them
}
## all of these should result in the same actions
f(2,3) ## interprets a to be first and b to be second
f(a=2,b=3)
f(b=3,a=2)
f(data.frame(a=2,b=3))
f(data.frame(b=3,a=1))
On Tue, Jan 8, 2013 at 8:0
On Jan 9, 2013, at 1:00 PM, ivo welch wrote:
> mea culpa.
>
> f <- function(...) {
> ## parse out the arguments and then do something with them
> }
>
> ## all of these should result in the same actions
> f(2,3) ## interprets a to be first and b to be second
> f(a=2,b=3)
> f(b=3,a=2)
> f(data.
On Jan 7, 2013, at 6:58 PM, ivo welch wrote:
hi david---can you give just a little more of an example? the
function should work with call by order, call by name, and data frame
whose columns are the names. /iaw
It is I who should be expecting you to provide an example.
--
David.
hi david---can you give just a little more of an example? the
function should work with call by order, call by name, and data frame
whose columns are the names. /iaw
Ivo Welch (ivo.we...@gmail.com)
On Mon, Jan 7, 2013 at 4:25 PM, David Winsemius wrote:
>
> On Jan 7, 2013, at 3:57 PM, iv
On Jan 7, 2013, at 3:57 PM, ivo welch wrote:
> dear R experts:
>
> I want to define a function the calculates the black-scholes value.
> it takes 5 named parameters, BS <- function(S,K,dt,rf,sigma) {} .
> let's presume I want to be able to call this not only with my 5
> numeric vectors BS( sigma
dear R experts:
I want to define a function the calculates the black-scholes value.
it takes 5 named parameters, BS <- function(S,K,dt,rf,sigma) {} .
let's presume I want to be able to call this not only with my 5
numeric vectors BS( sigma=0.3, S=100, K=100, dt=1, rf=0.1 ) and BS(
100, 100, 1, 0.1
8 matches
Mail list logo