Hi,

I'm trying to use a R package for the first time.

Does anyone know how to save/ export a plot (e.g. heatmap) in DiffBind?

Example:
in there example (https://bioconductor.org/packages/release/bioc/vignettes/DiffBind/inst/doc/DiffBind.pdf)
Heatmap was generated by

    plot(tamoxifen)

or

    dba.plotHeatmap(tamoxifen)

What should I add in order to save the plot directly from the command? Thanks!!
The comment above is the correct answer to the question. Before plotting, call one of the functions that redirects the plot to a file, such as `jpeg()`, `pdf()`, or `png()`. After plotting, call `dev.off()` to close the file. You can do multiple plots before calling `dev.off()` and they will all end up in the same file.