Can you format your Rmd code correctly so that it easier for us to look at it ?
FAQ: How to Format R Markdown Source