inlines would be a named list of objects to inline, the names referring to the names referenced in the slimr_inline() call and the values being the objects themselves. Could also be a list of named lists, in which case its length should match that of the template argument. Could also accept a tibble? It would have list columns for object to be inlined, with the column name specifying the object names for inlining. Again, it should be the same length as template (unless template has length one, in which case we broadcast it to the length of inlines). This could be a better option than making sure slimr_template() works inside slimr_inline() (e.g. see #43)
This now seems an overly complicated solution. Simpler seems to allow r_template() to accept more complicated objects by using r_inline() internally. Closing for now.
inlines
would be a named list of objects to inline, the names referring to the names referenced in theslimr_inline()
call and the values being the objects themselves. Could also be a list of named lists, in which case its length should match that of thetemplate
argument. Could also accept atibble
? It would have list columns for object to be inlined, with the column name specifying the object names for inlining. Again, it should be the same length astemplate
(unlesstemplate
has length one, in which case we broadcast it to the length ofinlines
). This could be a better option than making sureslimr_template()
works insideslimr_inline()
(e.g. see #43)