nplot | R Documentation |
Plots data stored in a data.frame, james object, matrix, mts, ts, cbs.nl-type 'share data' URL, an xlsx-file or in a list that combines these data structures. The result is saved as PNG, PDF, SVG, and/or JPEG.
nplot(x, ...)
x |
data.frame, james object, matrix, mts, ts, 'path/to/file.xlsx', URL |
... |
you can add parameters to customize your figure (see manual). For example 'title' to specify a title, 'pdf = TRUE' if you want a PDF ('png = TRUE' by default), and 'file' to specify file name (with path/to/your-file.{png, pdf, jpg, svg} as a result). |
Class 'james' can help you to recycle parameters and data across multiple figures. A 'james' object also enables you also to add parameters in an incremental fashion, rather than putting them all in one big nplot-statement. The name 'nplot' is a contraction of 'n(icer)plot', which can exist next to R's regular plot-function.
path/to/result/file.png
james
to create a james object
## Not run:
x <- 0:6
d <- data.frame(x, first = (6 - x)^2, second = x^2)
nplot(d, title = 'Hello World', x_title = 'x', y_title = 'y', footnote = "just an example")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.