Reactive functions for 2 filters

Since this has come up more than once in this conversation…

To learn how to format R Markdown source for posting here, please read FAQ: How to Format R Markdown Source

It’s a really good idea to follow the method described in the FAQ, since it maximizes copy-paste-ability. Messing with indentation (as in the original topic post) will often make the R Markdown un-runnable, since the YAML header is extremely sensitive to indentation.