figure.export: Server tools: export data.frame

Description Usage Arguments Details Value Note Author(s) Examples

Description

Export a graphic in JPEG, PNG, PDF or SVG format and create a html link on the output.

Usage

1
2
3
4
figure.export(x, filename=NULL, title=NULL, 
              format=c("png","pdf","jpg","svg")
              plot.width=1120,
              plot.height=630) 

Arguments

x

- NULL for a standard plot, ggplot2 otherwise

filename

- a string, the file name without extension

Title

- a string, the text of the link

format

- a vector string, the file format c("png","pdf","jpg","csv")

plot.width

- an integer, width of plot, only used by standard plots not ggplot

plot.height

- an integer, height of plot, only used by standard plots not ggplot

Details

Files are exported in the subdirectory "exports". If this directory does not exists, it will be created. You can export in multiple formats at the same time.

Value

Return nothing.

Note

The chunk where the function is called in, must have option "echo = asis"

Author(s)

jp.decorps@epiconcept.fr

Examples

1
2
3
data(iris)
plot(iris$Sepal.Length, iris$Sepal.Width)
figure.export(NULL, filename = "iris",title = "Fig_1", c("jpg", "pdf"))

Epiconcept-Paris/RServerUtils documentation built on May 6, 2019, 3:49 p.m.