I created a for loop to new text files with old text files. And my for loop saves each diffr output as an html file. There are over 500 corresponding files that I am checking for differences between the old and new versions... I am hoping that none of the files contain differences. Is there anything I could add to my for-loop to avoid creating html files for files that have no differences?
for(num in filelist) {
file_a <- paste0('new_files/',num,'.txt')
file_b <- paste0('old_files/',num,'.txt')
diff <- diffr(file1= file_a, file2 = file_b)
fi <- paste0(num,'.html')
saveWidget(diff, file=fi)
}