title: Use a variable name with spaces inline in R markdown
body: <p>How can I include inline <code>R</code> code that refers to a variable name that contains spaces or other unusual characters (actual use-case is <code>Pr(&gt;F)</code>)? <a href="https://stackoverflow.com/a/4554977/1036500">Backticks are the solution</a> in plain <code>R</code> script, but they don't seem to work when the code is inline in a markdown doc. Here's an example:</p>
  
  <pre><code>```{r}
  df &lt;- data.frame(mydata= 1:10, yourdata = 20:29)
  names(df) &lt;- c("your data", "my data")
  
  ```
  
  The first five values of your data are `r df$`your data`[1:5]`
  </code></pre>
  
  <p>Which when knitted gives:</p>
  
  <pre><code>Quitting from lines 7-9 (test-main.Rmd) 
  Error in base::parse(text = code, srcfile = NULL) : 
    2:0: unexpected end of input
  1: df$
     ^
  Calls: &lt;Anonymous&gt; ... &lt;Anonymous&gt; -&gt; withVisible -&gt; eval -&gt; parse_only -&gt; &lt;Anonymous&gt;
  Execution halted
  </code></pre>
  
  <p>Note that this is different from <a href="https://stackoverflow.com/q/20409172/1036500">showing the backticks</a>. All I want to do is have the code executed when the the doc is knitted. My workaround is to assign the value of the odd-named variable to another object with a simple name in the chunk preceding the inline code. But I'm curious about how to directly call inline these objects with unusual names. </p>