Skip to content

Commit 9d6ec6f

Browse files
committed
Fix some stylistic spacing issues in ep 1
1 parent 5ca8fe5 commit 9d6ec6f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

episodes/01-r-basics.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ can be added, multiplied, divided, etc. R provides several mathematical
360360
These can be used with literal numbers:
361361

362362
```{r, purl=FALSE}
363-
(1 + (5 ** 0.5))/2
363+
(1 + (5 ** 0.5)) / 2
364364
```
365365

366366
and importantly, can be used on any object that evaluates to (i.e. interpreted
@@ -390,7 +390,7 @@ functions. Hint: remember the `round()` function can take 2 arguments.
390390
## Solution
391391

392392
```{r, purl=FALSE}
393-
round((1 + sqrt(5))/2, digits = 3)
393+
round((1 + sqrt(5)) / 2, digits = 3)
394394
```
395395

396396
Notice that you can place one function inside of another.
@@ -485,7 +485,7 @@ Also, several of these subsetting expressions can be combined:
485485
```{r, purl=FALSE}
486486
# get the 1st through the 3rd value, and 4th value in the snp vector
487487
# yes, this is a little silly in a vector of only 4 values.
488-
snps[c(1:3,4)]
488+
snps[c(1:3, 4)]
489489
```
490490

491491
## Adding to, removing, or replacing values in existing vectors
@@ -522,7 +522,7 @@ snp_genes
522522
We can also explicitly rename or add a value to our index using double bracket notation:
523523

524524
```{r, purl=FALSE}
525-
snp_genes[6]<- "APOA5"
525+
snp_genes[6] <- "APOA5"
526526
snp_genes
527527
```
528528

0 commit comments

Comments
 (0)