Learn R Programming

Sabermetrics (version 2.0)

raweqa: Raw Equivalent Average

Description

Raw Equivalent Average is used to calculate Equivalent Average

Usage

raweqa(AB, H, TB, BB, IBB, HBP, CS, SB, SH, SF)

Arguments

AB
At Bats
H
Hits
TB
Total Bases
BB
Unintentional Walks
IBB
Intentional Walks
HBP
Hit By Pitches
CS
Caught Stealing
SB
Stolen Bases
SH
Sacrifice Hits
SF
Sacrifice Flies

Value

Returns a numerical value equal to (H+TB+1.5*(BB+HBP+SB)+SH+SF-IBB/2)/(AB+BB+HBP+SH+SF+CS+SB)

References

https://www.baseballprospectus.com/glossary/index.php?mode=viewstat&stat=61

See Also

ops,slg,obp,iso,babip

Examples

Run this code

## The function is currently defined as
function (AB, H, TB, BB, IBB, HBP, CS, SB, SH, SF) 
{
    raweqa <- (H + TB + 1.5 * (BB + HBP + SB) + SH + SF - IBB/2)/(AB + 
        BB + HBP + SH + SF + CS + SB)
    return(raweqa)
  }

Run the code above in your browser using DataLab