Description Usage Arguments Value Note Examples
IM
- Wrap a path/url to generate an HTML tag. Often markup code:

lacks flexibility with centering and sizing. IM
enables conrol of centering via altering the sty/center commands and control
of sizing via the numeric values supplied to height and width.
IM2
- A wrapper for IM
that sets the base path to "assets/img/".
This allows the users to just specify the image name that resides in one of
the following directories: 1-"~/assets/img
" or 2-"~/figure
".
IW
- Text wrapped images.
IMF
- A wrapper for IM
that attempts to find the image in expected
image directories. Uses the first available image matching the image name. No
path/url is specified. IMS stands for 'image locate'.
IM_MO
- Creates an HTML image tag with mouseover grow/shrink
properties. Only takes integer width/height values converted to px.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | IM(path = "clipboard", link = NULL, width = 540, height = IE(width,
round(width/1.5)), sty = IE(width, width * 1.05, 480), center = TRUE,
new_win = TRUE, copy2clip = interactive(), print = FALSE)
IM2(image = "clipboard", loc = 1, ...)
IW(path = "clipboard", link = NULL, side = "right", width = 540,
height = IE(width, round(width/1.5)), new_win = TRUE, top = -15,
right = 20, left = 20, bottom = 0, copy2clip = interactive(),
print = FALSE)
IMF(image = "clipboard", ...)
IM_MO(path = "clipboard", link = NULL, width = 32, height = 32,
width2 = width * 10, height2 = height * 10, sty = width * 1.05,
center = FALSE, new_win = TRUE, copy2clip = interactive(),
print = FALSE)
|
path |
A character vector url/path to the image. Default is to read from the clipboard. Note that Windows users do not have to reorient slashes in local paths if reading from the clipboard. |
link |
character vector url/path to hyperlink the image to. |
width |
The width of the image. If |
height |
The height of the image. If |
sty |
The width of the style (used for centering). |
center |
logical. If |
new_win |
logical. If |
copy2clip |
logical. If |
print |
logical. If |
image |
A character vector name of the image. Default is to read from the clipboard. |
loc |
The location of the image: 1-/assets/img and 2-/figure. |
side |
The side the image should appear on c( |
top |
Space between top margin and top of text. |
right |
Space on the right margin. |
left |
Space on the left margin.. |
bottom |
Space between bottom margin and bottom of text (0 is defualt). |
width2 |
The width to grow to during mouseover. |
height2 |
The height to grow to during mouseover. |
... |
Other arguments passed to |
Returns a character vector of an HTML image tag that embeds an image.
IM_MO
Requires a link to the ‘js/reports.js’ in the
document as well as the document itself. Usually this is done automatically
upon the use of new_report
/presentation
. IM_MO
only
takes integer width/height values which are converted to px.
1 2 3 4 5 6 | IM("http://cran.r-project.org/Rlogo.jpg", width= NULL, print=TRUE)
IM("https://dl.dropboxusercontent.com/u/61803503/packages/reports.PNG", print =TRUE)
IM("http://cran.r-project.org/Rlogo.jpg", NULL, print=TRUE, link = "http://cran.r-project.org")
cat(IW("http://www.talkstats.com/images/misc/logo.png", "http://www.talkstats.com/",
width=140, height=75), rep("So much text! ", 100))
IM_MO("http://i.imgur.com/VClk4DS.png", print =TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.