Compare the codes between 2 or more chunk

Hi, I am working on an rmd file and I have several codes that I need to compare, is there any way to compare the codes and see their differences explicitly?

Thanks,

1 Like

Hi @Lekmonm,

If you didn't care about where the differences were you could consider using the {digest} package to hash the code chunks and compare the hashes.

But since you want to see the differences, the {diffobj} package provides a good way to do this if you capture your code expressions as strings and use diffobj::diffChr(). Hope this is helpful.

1 Like

Thank you, very much.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.