[R] do.call([, ...) question

2004-09-08 Thread Robin Hankin
Hi again everyone I have an arbitrarily dimensional array a and a list jj of length length(dim(a)).The elements of jj are vectors of indexes. How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3]], ...] ? Toy example follows: a - matrix(1:30,5,6) jj - list(5:1,6:1) I want the following

Re: [R] do.call([, ...) question

2004-09-08 Thread Dimitris Rizopoulos
: Wednesday, September 08, 2004 4:08 PM Subject: [R] do.call([, ...) question Hi again everyone I have an arbitrarily dimensional array a and a list jj of length length(dim(a)).The elements of jj are vectors of indexes. How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3

Re: [R] do.call([, ...) question

2004-09-08 Thread Peter Dalgaard
Robin Hankin [EMAIL PROTECTED] writes: Hi again everyone I have an arbitrarily dimensional array a and a list jj of length length(dim(a)).The elements of jj are vectors of indexes. How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3]], ...] ? Toy example follows: a -

RE: [R] do.call([, ...) question

2004-09-08 Thread Kevin Bartz
This worked very well for me: do.call([, c(list(a), jj)) What about you? Kevin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin Sent: Wednesday, September 08, 2004 7:08 AM To: [EMAIL PROTECTED] Subject: [R] do.call([, ...) question Hi