Example template for an R package with R markdown paper which compiles to elsarticle latex article cleanly, using vanilla TexLive installation and Pandoc.  Adapted and fixed from cboettig's lab notebook.