Re: [R] Novice programing question

2007-10-24 Thread Ista Zahn
1 7 3826 7304 > Mobile: +61 4 8819 4402 > Home Phone: +61 7 3286 7700 > mailto:[EMAIL PROTECTED] > http://www.cmis.csiro.au/bill.venables/ > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > pro

Re: [R] Novice programing question

2007-10-24 Thread Bill.Venables
ED] On Behalf Of Ista Zahn Sent: Thursday, 25 October 2007 11:35 AM To: r-help@r-project.org Subject: [R] Novice programing question Hi all, I apologize for the ignorance implicit in this question, but I'm having a hard time figuring out how R functions work. For example, if I wanted to write

Re: [R] Novice programing question

2007-10-24 Thread jim holtman
'y' has a default value of NULL, so its value is NULL. Check ?cov to see what happens when it is NULL. On 10/24/07, Ista Zahn <[EMAIL PROTECTED]> wrote: > Hi all, > I apologize for the ignorance implicit in this question, but I'm > having a hard time figuring out how R functions work. For example

[R] Novice programing question

2007-10-24 Thread Ista Zahn
Hi all, I apologize for the ignorance implicit in this question, but I'm having a hard time figuring out how R functions work. For example, if I wanted to write a function to compute a variance, I would do something like >my.var <- function(x) (sum(((x-mean(x)))^2))/(length(((x-mean(x))) ^