Learn R Programming

Sabermetrics (version 1.0)

iso: Isolated Power

Description

Isolated power is a statistic to measure a hitter's raw power

Usage

iso(slg, avg)

Arguments

slg
Slugging Percentage. Found from slg
avg
Batting Average

Value

  • Returns Slugging Percentage - Batting Average

References

http://en.wikipedia.org/wiki/Isolated_Power

See Also

Slugging Percentage slg

Examples

Run this code
## The isolated power (iso) function is currently defined as
function (slg, avg) 
{
    iso <- slg - avg
    return(iso)
  }
  
## Let's take 2014's MLB MVP, Mike Trout, and find his Isolated Power
## Stats for Mike Trout available on
## http://www.baseball-reference.com/players/t/troutmi01-bat.shtml
## For 2014, Trout had a SLG of .561 and an AVG of .287
## The formula for his Isolated Power using the iso function is below
## Output should be .274
iso(0.561,0.287)

Run the code above in your browser using DataLab