Hi there,
I have two data sets. One is a large data set containing a week variable 'wk'. The other has just one variable , 'wk2', which contains values of 'wk' corresponding to rows in the large data set that I'd like to keep, and remove the rest.
How can I do this? (without manually listing the weeks)
My idea is to merge the two sets, then use a where statement to only keep data where 'wk' is an element of 'wk2' but I cannot find any syntax for something like this.
I'd really appreciate any help. Thanks!
I have two data sets. One is a large data set containing a week variable 'wk'. The other has just one variable , 'wk2', which contains values of 'wk' corresponding to rows in the large data set that I'd like to keep, and remove the rest.
How can I do this? (without manually listing the weeks)
My idea is to merge the two sets, then use a where statement to only keep data where 'wk' is an element of 'wk2' but I cannot find any syntax for something like this.
I'd really appreciate any help. Thanks!