Created
September 24, 2020 03:49
-
-
Save tmwatchanan/2439d3bf2cf1c9d7439377a0e80510be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| libname mydata 'C:\Users\PhotonUser\My Files\Temporary Files'; | |
| proc import datafile="C:\Users\PhotonUser\My Files\Temporary Files\pcp_mean-2010_2014-all_counties.csv" | |
| out=mydata.pcp dbms=CSV; | |
| run; | |
| proc import datafile="C:\Users\PhotonUser\My Files\Temporary Files\farmers.csv" | |
| out=mydata.farmers dbms=CSV; | |
| run; | |
| proc sort data=mydata.pcp; | |
| by state county; | |
| run; | |
| proc sort data=mydata.farmers; | |
| by state county; | |
| run; | |
| data mydata.merged; | |
| merge mydata.farmers(in=a keep=State County farmer_id) mydata.pcp(in=b keep=State County pcp__2010_2014_mean_); | |
| by state county; | |
| if a and b; | |
| run; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment