ref_tab | R Documentation |
ref_tab produces a reference to a label of a table or figure
ref_tab(label_name, table = T, add_page = T, prefix = "in", def_text = "")
label_name |
Name of label |
table |
Boolean to indicate if the label is for table (T) or figure(F) |
add_page |
Boolean to indicate if the reference should include the page |
prefix |
Text to include before the reference |
def_text |
Text to include when the output is not Latex |
An example of use:
Create a table with label mylabel
xtable(uf,caption=def_tab('mylabel','mycaption'))
and refer to it in a knitr
text chunk with
def_tab
## Not run:
# generate a reference to the table with label lbltabl1
ref_tab("lbltab1",table=T,prefix="")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.