Skip to contents

manage_device() open a device accordingly to the extension of file_name. If path is NULL no graphical device is open. If no extension is found, a pdf file is opened.

When a device is opened, its base format is 10 width, 7 height.

Usage

manage_device(path = NULL, file_name, width = 1, height = 1)

Arguments

path

character, path for saving the result. Default to NULL, no device is opened.

file_name

character, name of the elementary component processed. Default to NULL, no title

width

numeric, muliplier for base width

height

numeric, muliplier for base height

Value

the file name used for opening the device is any, NULL otherwise.

Details

path = tempdir() file_name = "test"

pdf device is opened

manage_device(path, "test") dev.off()

png device is opened

manage_device(path, "test.png") dev.off()