Description Usage Arguments See Also Examples
Create href to be used as cognostics in a trelliscope display.
1 2 3 |
x |
URL to link to |
label |
label of the href |
desc, group, defLabel, defActive, filterable, sortable, log |
arguments passed to |
target |
value to be used for the |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | d <- divide(iris, by = "Species")
# cognostics function that links to wikipedia
cogFn <- function(x) {
link <- paste0("https://en.wikipedia.org/wiki/Iris_", getSplitVar(x, "Species"))
list(wiki = cogHref(link, desc = "Look up species on wikipedia", defLabel = TRUE))
}
# test the cognostics function on a subset
applyCogFn(cogFn, d[[1]])
# make a display with this cognostics function
vdbConn(tempfile(), autoYes = TRUE)
makeDisplay(d, name = "iris_sl_sw",
cogFn = cogFn, panelFn = function(x)
lattice::xyplot(Sepal.Length ~ Sepal.Width, data = x))
## Not run:
# clicking the link under each panel will open wikipedia
view(name = "iris_sl_sw")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.