Re: [R] question on function arguments

2008-02-19 Thread baptiste Auguié
Many thanks, this clarifies both points perfectly. baptiste On 19 Feb 2008, at 11:48, Duncan Murdoch wrote: > On 18/02/2008 4:53 AM, baptiste Auguié wrote: >> Hi, >> I have two small issues with my R code, no big deal but curiosity >> really. Here is a sample code, >>> x <- rnorm(1:10) >>>

Re: [R] question on function arguments

2008-02-19 Thread Duncan Murdoch
On 18/02/2008 4:53 AM, baptiste Auguié wrote: > Hi, > > I have two small issues with my R code, no big deal but curiosity > really. Here is a sample code, > > >> x <- rnorm(1:10) >> >> foo <- function(a = 1, b = list(x = c(1:10), y = c(1:10))){ >> >> for (ii in seq(along=b$y)){ >>

Re: [R] question on function arguments

2008-02-18 Thread baptiste Auguié
any input? (and also, why would all my posts get bounced off while I clearly subscribed to this list?) Best regards, On 18 Feb 2008, at 09:53, baptiste Auguié wrote: > Hi, > > I have two small issues with my R code, no big deal but curiosity > really. Here is a sample code, > > >> >> x <- rn

[R] question on function arguments

2008-02-18 Thread baptiste Auguié
Hi, I have two small issues with my R code, no big deal but curiosity really. Here is a sample code, > > x <- rnorm(1:10) > > foo <- function(a = 1, b = list(x = c(1:10), y = c(1:10))){ > > for (ii in seq(along=b$y)){ > > print(x[ii] + b$x[ii]) >