R Knit word | Rendering error

hhug

How to knit a document
I am getting this error

You should not include install commands in a Rmd file. Packages only need to be installed once but they need to be loaded with the library()function on each new R session they are going to be used on, so, you need to use library() instead of install.packages()