This function designs the a HTML table based on the data frame list returned by the table_prep function.
html_table_design(
dfl,
uselabel = TRUE,
yhead = FALSE,
footnote = NULL,
title = "table",
titlepr = NULL,
xabove = TRUE,
group = NULL,
xrepeat = FALSE,
tclass = "sample"
)
The function returns a vector that defines the entire HTML table. This vector can be adapted manually however it is intended to be used in a print function to add to a HTML document.
list generated by the table_prep function which serves as the base of the table to be generated
logical indicating if labels should be used for the x variable(s). If set to TRUE, the function will try to use the label attribute for the display of x variable(s).
logical indicating if the y variable should also be set as header in the table.
character string with the footnote to be placed in the footer of the page (HTML coding can be used for example to create line breaks)
character string to define the title of the table which will be added to the caption
character string to define the prefix of the table title. Can be used to create custom table numbering
logical indicating if the first unique x variable should be placed in the table row above. Mostly used to save space on a page
number indicating which x variables should be grouped (displayed in table with a certain white space) and interpreted as x[1:group]
logical indicating if duplicate x values should be repeated in the table or not
character string with the table class. Can be used in combination with custom css
This function designs a HTML pivot table based on the results of the table_prep output. This means that the function Should always be used in conjunction with this function.
if (FALSE) html_table_design(lstobject)
Run the code above in your browser using DataLab