为了使问题稍微复杂一点,我的项目使用Rchunks,这可能会使任务复杂化。
但是,有没有人有书签交叉代码的例子(可能包括Rchunks,Rmd调用那些Rchunks或\ @ref(tab:...))他们会分享,哪些不叫kable?
答案 0 :(得分:1)
不完全确定您要问的是什么,但这是一个与bookdown
一起使用的手动类型表的示例:
R includes a lot of advanced mathematical functions. Table \@ref(tab:mathfunctions) shows a list of the most common functions.
Table: (\#tab:mathfunctions) Common mathematical functions in R.
| Function | Explanation | Example|
|----------|------------|-------------|
| `abs(x)` | Absolute value| `abs(-3) = 3`|
| `sqrt(x)` | Square root | `sqrt(9) = 3` |
| `log(x)` | Natural logarithm | `log(10) = 2.303` |
| `log10(x)` | Base 10 logarithm | `log10(10) = 1` |
| `log(x, base=2)` | Base 2 logarithm | `log(10, base=2) = 3.322` |
| `exp(x)` | Exponential function | `exp(1) = 2.718` |
R also allows you to yada yada yada.