edwindj / whisker

{{mustache}} for R

Home Page:https://mustache.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no example for rowSplit()

nbest937 opened this issue · comments

Do you happen to have a simple example to illustrate how to use rowSplit()? It would be a big help. Dank u vriendelijk!

Thanks for trying out whisker, the following example should work.

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

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

whisker.render(template)

Seems you found a small bug in rowSplit (the unname will be part of rowSplit in the next release).