Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

set_caption

Add caption to the table


Description

To drop caption use set_caption with caption = NULL. Captions are supported by htmlTable.etable, xl_write and as.datatable_widget functions.

Usage

set_caption(obj, caption)

get_caption(obj)

is.with_caption(obj)

Arguments

obj

object of class etable - result of cro_cpct and etc.

caption

character caption for the table.

Value

object of class with_caption.

Examples

data(mtcars)
mtcars = apply_labels(mtcars,
                      vs = "Engine",
                      vs = num_lab("
                             0 V-engine 
                             1 Straight engine
                             "),
                      am = "Transmission",
                      am = num_lab("
                             0 Automatic 
                             1 Manual
                             ")
)
tbl_with_caption = calc_cro(mtcars, am, vs) %>% 
    set_caption("Table 1. Type of transimission.")
    
tbl_with_caption

expss

Tables, Labels and Some Useful Functions from Spreadsheets and 'SPSS' Statistics

v0.10.7
GPL (>= 2)
Authors
Gregory Demin [aut, cre], Sebastian Jeworutzki [ctb] (<https://orcid.org/0000-0002-2671-5253>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.