Use knit2html("PA1_template.Rmd") instead of R-Studio button.