| as.htmlimg | R Documentation |
Place a filename or filepath in the format used by HTML, by
surrounding it with
"<img src" and "/>" and with possible additional arguments between.
as.htmlimg(object, height = "80", width = NULL, wd = getwd(), align = "middle")
object |
Vector of character strings containing filenames. |
height, width |
Number of pixels as a character string. |
wd |
The directory in which the files reside. The default is the current working directory that R is using. |
align |
Specifies the alignment of an image according to surrounding elements
(Not supported in HTML5).
One of the strings: |
A character vector containing the input strings surrounded by
"<img src" and "/>" and with possible additional arguments between.
Nooreen Dabbish <nerd@temple.edu> and Richard M. Heiberger <rmh@temple.edu>
microplot
as.htmlimg("abcd.png")
as.htmlimg("abcd.png", wd=".")
as.htmlimg(c("abcd.png", "efgh.png"))
cat( as.htmlimg("abcd.png") , "\n")
cat( as.htmlimg("abcd.png", wd=".") , "\n")
cat( paste(as.htmlimg(c("abcd.png", "efgh.png")), "\n"))
## For an example in context, please see the package example:
## system.file(package="microplot", "examples/irisRMarkdownHtml.Rmd")
## Copy file irisRMarkdownHtml.Rmd to a directory in which you have write privileges.
## Run the statement
## rmarkdown::render("irisRMarkdownHtml.Rmd", output_file="irisRMarkdownHtml.html")
## at the R Console.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.