1 + 1[1] 2
When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
1 + 1[1] 2
You can add options to executable code like this
[1] 4
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Rows: 6000 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (1): addiction_level
dbl (8): age, daily_screen_time, social_media_hours, study_hours, sleep_hour...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# A tibble: 6 × 2
usage_group avg_productivity
<fct> <dbl>
1 0–2 57.1
2 2–4 44.3
3 4–6 32.2
4 6–8 19.3
5 8+ 8.86
6 <NA> 34.5
| usage_group | avg_productivity |
|---|---|
| 0–2 | 57.073368 |
| 2–4 | 44.306276 |
| 4–6 | 32.242165 |
| 6–8 | 19.344239 |
| 8+ | 8.862466 |
| NA | 34.479231 |
The echo: false option disables the printing of code (only output is displayed).