Skip to content
Prev 154956 / 398513 Next

how to match or merge data.frames in this case...

Perfect, with a minor extension to get the desired result:

mergeddata <- merge(dataframe.1, dataframe.2,by=c("id1","id2"),all.x=T)
mergeddata$boundary.x[mergeddata$boundary.y==0] <- 0

Thank you Vikas
Message-ID: <!&!AAAAAAAAAAAYAAAAAAAAAAiqk/5CNPFFq17hx4jN18vCgAAAEAAAAEuJTILImc1DsA/4eFwjpUYBAAAAAA==@netcabo.pt>
In-Reply-To: <48BF78EF0200009E0000BFD8@mail.jnu.ac.in>