Does any one how to merge three FIA data (COND, PLOTSNAP, and TREE files) in one single file?
I realized i needed to provide more detail information. From FIA Datamart, we can manually download three csv files name (COND, PLOTSNAP, and TREE). These three large dataset have common variables that can be used to merge all three data into one. I have done this in SAS 9.3, and works great. BUT i am trying to use R to do similar work. Below i have provided SAS code that i used for merging. I would appreciate if you could help me converting SAS code into R.
In code below: T mean TREE, C means COND, and PS means PLOTSNAP csv file.
PROC SQL NOPRINT;
CREATE TABLE ALL AS
SELECT ,
T. CN AS T_CN,
C. CN AS C_CN,
PS. CN AS PS_CN,
FROM PLOTSNAP PS, COND C, TREE T
WHERE T.PLT_CN=C.PLT_CN
AND T.CONDID=C.CONDID
/ AND C.COND_STATUS_CD IN (1,2,3) */
AND PS.CN=C.PLT_CN
AND PS.CYCLE=C.CYCLE
AND PS.COUNTYCD=C.COUNTYCD
AND PS.PLOT=C.PLOT=T.PLOT
AND PS.INVYR=C.INVYR=T.INVYR;
How do I do this in R?