I need to add some superscript or symbols into fig.cap. I have tried "expression" function, but didn't work for me. How could I achieve it?
Thanks for any suggestions.
This in my Rmd file for example.
---
title: "Untitled"
author: ""
date: "Wednesday, September 24, 2014"
output:
word_document:
fig_caption: true
---
```{r, echo=1,fig.cap=expression('The unit (% y'^-1*')')}
plot(cars)
```
My Session infor:
> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] digest_0.6.4 evaluate_0.5.5 formatR_0.10 htmltools_0.2.4
[5] knitr_1.6 rmarkdown_0.2.46 stringr_0.6.2 tools_3.1.0
[9] yaml_2.1.11