fun <-
function(x=2, y=3){
        c(x, y)
}

fun()

should return (2, 3); "fun(1)" should return (1, 3); "fun(y=9)" should return (2, 9), etc.

hope this helps. spencer graves

Nicholas Croglio wrote:
Greetings,
Is there a way to create default arguments for functions?
If there is, then please explain or forward me to the instructions.
I could not find anything in the archives or in the manual under function or args.

Thanks

______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to