Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to skip over files if there is no difference? #3

Open
DRosenman opened this issue Sep 19, 2017 · 2 comments
Open

Is there any way to skip over files if there is no difference? #3

DRosenman opened this issue Sep 19, 2017 · 2 comments

Comments

@DRosenman
Copy link

DRosenman commented Sep 19, 2017

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)
}
@muschellij2
Copy link
Owner

muschellij2 commented Sep 19, 2017 via email

@DRosenman
Copy link
Author

Thanks for the suggestion. I'll give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants