# examples inspired by ?merge.data.frame
(authors = data.frame(
surname = c('Tukey', 'Venables', 'Tierney', 'Ripley', 'McNeil'),
nationality = c('US', 'Australia', 'US', 'UK', 'Australia'),
deceased = c('yes', rep('no', 4))))
(books = data.frame(
name = c('Tukey', 'Venables', 'Tierney', 'Ripley',
'Ripley', 'McNeil', 'R Core', 'Diggle'),
title = c(
'Exploratory Data Analysis',
'Modern Applied Statistics',
'LISP-STAT', 'Spatial Statistics', 'Stochastic Simulation',
'Interactive Data Analysis', 'An Introduction to R',
'Analysis of Longitudinal Data'),
other.author = c(
NA, 'Ripley', NA, NA, NA, NA, 'Venables & Smith',
'Heagerty & Liang & Scott Zeger')))
(m = mergeDF(books, authors, by.x = 'name', by.table = 'surname'))
attr(m, 'nomatch')
Run the code above in your browser using DataLab