You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -33,7 +33,7 @@ The `Console` contains the command prompt (`>`) which is where R commands are en
33
33
34
34
➤ Test this out by copy pasting or typing the below command into your console then pressing `enter` key. This will print the path of your current working directory:
35
35
36
-
```{r getwd}
36
+
```{r getwd, echo=TRUE, eval=FALSE}
37
37
getwd()
38
38
```
39
39
@@ -53,11 +53,12 @@ Let's put something in there:
53
53
54
54
➤ Create an R variable called `name` and fill it with your name, then print it with the `cat` command:
55
55
56
-
```{r my name}
56
+
```{r my name, echo=TRUE, eval=FALSE}
57
57
name <- 'Cali'
58
58
cat(name)
59
59
```
60
60
61
+
61
62
Note that the object `name` is now listed in the environment.
62
63
63
64
<p> </p> <!-- insert blank line -->
@@ -66,7 +67,7 @@ Now let's see the `plots` pane in action by creating a simple dummy barplot:
66
67
67
68
➤ Copy paste the below code into your console then press enter:
68
69
69
-
```{r plot}
70
+
```{r plot, echo=TRUE, eval=FALSE}
70
71
values <- c(5, 10, 15)
71
72
labels <- c("A", "B", "C")
72
73
barplot(values, names.arg = labels)
@@ -90,7 +91,7 @@ Using notebooks in RStudio is a great way to save your code and comments, as wel
90
91
91
92
➤ Open a new R notebook from the RStudio toolbar by selecting `File`→`New file`→`R Notebook`:
The new notebook opens in the `Editor` pane. It has a placeholder title and basic starting instructions.
@@ -109,7 +110,7 @@ New code chunks can be added with the shortcut `ctrl + alt + i` or via the toolb
109
110
110
111
<p> </p> <!-- insert blank line -->
111
112
112
-
➤ Run the demo code chunk to plot `cars`
113
+
➤ Run the demo code chunk that was included in the new notebook to plot `cars`
113
114
114
115
Note that the plot dispalys *inside* the notebook, rather than within the plot pane as we saw earlier.
115
116
@@ -119,7 +120,7 @@ Note that the plot dispalys *inside* the notebook, rather than within the plot p
119
120
➤ Add a new code chunk by entering `ctrl + alt + i` and label it `barplot`. Then copy the dummy barplot code from earlier into the code chunk and run it
120
121
121
122
122
-
```{r barplot}
123
+
```{r barplot, echo=TRUE, eval=FALSE}
123
124
values <- c(5, 10, 15)
124
125
labels <- c("A", "B", "C")
125
126
barplot(values, names.arg = labels)
@@ -204,4 +205,6 @@ Note that the code chunk label also contains the text `include=FALSE`. This prev
204
205
205
206
Please let us know if you have any errors loading the packages :raised_hand:
206
207
207
-
Don't be alarmed that the output is <spanstyle="color: red;">red</span>! :slightly_smiling_face:
208
+
Don't be alarmed that the output is <spanstyle="color: red;">red</span>! :slightly_smiling_face:
209
+
210
+
Now here is a unicode smiling face: `r cat("\U0001F603")`
0 commit comments