Thanks @daattali for the thoughtful comments and suggestions. In general the following aspects have been adjusted based on your comments. The README has been significantly adjusted to better reflect the purpose of the package and more typical use cases. The vignette has also been expanded to discuss the table_id_inject
function in more detail and the source of the input file is shown. Lastly, the code has been adjusted to help improve debugging (i.e. more informative names internally, &
changed to &&
where relevant). More specifics are given below in each of these three areas.
table_id_inject
function. I'd be interested in feedback on whether this is both easier to read and offers a more compelling use/workflow for the package.library(hightlightHTML)
typo.bgtable.html
was removed as this was a contrived example, primarily for testing. A newer example from Rmd to HTML was created to reflect the most useful use case for the package. This file is called joss.Rmd
.update_css = FALSE
is used internally and as such has been removed from the master highlight_html
function, instead just passed internally to the two highlight_html_cells
and highlight_html_text
functions. Discussion of this argument has also been removed from the README and vignette.table_id_inject
function. rgb2hex
function documentation to reflect named vs unnamed list specification.rgb2hex
function.&&
instead of &
. I wasn't aware of the difference actually. Thanks for pointing this out.table_id_inject
function to: A summary table object, most commonly will be a data.frame, but can also be a count table using the table
function. Let me know if this is more clear.conditions
: additional examples are given and added documentation within the details section to operations that are allowed and which are allowed for each type of variable (i.e. which are allowed for numeric vs categorical). table_id_inject
function. This function now allows for rounding of numeric columns. A by product of the CSS id insertion is that the columns are converted to text. This makes it more difficult to round numeric values to a specific number of decimal places. This feature has been added as an optional argument to the table_id_inject
function called num_digits
. This argument takes a single numeric integer that is passed to the round
function within R.Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.