Re: [R] list with list function

2019-02-05 Thread Andras Farkas via R-help
Thanks Rui and Ivan, works perfectly... Andras On Monday, February 4, 2019, 4:18:39 PM EST, Rui Barradas wrote: Hello, Like this? Map('[', listA, lapply(listB, '*', -1)) Hope this helps, Rui Barradas Às 21:01 de 04/02/2019, Andras Farkas via R-help escreveu: > Hello everyone, > >

Re: [R] list with list function

2019-02-04 Thread Rui Barradas
Hello, Like this? Map('[', listA, lapply(listB, '*', -1)) Hope this helps, Rui Barradas Às 21:01 de 04/02/2019, Andras Farkas via R-help escreveu: Hello everyone, wonder if you would have a thought on a function for the following: we have a<-sample(seq(as.Date('1999/01/01'), as.Date('2

Re: [R] list with list function

2019-02-04 Thread Ivan Krylov
On Mon, 4 Feb 2019 21:01:06 + (UTC) Andras Farkas via R-help wrote: > listA<-list(a,b,c) > listB<-list(d,e,f) > > what I would like to do with a function <...> as opposed to manually > is to derive the following answer > > listfinal<-list(a[-d],b[-e],c[-f]) The `Map` function, unlike `lapp

[R] list with list function

2019-02-04 Thread Andras Farkas via R-help
Hello everyone, wonder if you would have a thought on a function for the following: we have a<-sample(seq(as.Date('1999/01/01'), as.Date('2000/01/01'), by="day"),5) b<-sample(seq(as.Date('1999/01/01'), as.Date('2000/01/01'), by="day"), 4) c<-sample(seq(as.Date('1999/01/01'), as.Date('2000/01/01