I am trying to populate a data frame (x) with variables from two other data frames y and z based on the key variable SSL, if matches are found populate X data frame with land area from y and z.
I used the below code but it seems the match is not successful, it runs but the match is wrong! I am not sure what is wrong.
Rcode:
x$LANDAREA <- ifelse(x$SSL %in% y$SSL,y$LANDAREA,ifelse(x$SSL %in% z$SSL,z$LANDAREA,-999))