We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd8f71a commit 11c5ed9Copy full SHA for 11c5ed9
1 file changed
docs/03-basics-factors-dataframes.md
@@ -523,6 +523,19 @@ one value (except in some cases where we are taking a range).
523
19 1 C
524
```
525
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
539
The subsetting notation is very similar to what we learned for vectors.
540
The key differences include:
541
0 commit comments