Is there a way in R to compare objects and return something useful like where the differences are? I need to compare files, but am willing to read them in to data.frames. This might just be handled better from the command line, but I would like to encapsulate my testing into one R script. My next attempt will be to use ddply to send each line to a compare() function and return the line numbers of the “FALSE” lines, but that only works until you have one insertion or deletion, then everything else becomes “FALSE”.
Thanks.
EDIT: the files contain a combination of numeric and character data.
system(paste("fc", <file1>, <file2>, "> difference.txt"))seems to work. My Google-fu was off today.