Closed francisbarton closed 10 months ago
thanks! I think we need to merge #180 and #182 first. These are probably going to cause some merge conflicts by looking at the comparison's of the branches - hopefully these should be too problematic!
Thanks Tom. I think most of the issues will be 'stylistic' like linting, line length, and the use of dplyr::
etc prefixes. Possibly an issue around adoption of the base pipe.
I've attempted to resolve conflicts. If they fail will revert my commit and have another look!
going to merge and apply some fixes in another PR. many thanks @francisbarton !
covr::report()
(should aim for 100%)devtools::document()
lintr::lint_package()
styler::style_pkg()
to make sure code matches the style guidelinesThis submission adds a
label_limits
Boolean flag toptd_create_ggplot()
. When turned on, this flag will add a secondary y axis to the plot, with labels that indicate the values of the UCL, LCL and mean. This is in response to issue #141 .Suggestions for better names for the flag are welcomed.
The fork currently fails against 1 lintr criterion: cyclomatic complexity. By adding the new flag, another set of option combinations has now been added to the
ptd_create_ggplot()
function, which gives it a complexity value of 23, with the current linter limit set to 20.Further changes included in this PR:
usethis::use_package_doc()
dplyr::
) have now been added to most of the external function calls in the package, with just a few auxiliary/embedded functions (e.g.across()
,aes()
) being explicitly imported in the package documentation file. (Some overlap with the work in PR #180)mean
inptd_spc_standard()
has been replaced with the namemean_col
(see issue #187). Referring lines of code as well as test snapshots have been updated to use the new namepoint_type
calculation logic inptd_calculate_point_type()
now specifiesspecial_cause_flag == 0
rather than!special_cause_flag
, which I think had been raising an error/bug somewhere.rlang::quo_name()
calls (a superseded function) have been replaced withrlang::as_name()
I have also done some code tidying:
ptd_create_plotly
were nearly all documented with the same text as the params inptd_create_ggplot
, so I replaced these with an@inheritParams
line for easier maintainabilityThis will also close issue #187 if accepted.