Skip to content

Commit 587b9cd

Browse files
committed
Used base markdown syntax for code chunks
1 parent 20692ae commit 587b9cd

File tree

2 files changed

+36
-68
lines changed

2 files changed

+36
-68
lines changed

02-Launching-Docker.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ this is that this image came with no files.
8383
Next, open a new R Script, e.g. by going to file -> New file -> R Script.
8484
Enter the following code in the script, run it and save it.
8585

86-
```{r, eval=FALSE}
86+
~~~
8787
# make x the numbers from 1 to 5, and y the numbers from 6-10
8888
x <- 1:5
8989
y <- 6:10
9090
9191
# plot x against y
9292
plot(x, y)
93-
```
93+
~~~
9494

9595
If you look at your files again now, you will see the script file.
9696

@@ -116,14 +116,14 @@ Again, you will have to enter something like `http://192.168.99.100:8787` in you
116116

117117
This time when you launch RStudio in a Docker container and you try to open a file you should be able to see some files and directories. Now set the working directory to the directory called `r-docker-tutorial` and load the `gapminder-FiveYearData.csv` into R via `read.table`.
118118

119-
```{r knitr_init, echo = FALSE, cache = FALSE}
119+
~~~
120120
# load gapminder data from a csv on your computer
121121
gap5yr <- read.csv(file = 'data/gapminder-FiveYearData.csv')
122-
```
122+
~~~
123123

124124
Now lets plot GDP per capita against life expectancy.
125125

126-
```{r knitr_init, echo = FALSE, cache = FALSE}
126+
~~~
127127
# load ggplot library
128128
library(ggplot2)
129129
@@ -132,7 +132,7 @@ qplot(gap5yr$lifeExp, gap5yr$gdpPercap)
132132
133133
# save the plot
134134
ggsave(filename = 'data/GDP_LifeExp.pdf')
135-
```
135+
~~~
136136

137137
Let's also save the script as `plot_GDP_LifeExp.R` in the `r-docker-tutorial` directory. Now close the RStudio browser and exit your Docker container via the terminal using Control+C. Then look inside the `r-docker-tutorial` and `r-docker-tutorial/data` directories on your laptop to see if you can see the two files you created.
138138

02-Launching-Docker.html

Lines changed: 30 additions & 62 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)