Learn R Programming

mlbstats (version 0.1.0)

obp: Calculates on-base percentage

Description

Computes the on-base percentage based on number of hits, bases on balls, hits by pitch, at bats, and sacrifice flies

Usage

obp(h, bb, hbp, ab, sf)

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

Value

obp

Examples

Run this code
# NOT RUN {
obp(150, 40, 2, 400, 5)
# }

Run the code above in your browser using DataLab