Skip to content

Commit

Permalink
Refactoring of formatter functions (#232)
Browse files Browse the repository at this point in the history
* Add `filter_table_to_row()` util function

* Add `pull_table_value_from_column()` util function

* Add new `get_locale_sep_mark()` util function

* Modify the `get_locale_sep_mark()` fcn

* Add the `get_locale_dec_mark()` util fcn

* Add the `has_order_zero()` util fcn

* Add the `scale_x_values()` util function

* Add the `format_num_to_str*()` util fcns

* Remove two earlier versions of util fcns

* Use the `has_order_zero()` fcn

* Refactor and use newer util fcns

* Remove unneeded tests

* Add several testthat tests

* Combine two functions to a single function

* Add roxygen @param statement

* Refactor several util fcns

* Add the `split_string_2()` util fcn

* Refactor the `fmt_number()` function

* Refactor some testthat tests

* Add tests for the `split_string_2()` util fcn

* Modify roxygen documentation

* Add two `stop()` statements

* Modify comment

* Modify `stop()` message

* Add the `paste_between()` util fcn

* Add the `paste_on_side()` util fcn

* Add the `paste_left()` and `paste_right()` util fcns

* Refactor using new util fcns

* Add comment

* Add several testthat tests

* Modify roxygen documentation

* Add the `warn_on_scale_by_input()` util fcn

* Modify roxygen documentation

* Call util function twice

* Modify roxygen documentation

* Modify condition for `stop()`

* Modify roxygen documentation

* Modify roxygen documentation

* Update several testthat tests

* Update help file using roxygen

* Replace several stmts with call of util fcn

* Modify indentation

* Replace several stmts with util fcn call

* Add `scale_by` argument to `num_suffix()`

* Use the `scale_by` value in early df return

* Modify function calls; remove conditional

* Remove conditional block

* Modify function call

* Update roxygen documentation for util fcns

* Modify roxygen documentation

* Move util fcn to a different file

* Move util fcns to a new .R file

* Rewrite some testthat tests

* Replace `stop()` stmt with a `validate_*()` fcn

* Remove unneeded statement

* Modify default value for argument

* Add util fcn `get_currency_decimals()`

* Modify roxygen documentation

* Add util fcn `swap_adjacent_text_groups()`

* Refactor several `fmt_*()` fcns to use fcn factories

* Update several testthat tests

* Add util functions for string formatting

* Refactor several `format_*()` fcns

* Add `amsmath` LaTeX package to list

* Modify several testthat tests

* Call all factory fcns inside `list()`

* Modify LaTeX parens marks

* Use `currency_str` as text in LaTeX

* Modify `vapply()` statement

* Use `to_latex_math_mode()` as final step

* Modify several testthat tests

* Return .Rmd to original form

* Modify arg order in `paste_between()`

* Modify several `paste_between()` calls
  • Loading branch information
rich-iannone authored Mar 29, 2019
1 parent 51a812b commit 876b862
Show file tree
Hide file tree
Showing 22 changed files with 2,031 additions and 1,026 deletions.
860 changes: 295 additions & 565 deletions R/format_data.R

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion R/tab_style.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
#' date <= "2015-12-15"
#' ) %>%
#' dplyr::select(-c(adj_close, volume)) %>%
#' dplyr::mutate(date = as.character(date)) %>%
#' gt() %>%
#' tab_style(
#' style = cells_styles(
Expand Down
Loading

0 comments on commit 876b862

Please sign in to comment.