Learn R Programming

Sabermetrics (version 2.0)

fp: Fielding Percentage

Description

A measure that reflects the percentage of times a player successfully handles a batted or thrown ball.

Usage

fp(po, a, e)

Arguments

po
Putouts
a
Assists
e
Errors

Value

Returns a value equal to (po+a)/(po+a+e)

Details

Fielding percentage is not a particularly sought after defensive metric, especially with the advent of more comprehensive metrics such as UZR and DRS.

References

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

Examples

Run this code
## Let's calculate Mike Trout's fielding percentage for 2014
## He had PO = 383, A = 4, E = 3
## We should get an output of .992
fp(383,4,3)

## The function is currently defined as
function (po, a, e) 
{
    fp <- (po + a)/(po + a + e)
    return(fp)
  }

Run the code above in your browser using DataLab