Re: [R] Working with additional input for user defined function

2011-02-01 Thread Eik Vettorazzi
sage- > From: Eik Vettorazzi [mailto:e.vettora...@uke.uni-hamburg.de] > Sent: 01 February 2011 19:08 > To: Bogaso Christofer > Cc: r-help@r-project.org > Subject: Re: [R] Working with additional input for user defined function > > Hi Christofer, > just

Re: [R] Working with additional input for user defined function

2011-02-01 Thread Bogaso Christofer
ry 2011 19:08 To: Bogaso Christofer Cc: r-help@r-project.org Subject: Re: [R] Working with additional input for user defined function Hi Christofer, just have a look at how other functions deal with this, e.g. > plot function (x, y, ...) { #*snip* hasylab <- function(...) !all(is.n

Re: [R] Working with additional input for user defined function

2011-02-01 Thread Eik Vettorazzi
Hi Christofer, just have a look at how other functions deal with this, e.g. > plot function (x, y, ...) { #*snip* hasylab <- function(...) !all(is.na(pmatch(names(list(...)), "ylab"))) #*snip* got it? cheers Am 01.02.2011 11:29, schrieb Bogaso Christofer: > Hi all, suppose I

[R] Working with additional input for user defined function

2011-02-01 Thread Bogaso Christofer
Hi all, suppose I have following user defined function: fn1 = function(x, y, ...) { z <- x+y; u=y^2 # if something with name "add" exists in the function argument then do some calculation and return that calculated value, NOT z