Function

コメント・参照等
  • 画像ファイルを出力する関数

FUN = f_output_imagefile.r
function (g, output_path, width = 900, height = 600, filename = format(Sys.time(), "%Y%m%d%H%M%S"), extension = "png") 
{
    setwd(dir = output_path)
    pngFile <- paste0(filename, ".", extension)
    png(file = pngFile, width = width, height = height)
    print(g)
    dev.off()
}