Skip to content

Commit

Permalink
Include link, rewrite example
Browse files Browse the repository at this point in the history
  • Loading branch information
cwickham committed Oct 22, 2024
1 parent 9143869 commit 45d6d83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/visual-editor/technical.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ To insert an executable code chunk, use the **Insert -\> Code Chunk** menu item,

Then press the **Enter** key. Note that `r` could be another language supported by `knitr` (e.g., `python` or `sql`) and you can also include a chunk label and other chunk options.

To include inline R code, you just create normal inline code (e.g., by using backticks or the <kbd>⌘ D</kbd> shortcut) but preface it with `{r}` (or `r`). For example, this inline code will be executed by `knitr`: `` `{r} Sys.Date()` ``.
To include [inline R code](/docs/computations/inline-code.qmd), create normal inline code (e.g., by using backticks or the <kbd>⌘ D</kbd> shortcut) but preface it with `{r}` (or `r`). For example, to include the current date using the R function `Sys.Date()` you would use: `` `{r} Sys.Date()` ``.

Note that when the code displays in visual mode it won't have the backticks (but they will still appear in source mode).

### Running Chunks
Expand Down

0 comments on commit 45d6d83

Please sign in to comment.