# NOT RUN {
data(twoFiles)
myCompData <- compareRecords(df1, df2,
flds=c("gname", "fname", "age", "occup"),
types=c("lv","lv","bi","bi"),
breaks=c(0,.25,.5))
## same as
myCompData <- compareRecords(df1, df2, types=c("lv","lv","bi","bi"))
## let's transform 'occup' to numeric to illustrate how to obtain numeric comparisons
df1$occup <- as.numeric(df1$occup)
df2$occup <- as.numeric(df2$occup)
## using different break points for 'lv' and 'nu' comparisons
myCompData1 <- compareRecords(df1, df2,
flds=c("gname", "fname", "age", "occup"),
types=c("lv","lv","bi","nu"),
breaks=list(lv=c(0,.25,.5), nu=0:3))
## using different break points for each comparison field
myCompData2 <- compareRecords(df1, df2,
flds=c("gname", "fname", "age", "occup"),
types=c("lv","lv","bi","nu"),
breaks=list(c(0,.25,.5), c(0,.2,.4,.6), NULL, 0:3))
# }
Run the code above in your browser using DataCamp Workspace