Skip to content

Commit 11c5ed9

Browse files
committed
fix #19
1 parent cd8f71a commit 11c5ed9

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/03-basics-factors-dataframes.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,19 @@ one value (except in some cases where we are taking a range).
523523
19 1 C
524524
```
525525

526+
!!! question "Exercise: Subsetting challenge"
527+
**Recreate the output of `head(variants)` using subsetting instead**
528+
529+
??? success "Solution"
530+
```r
531+
variants[1:6, ]
532+
```
533+
534+
535+
536+
537+
538+
526539
The subsetting notation is very similar to what we learned for vectors.
527540
The key differences include:
528541

0 commit comments

Comments
 (0)