I am trying to use merge on two data sets, one which has a value for PID for approximately 1700 observations. The other data set has variables named PID which have values for 366 days of a year, but to merge them I need to create a variable for those with the name PID so I have something to merge to.

Trick is, how to create a new variable with the string name to match what is in the other dataset?

Or there may be easier ways to do this. Everything I see in merge requires I have a variable with which to merge or joinby.

Thank you.

dp

Array Array