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

rowSplit

Split a data.frame or matrix into rows


Description

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.

Usage

rowSplit(x, ...)

Arguments

x

data.frame or matrix

...

other options will be passed onto split

Examples

dat <- head(InsectSprays)
dat <- unname(rowSplit(dat))

template <- 
"{{#dat}}
count: {{count}}, spray: {{spray}}\n
{{/dat}}"

whisker.render(template)

whisker

{{mustache}} for R, Logicless Templating

v0.4
GPL-3
Authors
Edwin de Jonge
Initial release

We don't support your browser anymore

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