#' The firepng function
#'
#' Print a R Graphics object to a file.
#'
#' @param path file path in quotes.
#' @param y the R graphics object, which needs to be saved as a .svg file.
#' @param w width in inches, defaults to 6
#' @param h height in inches, defaults to 4
#' @keywords firepng
#' @export
firepng <- function(path,y,w=6,h=4){
png(filename=path,
units="in",
width=w,
height=h,
pointsize=10,
res=300)
print(y)
dev.off()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.