Saving the output of diffr::diffr

Hi,

Is it possible to programmatically save the output of a diffr::diffr call to a user-specified html file?

Right the only way I know how to do that is manually using the Export button in the Rstudio interface...

Thanks in advance for your help

Hi @pomchip

Sample code

library(diffr)
d <- diffr("./pomchip.r", "./pomchip2.r")
htmlwidgets::saveWidget(d, "result.html")

pomchip.r and pomchip2.r are just some files.

The result.html files contains the result as in the Rstudio interface,

Thanks @vedoa.

Works like a charm

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.