diff --git a/DESCRIPTION b/DESCRIPTION index 7798c683..d1568534 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,51 +1,51 @@ -Package: reactablefmtr -Type: Package -Title: Streamlined Table Styling and Formatting for Reactable -Version: 2.1.0 -Authors@R: c( - person("Kyle", "Cuilla", role = c("aut", "cre", "cph"), email = "kyle.cuilla@gmail.com"), - person("Greg", "Lin", role = c("ctb")), - person("June", "Choe", role = c("ctb")), - person("Kent", "Russell", role = c("ctb")) - ) -Maintainer: Kyle Cuilla -Description: Provides various features to streamline and enhance the styling of interactive - reactable tables with easy-to-use and highly-customizable functions and themes. - Apply conditional formatting to cells with data bars, color scales, color tiles, - and icon sets. Utilize custom table themes inspired by popular websites such - and bootstrap themes. Apply sparkline line & bar charts - (note this feature requires the 'dataui' package which can be downloaded from - ). - Increase the portability and reproducibility of reactable tables by embedding images - from the web directly into cells. Save the final table output as a static image or - interactive file. -URL: https://kcuilla.github.io/reactablefmtr/, https://github.com/kcuilla/reactablefmtr -BugReports: https://github.com/kcuilla/reactablefmtr/issues -License: MIT + file LICENSE -Encoding: UTF-8 -Depends: - R (>= 3.5.0), - reactable (>= 0.2.0) -Imports: - dplyr, - glue, - grDevices, - htmltools, - htmlwidgets (>= 1.5.3), - magrittr, - purrr, - sass (>= 0.4.0), - shiny, - stats, - stringr (>= 1.4.0), - tippy (>= 0.1.0), - tools, - webshot2 -Suggests: - dataui (>= 0.0.1), - MASS, - scales -Additional_repositories: - https://kcuilla.github.io/drat/ -RoxygenNote: 7.1.1 -Language: en-US +Package: reactablefmtr +Type: Package +Title: Streamlined Table Styling and Formatting for Reactable +Version: 2.1.1 +Authors@R: c( + person("Kyle", "Cuilla", role = c("aut", "cre", "cph"), email = "kyle.cuilla@gmail.com"), + person("Greg", "Lin", role = c("ctb")), + person("June", "Choe", role = c("ctb")), + person("Kent", "Russell", role = c("ctb")) + ) +Maintainer: Kyle Cuilla +Description: Provides various features to streamline and enhance the styling of interactive + reactable tables with easy-to-use and highly-customizable functions and themes. + Apply conditional formatting to cells with data bars, color scales, color tiles, + and icon sets. Utilize custom table themes inspired by popular websites such + and bootstrap themes. Apply sparkline line & bar charts + (note this feature requires the 'dataui' package which can be downloaded from + ). + Increase the portability and reproducibility of reactable tables by embedding images + from the web directly into cells. Save the final table output as a static image or + interactive file. +URL: https://kcuilla.github.io/reactablefmtr/, https://github.com/kcuilla/reactablefmtr +BugReports: https://github.com/kcuilla/reactablefmtr/issues +License: MIT + file LICENSE +Encoding: UTF-8 +Depends: + R (>= 3.5.0), + reactable (>= 0.2.0) +Imports: + dplyr, + glue, + grDevices, + htmltools, + htmlwidgets (>= 1.5.3), + magrittr, + purrr, + sass (>= 0.4.0), + shiny, + stats, + stringr (>= 1.4.0), + tippy (>= 0.1.0), + tools, + webshot2 +Suggests: + dataui (>= 0.0.1), + MASS, + scales +Additional_repositories: + https://kcuilla.github.io/drat/ +RoxygenNote: 7.2.3 +Language: en-US diff --git a/R/table_elements.R b/R/table_elements.R index 554496bf..5ee5a7f1 100644 --- a/R/table_elements.R +++ b/R/table_elements.R @@ -27,6 +27,9 @@ #' Options are "bold" or "normal". #' Default is "bold". #' +#' @param font-family The font family of the title. +#' Default is NULL. +#' #' @param text_decoration Add an underline, overline, or line-through title. #' Default is NULL. #' @@ -77,6 +80,7 @@ add_title <- function(table = NULL, font_size = 32, font_style = "normal", font_weight = "bold", + font_family = NULL, text_decoration = NULL, text_transform = NULL, letter_spacing = NULL, @@ -127,6 +131,7 @@ add_title <- function(table = NULL, "font-size:", font_size, "px;", "font-style:", font_style, ";", "font-weight:", font_weight, ";", + "font-family:", font_family, ";", "text-decoration:", text_decoration, ";", "letter-spacing:", letter_spacing, "px;", "word-spacing:", word_spacing, "px;", @@ -171,6 +176,9 @@ add_title <- function(table = NULL, #' Options are "bold" or "normal". #' Default is "bold". #' +#' @param font-family The font family of the title. +#' Default is NULL. +#' #' @param text_decoration Add an underline, overline, or line-through subtitle. #' Options are "underline", "overline", "underline overline", or "line-through". #' Default is NULL. @@ -227,6 +235,7 @@ add_subtitle <- function(table = NULL, font_size = 24, font_style = "normal", font_weight = "bold", + font_family = NULL, text_decoration = NULL, text_transform = NULL, letter_spacing = NULL, @@ -283,6 +292,7 @@ add_subtitle <- function(table = NULL, "font-size:", font_size, "px;", "font-style:", font_style, ";", "font-weight:", font_weight, ";", + "font-family:", font_family, ";", "text-decoration:", text_decoration, ";", "letter-spacing:", letter_spacing, "px;", "word-spacing:", word_spacing, "px;", @@ -325,7 +335,10 @@ add_subtitle <- function(table = NULL, #' #' @param font_weight The font weight of the source. #' Options are "bold" or "normal". -#' Default is "normal". +#' Default is "normal" +#' +#' @param font-family The font family of the title. +#' Default is NULL. #' #' @param text_decoration Add an underline, overline, or line-through source. #' Options are "underline", "overline", "underline overline", or "line-through". @@ -378,6 +391,7 @@ add_source <- function(table = NULL, font_size = 16, font_style = "normal", font_weight = "normal", + font_family = NULL, text_decoration = NULL, text_transform = NULL, letter_spacing = NULL, @@ -433,6 +447,7 @@ add_source <- function(table = NULL, "font-size:", font_size, "px;", "font-style:", font_style, ";", "font-weight:", font_weight, ";", + "font-family:", font_family, ";", "text-decoration:", text_decoration, ";", "letter-spacing:", letter_spacing, "px;", "word-spacing:", word_spacing, "px;", diff --git a/man/add_source.Rd b/man/add_source.Rd index 850b6f99..ef05ef04 100644 --- a/man/add_source.Rd +++ b/man/add_source.Rd @@ -12,6 +12,7 @@ add_source( font_size = 16, font_style = "normal", font_weight = "normal", + font_family = NULL, text_decoration = NULL, text_transform = NULL, letter_spacing = NULL, @@ -42,7 +43,7 @@ Default is "normal".} \item{font_weight}{The font weight of the source. Options are "bold" or "normal". -Default is "normal".} +Default is "normal"} \item{text_decoration}{Add an underline, overline, or line-through source. Options are "underline", "overline", "underline overline", or "line-through". @@ -69,6 +70,9 @@ Default is #FFFFFF.} \item{margin}{Use margin() to set the margin around the text (top, right, bottom, left). Default is NULL.} + +\item{font-family}{The font family of the title. +Default is NULL.} } \value{ a function that adds a source below a reactable table. diff --git a/man/add_subtitle.Rd b/man/add_subtitle.Rd index 73c23a2e..5fc453a7 100644 --- a/man/add_subtitle.Rd +++ b/man/add_subtitle.Rd @@ -12,6 +12,7 @@ add_subtitle( font_size = 24, font_style = "normal", font_weight = "bold", + font_family = NULL, text_decoration = NULL, text_transform = NULL, letter_spacing = NULL, @@ -69,6 +70,9 @@ Default is #FFFFFF.} \item{margin}{Use margin() to set the margin around the text (top, right, bottom, left). Default is NULL.} + +\item{font-family}{The font family of the title. +Default is NULL.} } \value{ a function that adds a subtitle above a reactable table. diff --git a/man/add_title.Rd b/man/add_title.Rd index 531f9f18..fe480c0c 100644 --- a/man/add_title.Rd +++ b/man/add_title.Rd @@ -12,6 +12,7 @@ add_title( font_size = 32, font_style = "normal", font_weight = "bold", + font_family = NULL, text_decoration = NULL, text_transform = NULL, letter_spacing = NULL, @@ -68,6 +69,9 @@ Default is #FFFFFF.} \item{margin}{Use margin() to set the margin around the text (top, right, bottom, left). Default is NULL.} + +\item{font-family}{The font family of the title. +Default is NULL.} } \value{ a function that adds a title above a reactable table. diff --git a/man/reactablefmtr-package.Rd b/man/reactablefmtr-package.Rd index ed91c1c6..55ba1a6d 100644 --- a/man/reactablefmtr-package.Rd +++ b/man/reactablefmtr-package.Rd @@ -6,9 +6,9 @@ \alias{reactablefmtr-package} \title{reactablefmtr: Streamlined Table Styling and Formatting for Reactable} \description{ -\if{html}{\figure{logo.png}{options: align='right' alt='logo' width='120'}} +\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} -Provides various features to streamline and enhance the styling of interactive reactable tables with easy-to-use and highly-customizable functions and themes. Apply conditional formatting to cells with data bars, color scales, color tiles, and icon sets. Utilize custom table themes inspired by popular websites such and bootstrap themes. Apply sparkline line & bar charts (note this feature requires the 'dataui' package which can be downloaded from ). Increase the portability and reproducibility of reactable tables by embedding images from the web directly into cells. Save the final table output as a static image or interactive file. +Provides various features to streamline and enhance the styling of interactive reactable tables with easy-to-use and highly-customizable functions and themes. Apply conditional formatting to cells with data bars, color scales, color tiles, and icon sets. Utilize custom table themes inspired by popular websites such and bootstrap themes. Apply sparkline line & bar charts (note this feature requires the 'dataui' package which can be downloaded from \url{https://github.com/timelyportfolio/dataui}). Increase the portability and reproducibility of reactable tables by embedding images from the web directly into cells. Save the final table output as a static image or interactive file. } \seealso{ Useful links: