export: export

Description Usage Arguments Examples

View source: R/export.R

Description

export figures in the required file format (png,tif,pdf)

Usage

1
export(func, file, res2 = 300, ratio = 1.5, type = "pdf")

Arguments

func

function that generates a plot

file

output figure file name

res2

resolution

ratio

ratio between with and height

type

pdf, png or tif

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
EXAMPLE 1
x <- 1:10
y <- 1:10
export(func=plot(x,y),'test1',type='pdf')
export(func=plot(x,y),'test1',type='tif')
export(func=plot(x,y),'test1',type='png')

EXAMPLE 2
plot_function <- function {
par(mfrow=c(1,2))
plot(x,y) 
boxplot(x)
}
export(func=plot_function(),'test2',type='pdf')
export(func=plot_function(),'test2',type='tif')
export(func=plot_function(),'test2',type='png') 

jedgroev/makekml documentation built on Nov. 4, 2019, 2:36 p.m.