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

Re: [R] Why is there error in as.POSIXlt.character when using strftime()?

2019-02-04 Thread peter dalgaard
* localtime format, I believe. > On 2 Feb 2019, at 18:02 , Jeff Newmiller wrote: > > as.POSIXlt = convert to POSIX list time format (same as strptime but name > fits type conversion function naming pattern in R) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School