Re: [R] Iterating Named List

2008-08-06 Thread Kenn Konstabel
There is one useful trick with `backticks` you probably didn't try yet: ?`$` And right after that, try: ?`[[` It is important to read both of these documents :) Kenn On Tue, Aug 5, 2008 at 5:16 PM, Gundala Viswanath <[EMAIL PROTECTED]>wrote: > Hi all, > > I have the following named list:

Re: [R] Iterating Named List

2008-08-05 Thread jim holtman
'lapply' is your friend: lapply(y, function(.element) {...process each element of the list}) > y <- list(a=1:10, b=letters, c=LETTERS) > invisible(lapply(y, function(.ele) {print(.ele); cat("--\n")})) [1] 1 2 3 4 5 6 7 8 9 10 -- [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "

[R] Iterating Named List

2008-08-05 Thread Gundala Viswanath
Hi all, I have the following named list: > print(y) $`200052_s_at` [1] -1066.975 -1063.893 -1062.815 -1062.121 -1059.004 $`200071_at` [1] -959.823 -953.980 -953.886 -948.781 -974.890 $`200084_at` [1] -1135.804 -1132.863 -1128.197 -1128.633 -1125.890 What I want to do is to iterate this name l