Printing R Report marcia hon  2018-02-23 06:54
Status: Closed
 
I solved it by doing:

```{r setup, echo=FALSE, cache=TRUE, results='hide', warning=FALSE, comment=FALSE, warning=FALSE, message=FALSE, encoding = 'UTF-8',comments = ""}
knitr::opts_chunk$set(echo=FALSE, cache=TRUE, comment=FALSE, comments = "", warning=FALSE, eval = TRUE, encoding = "native.enc")
#knitr::opts_chunk$get();
knitr::pandoc('script.Rmd', format='latex')
#system("pandoc -s script.docx -o script.pdf")
```

```{r, echo=FALSE, cache=TRUE, results='hide', warning=FALSE, comment=FALSE, warning=FALSE, message=FALSE, encoding = 'UTF-8',comments = ""}
currentdir <- getwd()
assign("pdf_filename", paste(currentdir, "/script.pdf", sep=""))

file.copy(from = pdf_filename,
               to = "/newdirectory/script.pdf")
system("rm script.* *.tsv")
```

However, my pdf report looks like the attached.

It is supposed to have a logo, and the html/code should be something legible.