Skip to content

Commit a3a27da

Browse files
Merge pull request #274 from naupaka/main
Some minor clean up (style/spacing, remove unneeded chunk, etc)
2 parents e09d9e7 + 0899b57 commit a3a27da

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

episodes/01-r-basics.Rmd

+5-8
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ source: Rmd
2323

2424
::::::::::::::::::::::::::::::::::::::::::::::::::
2525

26-
```{r, include=FALSE}
27-
```
28-
2926
## "The fantastic world of R awaits you" OR "Nobody wants to learn how to use R"
3027

3128
Before we begin this lesson, we want you to be clear on the goal of the workshop
@@ -219,7 +216,7 @@ but R is "not sure"
219216
about how to assign the name to "human\_ chr\_number" when the object name we
220217
want is "human\_chr\_number".
221218

222-
<img src="fig/rstudio_script_warning.png" alt="rstudio script warning" style="width: 600px;"/>
219+
![RStudio script warning]("fig/rstudio_script_warning.png")
223220

224221
::::::::::::::::::::::::::::::::::::::::::::::::::
225222

@@ -429,7 +426,7 @@ can be added, multiplied, divided, etc. R provides several mathematical
429426
These can be used with literal numbers:
430427

431428
```{r, purl=FALSE}
432-
(1 + (5 ** 0.5))/2
429+
(1 + (5 ** 0.5)) / 2
433430
```
434431

435432
and importantly, can be used on any object that evaluates to (i.e. interpreted
@@ -459,7 +456,7 @@ functions. Hint: remember the `round()` function can take 2 arguments.
459456
## Solution
460457

461458
```{r, purl=FALSE}
462-
round((1 + sqrt(5))/2, digits = 3)
459+
round((1 + sqrt(5)) / 2, digits = 3)
463460
```
464461

465462
Notice that you can place one function inside of another.
@@ -554,7 +551,7 @@ Also, several of these subsetting expressions can be combined:
554551
```{r, purl=FALSE}
555552
# get the 1st through the 3rd value, and 4th value in the snp vector
556553
# yes, this is a little silly in a vector of only 4 values.
557-
snps[c(1:3,4)]
554+
snps[c(1:3, 4)]
558555
```
559556

560557
## Adding to, removing, or replacing values in existing vectors
@@ -591,7 +588,7 @@ snp_genes
591588
We can also explicitly rename or add a value to our index using double bracket notation:
592589

593590
```{r, purl=FALSE}
594-
snp_genes[6]<- "APOA5"
591+
snp_genes[6] <- "APOA5"
595592
snp_genes
596593
```
597594

0 commit comments

Comments
 (0)