Re: [R] Sequential date by group

2019-09-02 Thread Jeff Newmiller
Your sample data has startdate and enddate columns as though these values might vary throughout the data set, but your description suggests that those values are fixed for the whole dataset. If those values are really constant, then x$Year <- 1995L + 12 * ( ( x$month - 1L ) %/% 12L ) x$Month <

Re: [R] Sequential date by group

2019-09-02 Thread Eric Berger
dtV <- seq(from=as.Date("1975-01-01"),by='1 month',length=372) x$dt <- dtV[x$id] HTH, Eric On Mon, Sep 2, 2019 at 8:36 PM Miluji Sb wrote: > Dear all, > > I have a panel data with a large number of groups and the cumulative number > of months (1 - 372) for January 1995 to December 2005. My goa

[R] Sequential date by group

2019-09-02 Thread Miluji Sb
Dear all, I have a panel data with a large number of groups and the cumulative number of months (1 - 372) for January 1995 to December 2005. My goal is to extract the corresponding month and year for each observation. I tried the following; ### x %>% group_by(id) %>% do( data.frame(., Date=

[R] Course: Introduction to regression models with spatial and temporal correlation using R-INLA

2019-09-02 Thread Highland Statistics Ltd
We would like to announce the following 3 statistics courses. Course: Introduction to regression models with spatial and temporal correlation using R-INLA Location: Canada and The Netherlands Where and when: 1. Introduction to regression models with spatial and temporal correlation using R