In R, find whether two files differ

前端 未结 5 1091
春和景丽
春和景丽 2021-01-04 07:50

I would like a pure R way to test whether two arbitrary files are different. So, the equivalent to diff -q in Unix, but should work on Windows and without exter

5条回答
  •  情深已故
    2021-01-04 08:46

    the closest to the unix command is diffr - it shows a really nice side by side window with all the different lines marked in color.

    library(diffr)
    diffr(filename1, filename2)
    

    shows

提交回复
热议问题