Use a variable name with spaces inline in R markdown
问题 How can I include inline R code that refers to a variable name that contains spaces or other unusual characters (actual use-case is Pr(>F) )? Backticks are the solution in plain R script, but they don't seem to work when the code is inline in a markdown doc. Here's an example: ```{r} df <- data.frame(mydata= 1:10, yourdata = 20:29) names(df) <- c("your data", "my data") ``` The first five values of your data are `r df$`your data`[1:5]` Which when knitted gives: Quitting from lines 7-9 (test