Description Usage Arguments Value Note Examples
The image shows a url. This url can be external. For local urls,
the file must be accessible by the server. The function
get_tempfile
can be used to create a file that is so
accessible. See the example.
1 2 3 |
filename |
A url or file from |
dirname |
ignored. |
size |
A vector passed to |
handler |
optional means (to |
action |
Passed to handler to parameterize a call |
container |
A parent container. In gWidgetsWWW2 a
parent container is not optional (though it can be substituted
with the |
... |
Used to pass along argument to the parent container's
|
width |
width in pixels of component. Sizing in
gWidgetsWWW2 is sometimes necessary as the arguments
|
height |
height in pixels of the component. |
ext.args |
The contructors of gWidgetsWWW2 ultimately
call an Ext constructor. The options passed to the Ext constructor
may be added to or overridden by use of this argument. Values are
passed in as named list components and with values converted into JavaScript
objects by |
an GImage reference object
requires tempdir to be mapped to a specific url, as this is
assumed by get_tempfile
and get_tempfile_url
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | w <- gwindow("hello")
sb <- gstatusbar("Powered by gWidgetsWWW and Rook", cont=w)
g <- ggroup(cont=w, horizontal=FALSE)
f <- get_tempfile(ext=".png")
png(f)
hist(rnorm(100))
dev.off()
i <- gimage(f, container=g, size = c(400, 400))
b <- gbutton("click", cont=g, handler=function(h,...) {
f <- get_tempfile(ext=".png")
png(f)
hist(rnorm(100))
dev.off()
svalue(i) <- f
})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.