Learn R Programming

PRISMAstatement (version 1.1.1)

prisma_pdf: Make PDF of the plot

Description

This makes a PDF file which can be included by knitr Sweave.

Usage

prisma_pdf(x, filename = "prisma.pdf")

prisma_export(x, filename = "prisma.png", rsvg_fun = rsvg::rsvg_png, ...)

Arguments

x

output of call to prisma

filename

path of output file

rsvg_fun

Function from `rsvg` default being `rsvg::rsvg_png`

...

Passed to `rsvg_fun`

Functions

  • prisma_export: Export using any conversion function offered by `rsvg`

Examples

Run this code
# NOT RUN {
g <- prisma(9, 8, 7, 6, 5, 4, 3, 2, 1)
prisma_pdf(g, "test.pdf")
knitr::include_graphics("test.pdf")
# }
# NOT RUN {
g_dot <- prisma_graph(9, 8, 7, 6, 1, 5, 1, 4, 1)
prisma_export(g_dot, "test.png", rsvg_fun = rsvg::rsvg_png)
# }

Run the code above in your browser using DataLab