I need to create some year columns that goes from 1999-2003 then skips a year till 2007.
My data set should look like this
y1999 y2000 y 2001 y2002 y2003 y2005 y2007
Is this possible?
I'm not sure if this is the correct path to take but I have a table that has a variable that has all the years for a product. Some products have some of the years and some have all. I'm trying to find the best way to display that data in a matrix.
creating the columns needs no loop, just a simple statement like:[pre] length y1999 -y2003 y2005 y2007 ;[/pre]defines the columns but does not dynamically construct or fill the columns based on the data. For that, use Scott's method - proc transpose