Okay I have written this little code to demonstrate:
---
title: "Untitled"
author: "Author"
date: "3 August 2018"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r include=FALSE}
library(ggplot2)
library(rmarkdown)
```
Migration
``` {r include=FALSE}
xforgraph <- c("1995-01-01","1996-01-01","1997-01-01","1998-01-01","1999-01-01","2000-01-01",
"2001-01-01","2002-01-01","2003-01-01","2004-01-01","2005-01-01","2006-01-01",
"2007-01-01","2008-01-01","2009-01-01","2010-01-01","2011-01-01","2012-01-01",
"2013-01-01","2014-01-01","2015-01-01","2016-01-01","2017-01-01","2018-01-01","2019-01-01","2020-01-01")
yforgraph <- c(10,13,17,21,28,26,35,36,42,40,43,59,61,65,64,68,75,78,79,80,83,
86,88,99,100,101)
xy <- data.frame(xforgraph, yforgraph)
xy$xforgraph <- as.Date(xy$xforgraph, "%Y-%m-%d")
```
``` {r message=FALSE, echo=FALSE, warning=FALSE}
#GGplot of trend ;
ggplot(xy, aes(xforgraph, yforgraph)) + geom_line(size=1.2, colour="dodgerblue3") + xlab("X Label") + ylab("Y Label") +
ggtitle("Sample Data") +
theme(plot.title=element_text(hjust=0.5))
```