How to include backlinks in Rstudio code snippet?

I am writing a fragment to create the following slide title in a markdown file, which literally looks like this:

--- .slide  x:`r x("Methods")` y:`r y("Methods")`

I want to write a snippet that allows me to type Methodsin both fields. The problem is that backlinks cause fragment evaluation, rather than being typed.

I know that in this case I could write code that means I don’t need backlinks, but I was looking for a way to include backlinks in snippets in general.

+4
source share
2 answers

@sebastian-c ( ), . , , ,

`r "\u0060r Sys.Date()\u0060"`
+2

.

`r "\u0060"`

, , . , , , , - R ( ), :

Warning message:
In if (matches == -1) return(snippet) :
  the condition has length > 1 and only the first element will be used
+4

All Articles