Hmm, although this HTML template solution could be handy in some situations, I'm unsure that is straightforwardly solves the problem. It would require a detour through HTML: manually add necessary scripts there, but supress them in R. Then, it would likely make more sense to directly start with a JS framework and add the statistical/computational parts in R.
It would be great to have an option to choose directly in R, which js scripts should be loaded. This could yield a slim, efficient app (in my imagination at least, please correct me, if I'm wrong here.
).