rowSplit | R Documentation |
Utility function for splitting a data.frame into rows. In a whisker template it can be useful to iterate over the rows of a data.frame or matrix. For example rendering a table in HTML.
rowSplit(x, ...)
x |
|
... |
other options will be passed onto |
dat <- head(InsectSprays) dat <- unname(rowSplit(dat)) template <- "{{#dat}} count: {{count}}, spray: {{spray}}\n {{/dat}}" whisker.render(template)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.