Skip to contents

pheatmap::pheatmap accepts a parameter called filename which saves the pheatmap to disk. However, then the heatmap is not shown on screen. This function is a workaround to show the heatmap on screen and save it to disk.

Usage

save_pheatmap(x, filename, dev = png, width = 2000, height = 2000, res = 150)

Arguments

filename

the output file path. The page number is substituted if a C integer format is included in the character string, as in the default. (Depending on the platform, the result should be less than PATH_MAX characters long, and may be truncated if not. See postscript for further details.) Tilde expansion is performed where supported by the platform. An input with a marked encoding is converted to the native encoding on an error is given.

dev

name of the device to save the pheatmap. e.g. "png" or "pdf"

width

the width of the device.

height

the height of the device.

res

The nominal resolution in ppi which will be recorded in the bitmap file, if a positive integer. Also used for units other than the default, and to convert points to pixels.