slg: Slugging Percentage

Description Usage Arguments Value Author(s) References See Also Examples

Description

Slugging percentage is a measure of a hitter's power.

Usage

1
slg(TB, AB)

Arguments

TB

Total Bases

AB

At Bats

Value

Returns a numerical value equal to (TB/AB)

This is also equivalent to ((singles) + (2 x doubles) + (3 x triples) + (4 x homeruns))/(AB)

Author(s)

Peter Xenopoulos

References

https://en.wikipedia.org/wiki/Slugging_percentage

See Also

opsplus, ops

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Let's calculate Mike Trout's SLG for the 2014 season
## He had 338 TB's and 602 AB's
## We should get .561 as our output
slg(338,602)

## The function is currently defined as
function (TB, AB) 
{
    slugging <- (TB/AB)
    return(slugging)
  }

Sabermetrics documentation built on Jan. 15, 2017, 7:34 p.m.