This is a template for your weekly work. You can write text, include images, write equations, and include R code. The text below is provided just for demonstration, you can save it elsewhere and replace by your work.
💡 Tip
- You can rename the files in the project to something like
TimeSeriesWeek1.RandTimeSeriesWeek1.Rmdand keep them in theTimeSeriesWorkproject folder. Or- You can also rename the folder to
TimeSeriesWeek1and the project file toTimeSeriesWeek1.Rprojand keep one folder for each week⚠️ Warning Do not use spaces in file names or folder names. They migh not cause problems today, but will some time in the future.
There needs to be an empty line before a line starting with
# or ## otherwise section headings will not
display properly.
You can write R code inline as follows {r}x <- 1:10.
This is called inline code. You can also write code in a
separate block as follows:
## [1] 1951 1
## [1] 2022 10
## [1] 12
This is called a code chunk.
If you want to hide the code, just add echo=FALSE in the
chunk options.
## [1] 1951 1
## [1] 2022 10
## [1] 12
Text is written using the markdown syntax. Just Google this around. It is basically plain text but with some extras to make it look nice.
#.##.**like this**.*like this*.```{r}
code here
```
📘 Callout blocks
You can typeset callout blocks by writing text after the
>character.You can also add emojis to make it look nice.
⚠️ Important
Your RMarkdown file should not include R instructions such as:
install.packages("..."), orhelp(...)or?...,data()ordata(package="..."),View(...),- Or any other instruction that displays data in a separate window or requires user input.
as they are not suitable for an HTML document.
Run them in the console as part of your development. But not in the RMarkdown document.
You can include images with 
You can write an URL by surrounding it by < and
>, this will render like this: https://www.qmul.ac.uk
You can also hyperlink text to a URL using [text](url).
For example:
[Click here to go to the QMUL website](https://www.qmul.ac.uk)
results in
You can also display plots. For example, the code below will display a plot of the ENSO data.
In the course we will not use this much, but in case you want, you can also write equations using LaTeX. For example, the equation of a straight line is \(y = mx + b\). \[ z=\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}x^2} \] etc.