Hi,

Why do you use the equals sign for assignment instead of the arrow, is this
equal?

Mvh.
Marie

On Thu, Feb 5, 2009 at 11:59 PM, Wacek Kusnierczyk <
Waclaw.Marcin.Kusnierczyk@idi.ntnu.no> wrote:

>
> you may want to avoid this sort of indirection by using lists with named
> components:
>
> d = list(a=c(1,3,5,7), b=c(2,4,6,8))
> sum(unlist(d))
> with(d, sum(a+b))
> sum(d[['a']], d[['b']])
> sum(sapply(n, function(v) d[[v]]))
>
> and so on.
>
> vQ
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]


