Hi R-helpers

 

I want a function that performs the opposite of lag() with panel data.

I have transformed my data before with pdata.frame(mydata,
index=c("groupindex", “timeindex"))

And then I’ve done lag(mydata, -1) but it doesn’t work. 

 

The error message was:

Error in rep(1, ak) : invalid 'times' argument

 

Thank you in advance,

 

Cecília Carmo


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to