marks {combinedevents} | R Documentation |
Calculate marks for track and field combined events
Description
marks()
calculates marks for track and field combined events competitions.
Usage
marks(scores, gender, combined_event = NULL, seconds = FALSE)
Arguments
scores |
a numeric vector of track and field scores |
gender |
gender of athlete; either " |
combined_event |
an optional character string indicating the
combined events competition. For
|
seconds |
a logical; if |
Details
marks()
performs the opposite action of scores()
:
you give it the scores you want to obtain, and it gives you the marks you
need to achieve those scores. For track events, marks()
returns the
slowest time needed to achieve the input score. Similarly, for jumping and
throwing events, marks()
returns the shortest distance necessary to
achieve the input score.
For some events, when a score is given to marks()
, the score returned may
be different from the one input because some scores are not actually
possible (due to rounding of track and field marks). When an impossible
score is given to marks()
, the function will return the closest higher
score that corresponds to a mark.
Value
A list of class "combined_events
" (or "combined_events_null
" if combined_event = NULL
) with
the following fields:
results |
if called with non-NULL |
marks |
the vector of marks based on the input scores for the specified combined event.
If not all scores were supplied to |
scores |
the vector of scores for the specified combined event. If not all scores
were supplied to |
score_total |
if called with non-NULL |
call |
the matched call |
References
International Association of Athletics Federation (2001). IAAF Scoring Tables for Combined Events.
Examples
# Men's heptathlon
marks(scores = rep(800, 7),
gender = "male", combined_event = "heptathlon")
# Women's pentathlon
marks(scores = c(`60mH` = 981, HJ = 875, SP = 799, LJ = 956, `800m` = 1000),
"female", "pentathlon")
# Men's events
marks(scores = c(LJ = 790, LJ = 810, HJ = 850, HJ = 900, PV = 900, PV = 915),
"male")