You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for a great package. R really needs a good templating engine.
If the names of hash$people are unknown, there appears to be now way of accessing the data in it's children.
library(whisker)
hash <- list(
people = list(
a = list(
first = "john",
last = "johnsson"
),
b = list(
first = "peter",
last = "petersson"
),
c = list(
first = "steve",
last = "stevesson"
)
),
stuff = c(1:5)
)
template <- "
{{#people}}
<h1>Hello {{first}}</h1>
{{/people}}
"
result <- whisker::whisker.render(template = template, data = hash)
print(HTML(result))
Thanks for a great package. R really needs a good templating engine.
If the names of
hash$people
are unknown, there appears to be now way of accessing the data in it's children.Link to stackoverflow.
The text was updated successfully, but these errors were encountered: