From 6b2dcaceba62ce6a3acc777190f3a46a22b4d85f Mon Sep 17 00:00:00 2001 From: Ross Drucker Date: Thu, 15 Feb 2024 03:14:41 -0600 Subject: [PATCH] Updating documentation per CRAN comments on r-devel --- R/features-basketball.R | 8 +-- R/features-football.R | 4 +- R/features-hockey.R | 2 +- R/features-lacrosse.R | 7 ++- R/geom-curling.R | 14 ++--- R/geom-hockey.R | 66 ++++++++++++-------- man/basketball_center_circle_fill.Rd | 2 +- man/basketball_free_throw_circle_dash.Rd | 2 +- man/basketball_painted_area.Rd | 4 +- man/curling_features_set_colors.Rd | 20 +++--- man/football_field_border.Rd | 4 +- man/football_field_border_outline.Rd | 4 +- man/hockey_features_set_colors.Rd | 76 +++++++++++++++-------- man/hockey_goaltenders_restricted_area.Rd | 2 +- man/lacrosse_off_field_officials_box.Rd | 6 +- man/lacrosse_penalty_box_outline.Rd | 6 +- 16 files changed, 135 insertions(+), 92 deletions(-) diff --git a/R/features-basketball.R b/R/features-basketball.R index 0990c59..49b1f06 100644 --- a/R/features-basketball.R +++ b/R/features-basketball.R @@ -107,7 +107,7 @@ basketball_two_point_range <- function(basket_center_to_baseline = 0, #' the court coloring inside of the inner edge of this circle #' #' @param center_circle_radius The outer radius of the center circle -#' @param linethickness The thickness of the line that comprises the center +#' @param line_thickness The thickness of the line that comprises the center #' circle #' #' @return A data frame of the boundary of the center circle. The interior of @@ -138,8 +138,8 @@ basketball_center_circle_fill <- function(center_circle_radius = 0, #' @param lane_width The width of the free throw #' @param paint_margin The distance from the painted area of the lane to the #' free throw lane boundary lines -#' @param free_throw_lane_boundary_line_thickness The thickness of the line of -#' the free throw lane +#' @param line_thickness The thickness of the line of the free throw lane +#' boundary line #' #' @return A data frame of the bounding coordinates of the free throw lane's #' painted area @@ -552,7 +552,7 @@ basketball_free_throw_circle <- function(overhang = 0, #' @param line_thickness The thickness of the dash #' @param start_angle The angle, in \code{radians / pi}, at which the dash #' should start -#' @param end_angleThe angle, in \code{radians / pi}, at which the dash should +#' @param end_angle The angle, in \code{radians / pi}, at which the dash should #' end #' #' @returns A data frame containing the bounding coordinates of a dash on the diff --git a/R/features-football.R b/R/features-football.R index 4b86b2d..55ef06a 100644 --- a/R/features-football.R +++ b/R/features-football.R @@ -370,7 +370,7 @@ football_sideline <- function(feature_thickness = 0, #' @param field_width The width of the field #' @param feature_thickness The thickness of the field border #' @param endzone_length The length of the endzone -#' @param boundary_thickness The thickness of the boundary lines +#' @param boundary_line_thickness The thickness of the boundary lines #' @param restricted_area_length The length of the restricted area #' @param restricted_area_width The width of the restricted area #' @param coaching_box_length The length of the coaching box @@ -570,7 +570,7 @@ football_field_border <- function(field_length = 0, #' @param field_width The width of the field #' @param feature_thickness The thickness of the field border's outline #' @param endzone_length The length of the endzone -#' @param boundary_thickness The thickness of the boundary lines +#' @param boundary_line_thickness The thickness of the boundary lines #' @param restricted_area_length The length of the restricted area #' @param restricted_area_width The width of the restricted area #' @param coaching_box_length The length of the coaching box diff --git a/R/features-hockey.R b/R/features-hockey.R index 08e8847..5cbd456 100644 --- a/R/features-hockey.R +++ b/R/features-hockey.R @@ -468,7 +468,7 @@ hockey_goal_line <- function(rink_length = 0, #' by 'minor_line_thickness' as this is a minor line on the ice surface #' #' NOTE: This is not a requirement in all leagues, and may be omitted via the -#' "has_trapezoid" key in the \code{rink_params} passed to geom_{league} +#' "has_trapezoid" key in the \code{rink_params} passed to \code{geom_{league}} #' #' This draws the goaltender's restricted area on the right side (in TV view) of #' the ice surface. The figure is composed of lines that outline a trapezoid in diff --git a/R/features-lacrosse.R b/R/features-lacrosse.R index d198bea..c1c607c 100644 --- a/R/features-lacrosse.R +++ b/R/features-lacrosse.R @@ -1283,11 +1283,12 @@ lacrosse_player_bench_area_fill <- function(bench_area_outline_thickness = 0, #' the field surface. Each penalty box's outline will share the same color as #' the boards #' -#' @param feature_thickness The thickness of the outline of the penalty box +#' @param penalty_box_outline_thickness The thickness of the outline of the penalty box #' @param penalty_box_length The length of the penalty box +#' @param penalty_box_width The width of the penalty box +#' @param penalty_box_separation The separation between the two penalty boxes #' @param penalty_box_depth The depth at which the penalty box extends from the #' outer edge of the boards -#' @param penalty_box_separation The separation between the two penalty boxes #' #' @return A data frame containing the bounding coordinates of the penalty box #' @@ -1369,7 +1370,7 @@ lacrosse_penalty_box_fill <- function(penalty_box_outline_thickness = 0, #' This will have the same thickness as the boards, but will be located outside #' the field surface #' -#' @param feature_thickness The thickness of the outline of the off-field +#' @param officials_box_thickness The thickness of the outline of the off-field #' officials' box #' @param officials_box_length The length of the off-field officials' box #' @param officials_box_depth The depth at which the off-field officials' box diff --git a/R/geom-curling.R b/R/geom-curling.R index ec1ec60..7fc7e64 100644 --- a/R/geom-curling.R +++ b/R/geom-curling.R @@ -7,7 +7,11 @@ #' #' @param plot_background A hexadecimal string representing the color to use for #' this feature -#' @param sheet A hexadecimal string representing the color to use for this +#' @param end_1 A hexadecimal string representing the color to use for this +#' feature +#' @param center_zone A hexadecimal string representing the color to use for +#' this feature +#' @param end_2 A hexadecimal string representing the color to use for this #' feature #' @param sheet_apron A hexadecimal string representing the color to use for #' this feature @@ -27,12 +31,8 @@ #' feature #' @param button A hexadecimal string representing the color to use for this #' feature -#' @param ring_1 A hexadecimal string representing the color to use for this -#' feature -#' @param ring_2 A hexadecimal string representing the color to use for this -#' feature -#' @param ring_3 A hexadecimal string representing the color to use for this -#' feature +#' @param house_rings A vector of hexadecimal strings representing the color(s) +#' to use for this feature #' #' @return A list of hexadecimal colors to use to color the features on the #' resulting plot diff --git a/R/geom-hockey.R b/R/geom-hockey.R index 5439b7e..19bdc1d 100644 --- a/R/geom-hockey.R +++ b/R/geom-hockey.R @@ -7,38 +7,54 @@ #' #' @param plot_background A hexadecimal string representing the color to use for #' this feature -#' @param boards_color A hexadecimal string representing the color to use for +#' @param boards A hexadecimal string representing the color to use for this +#' feature +#' @param ozone_ice A hexadecimal string representing the color to use for this +#' feature +#' @param nzone_ice A hexadecimal string representing the color to use for this +#' feature +#' @param dzone_ice A hexadecimal string representing the color to use for this +#' feature +#' @param center_line A hexadecimal string representing the color to use for #' this feature -#' @param center_line_color A hexadecimal string representing the color to use +#' @param zone_line A hexadecimal string representing the color to use for this +#' feature +#' @param goal_line A hexadecimal string representing the color to use for this +#' feature +#' @param restricted_trapezoid A hexadecimal string representing the color to +#' use for this feature +#' @param goal_crease_outline A hexadecimal string representing the color to use #' for this feature -#' @param blue_line_color A hexadecimal string representing the color to use for -#' this feature -#' @param goal_line_color A hexadecimal string representing the color to use for +#' @param goal_crease_fill A hexadecimal string representing the color to use +#' for this feature +#' @param referee_crease A hexadecimal string representing the color to use for #' this feature -#' @param goalkeepers_restricted_area_color A hexadecimal string representing -#' the color to use for this feature -#' @param goal_crease_outline_color A hexadecimal string representing the color -#' to use for this feature -#' @param goal_crease_fill_color A hexadecimal string representing the color to -#' use for this feature -#' @param referee_crease_color A hexadecimal string representing the color to +#' @param center_faceoff_spot A hexadecimal string representing the color to use +#' for this feature +#' @param faceoff_spot_ring A hexadecimal string representing the color to use +#' for this feature +#' @param faceoff_spot_stripe A hexadecimal string representing the color to use +#' for this feature +#' @param center_faceoff_circle A hexadecimal string representing the color to #' use for this feature -#' @param center_faceoff_spot_color A hexadecimal string representing the color -#' to use for this feature -#' @param faceoff_spot_outer_ring_color A hexadecimal string representing the -#' color to use for this feature -#' @param faceoff_spot_fill_color A hexadecimal string representing the color to +#' @param odzone_faceoff_circle A hexadecimal string representing the color to #' use for this feature -#' @param center_faceoff_circle_color A hexadecimal string representing the -#' color to use for this feature -#' @param non_center_faceoff_circle_color A hexadecimal string representing the -#' color to use for this feature -#' @param faceoff_line_color A hexadecimal string representing the color to use -#' for this feature -#' @param goal_color A hexadecimal string representing the color to use for this +#' @param faceoff_line A hexadecimal string representing the color to use for +#' this feature +#' @param goal_frame A hexadecimal string representing the color to use for this #' feature -#' @param goal_fill_color A hexadecimal string representing the color to use for +#' @param goal_fill A hexadecimal string representing the color to use for this +#' feature +#' @param team_a_bench A hexadecimal string representing the color to use for +#' this feature +#' @param team_b_bench A hexadecimal string representing the color to use for #' this feature +#' @param team_a_penalty_box A hexadecimal string representing the color to use +#' for this feature +#' @param team_b_penalty_box A hexadecimal string representing the color to use +#' for this feature +#' @param off_ice_officials_box A hexadecimal string representing the color to +#' use for this feature #' #' @return A list of hexadecimal colors to use to color the features on the #' resulting plot diff --git a/man/basketball_center_circle_fill.Rd b/man/basketball_center_circle_fill.Rd index dfd9ef6..669f6f0 100644 --- a/man/basketball_center_circle_fill.Rd +++ b/man/basketball_center_circle_fill.Rd @@ -11,7 +11,7 @@ basketball_center_circle_fill(center_circle_radius = 0, line_thickness = 0) \arguments{ \item{center_circle_radius}{The outer radius of the center circle} -\item{linethickness}{The thickness of the line that comprises the center +\item{line_thickness}{The thickness of the line that comprises the center circle} } \value{ diff --git a/man/basketball_free_throw_circle_dash.Rd b/man/basketball_free_throw_circle_dash.Rd index 481de1a..183c1bd 100644 --- a/man/basketball_free_throw_circle_dash.Rd +++ b/man/basketball_free_throw_circle_dash.Rd @@ -21,7 +21,7 @@ basketball_free_throw_circle_dash( \item{start_angle}{The angle, in \code{radians / pi}, at which the dash should start} -\item{end_angleThe}{angle, in \code{radians / pi}, at which the dash should +\item{end_angle}{The angle, in \code{radians / pi}, at which the dash should end} } \value{ diff --git a/man/basketball_painted_area.Rd b/man/basketball_painted_area.Rd index 190ba36..6a2a2db 100644 --- a/man/basketball_painted_area.Rd +++ b/man/basketball_painted_area.Rd @@ -21,8 +21,8 @@ basketball_painted_area( \item{paint_margin}{The distance from the painted area of the lane to the free throw lane boundary lines} -\item{free_throw_lane_boundary_line_thickness}{The thickness of the line of -the free throw lane} +\item{line_thickness}{The thickness of the line of the free throw lane +boundary line} } \value{ A data frame of the bounding coordinates of the free throw lane's diff --git a/man/curling_features_set_colors.Rd b/man/curling_features_set_colors.Rd index 2133f30..7c4f8d0 100644 --- a/man/curling_features_set_colors.Rd +++ b/man/curling_features_set_colors.Rd @@ -26,6 +26,12 @@ curling_features_set_colors( \item{plot_background}{A hexadecimal string representing the color to use for this feature} +\item{end_1}{A hexadecimal string representing the color to use for this +feature} + +\item{end_2}{A hexadecimal string representing the color to use for this +feature} + \item{sheet_apron}{A hexadecimal string representing the color to use for this feature} @@ -53,17 +59,11 @@ feature} \item{button}{A hexadecimal string representing the color to use for this feature} -\item{sheet}{A hexadecimal string representing the color to use for this -feature} +\item{house_rings}{A vector of hexadecimal strings representing the color(s) +to use for this feature} -\item{ring_1}{A hexadecimal string representing the color to use for this -feature} - -\item{ring_2}{A hexadecimal string representing the color to use for this -feature} - -\item{ring_3}{A hexadecimal string representing the color to use for this -feature} +\item{center_zone}{A hexadecimal string representing the color to use for +this feature} } \value{ A list of hexadecimal colors to use to color the features on the diff --git a/man/football_field_border.Rd b/man/football_field_border.Rd index 93f15c6..99ff089 100644 --- a/man/football_field_border.Rd +++ b/man/football_field_border.Rd @@ -33,6 +33,8 @@ football_field_border( \item{endzone_length}{The length of the endzone} +\item{boundary_line_thickness}{The thickness of the boundary lines} + \item{restricted_area_length}{The length of the restricted area} \item{restricted_area_width}{The width of the restricted area} @@ -57,8 +59,6 @@ should surround the team bench} \item{bench_shape}{A string of the shape of the bench. Currently, this checks for \code{"rectangle"}} - -\item{boundary_thickness}{The thickness of the boundary lines} } \value{ A data frame of the bounding box of the field border diff --git a/man/football_field_border_outline.Rd b/man/football_field_border_outline.Rd index aa3b895..9839d02 100644 --- a/man/football_field_border_outline.Rd +++ b/man/football_field_border_outline.Rd @@ -34,6 +34,8 @@ football_field_border_outline( \item{endzone_length}{The length of the endzone} +\item{boundary_line_thickness}{The thickness of the boundary lines} + \item{restricted_area_length}{The length of the restricted area} \item{restricted_area_width}{The width of the restricted area} @@ -60,8 +62,6 @@ should surround the team bench} \item{bench_shape}{A string of the shape of the bench. Currently, this checks for \code{"rectangle"}} - -\item{boundary_thickness}{The thickness of the boundary lines} } \value{ A data frame of the bounding box of the field border's outline diff --git a/man/hockey_features_set_colors.Rd b/man/hockey_features_set_colors.Rd index b615b7b..a68e1e4 100644 --- a/man/hockey_features_set_colors.Rd +++ b/man/hockey_features_set_colors.Rd @@ -37,53 +37,77 @@ hockey_features_set_colors( \item{plot_background}{A hexadecimal string representing the color to use for this feature} -\item{boards_color}{A hexadecimal string representing the color to use for +\item{boards}{A hexadecimal string representing the color to use for this +feature} + +\item{ozone_ice}{A hexadecimal string representing the color to use for this +feature} + +\item{nzone_ice}{A hexadecimal string representing the color to use for this +feature} + +\item{dzone_ice}{A hexadecimal string representing the color to use for this +feature} + +\item{center_line}{A hexadecimal string representing the color to use for this feature} -\item{center_line_color}{A hexadecimal string representing the color to use +\item{zone_line}{A hexadecimal string representing the color to use for this +feature} + +\item{goal_line}{A hexadecimal string representing the color to use for this +feature} + +\item{restricted_trapezoid}{A hexadecimal string representing the color to +use for this feature} + +\item{goal_crease_outline}{A hexadecimal string representing the color to use for this feature} -\item{blue_line_color}{A hexadecimal string representing the color to use for -this feature} +\item{goal_crease_fill}{A hexadecimal string representing the color to use +for this feature} -\item{goal_line_color}{A hexadecimal string representing the color to use for +\item{referee_crease}{A hexadecimal string representing the color to use for this feature} -\item{goalkeepers_restricted_area_color}{A hexadecimal string representing -the color to use for this feature} +\item{center_faceoff_spot}{A hexadecimal string representing the color to use +for this feature} + +\item{faceoff_spot_ring}{A hexadecimal string representing the color to use +for this feature} -\item{goal_crease_outline_color}{A hexadecimal string representing the color -to use for this feature} +\item{faceoff_spot_stripe}{A hexadecimal string representing the color to use +for this feature} -\item{goal_crease_fill_color}{A hexadecimal string representing the color to +\item{center_faceoff_circle}{A hexadecimal string representing the color to use for this feature} -\item{referee_crease_color}{A hexadecimal string representing the color to +\item{odzone_faceoff_circle}{A hexadecimal string representing the color to use for this feature} -\item{center_faceoff_spot_color}{A hexadecimal string representing the color -to use for this feature} +\item{faceoff_line}{A hexadecimal string representing the color to use for +this feature} -\item{faceoff_spot_outer_ring_color}{A hexadecimal string representing the -color to use for this feature} +\item{goal_frame}{A hexadecimal string representing the color to use for this +feature} -\item{faceoff_spot_fill_color}{A hexadecimal string representing the color to -use for this feature} +\item{goal_fill}{A hexadecimal string representing the color to use for this +feature} -\item{center_faceoff_circle_color}{A hexadecimal string representing the -color to use for this feature} +\item{team_a_bench}{A hexadecimal string representing the color to use for +this feature} -\item{non_center_faceoff_circle_color}{A hexadecimal string representing the -color to use for this feature} +\item{team_b_bench}{A hexadecimal string representing the color to use for +this feature} -\item{faceoff_line_color}{A hexadecimal string representing the color to use +\item{team_a_penalty_box}{A hexadecimal string representing the color to use for this feature} -\item{goal_color}{A hexadecimal string representing the color to use for this -feature} +\item{team_b_penalty_box}{A hexadecimal string representing the color to use +for this feature} -\item{goal_fill_color}{A hexadecimal string representing the color to use for -this feature} +\item{off_ice_officials_box}{A hexadecimal string representing the color to +use for this feature} } \value{ A list of hexadecimal colors to use to color the features on the diff --git a/man/hockey_goaltenders_restricted_area.Rd b/man/hockey_goaltenders_restricted_area.Rd index b4ff3ef..bc1377c 100644 --- a/man/hockey_goaltenders_restricted_area.Rd +++ b/man/hockey_goaltenders_restricted_area.Rd @@ -35,7 +35,7 @@ restricted area } \description{ NOTE: This is not a requirement in all leagues, and may be omitted via the -"has_trapezoid" key in the \code{rink_params} passed to geom_{league} +"has_trapezoid" key in the \code{rink_params} passed to \code{geom_{league}} } \details{ This draws the goaltender's restricted area on the right side (in TV view) of diff --git a/man/lacrosse_off_field_officials_box.Rd b/man/lacrosse_off_field_officials_box.Rd index 2269312..cddd0e9 100644 --- a/man/lacrosse_off_field_officials_box.Rd +++ b/man/lacrosse_off_field_officials_box.Rd @@ -12,13 +12,13 @@ lacrosse_off_field_officials_box( ) } \arguments{ +\item{officials_box_thickness}{The thickness of the outline of the off-field +officials' box} + \item{officials_box_length}{The length of the off-field officials' box} \item{officials_box_depth}{The depth at which the off-field officials' box extends from the outer edge of the boards} - -\item{feature_thickness}{The thickness of the outline of the off-field -officials' box} } \value{ A data frame containing the bounding coordinates of the off-field diff --git a/man/lacrosse_penalty_box_outline.Rd b/man/lacrosse_penalty_box_outline.Rd index ca37c6c..6180ff0 100644 --- a/man/lacrosse_penalty_box_outline.Rd +++ b/man/lacrosse_penalty_box_outline.Rd @@ -16,14 +16,16 @@ lacrosse_penalty_box_outline( ) } \arguments{ +\item{penalty_box_outline_thickness}{The thickness of the outline of the penalty box} + \item{penalty_box_length}{The length of the penalty box} +\item{penalty_box_width}{The width of the penalty box} + \item{penalty_box_separation}{The separation between the two penalty boxes} \item{penalty_box_depth}{The depth at which the penalty box extends from the outer edge of the boards} - -\item{feature_thickness}{The thickness of the outline of the penalty box} } \value{ A data frame containing the bounding coordinates of the penalty box