Hello, I would like to create lagged and delta variables from a set of variables and then add them to a dataframe
Suppose that GDPPcSa is a variable. I would like to be able to do this QuarterlyData$D1GdpPcSa = diff(GDPPcSa , 1) in an automated fashion so that I loop over Quartely data to compute the first difference of its variables and add them to the dataframe. .It would be great to get a way to create the string "D1GdpPcSa" knowing that the name of the var is GdpPcSa. Then I can add the varibale D1GdpPcSa to the dataframe and work on its names attribute. Thanks Paolo [[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.