Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

embedCrunchBox

Get HTML for embedding a CrunchBox


Description

crunchBox() returns a URL to the box data that it generates, but in order to view it in a CrunchBox or to embed it on a website, you'll need to translate that to the Box's public URL and wrap it in some HTML. This function takes a CrunchBox and returns the HTML which you can embed in a website.

Usage

embedCrunchBox(box, title = NULL, logo = NULL, ...)

Arguments

box

character URL of the box data, as returned by crunchBox()

title

character title for the Box, to appear above the iframe. Default is NULL, meaning no title shown

logo

character URL of a logo to show instead of a title. Default is NULL, meaning no logo shown. If both logo and title are provided, only the logo will be shown. Note also that logo must be a URL of a hosted image: it cannot be a path to a local file.

...

Additional arguments, not currently used.

Value

Prints the HTML markup to the screen and also returns it invisibly.

See Also

Examples

## Not run: 
box <- crunchBox(ds)
embedCrunchBox(box, logo = "//myco.example/img/logo_200px.png")

## End(Not run)

crunch

Crunch.io Data Tools

v1.28.0
LGPL (>= 3)
Authors
Greg Freedman Ellis [aut, cre], Jonathan Keane [aut], Mike Malecki [aut], Neal Richardson [aut], Gordon Shotwell [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.