ops: Calculates on-base plus slugging

Description Usage Arguments Value Examples

View source: R/batting.R

Description

Computes the on-base percentage plus slugging average (OPS) based on number of hits, bases on balls, hits by pitch, at bats, sacrifice flies, and total weighted bases (represented individually, as in SLG and GPA calculations)

Usage

1
ops(h, bb, hbp, ab, sf, b1, b2, b3, hr)

Arguments

h

Number of hits

bb

Number of bases on balls

hbp

Number of hits by pitch

ab

Number of at bats

sf

Number of sacrifice flies

b1

Number of singles

b2

Number of doubles

b3

Number of triples

hr

Number of home runs

Value

ops

Examples

1
ops(200, 18, 4, 401, 4, 50, 20, 3, 13)

mlbstats documentation built on May 2, 2019, 1:04 p.m.

Related to ops in mlbstats...