Learn R Programming

mlbstats (version 0.1.0)

ta: Calculates total average

Description

Computes overall offensive contribution of a single player

Usage

ta(tb, hbp, bb, sb, ab, h, cs, gidp)

Arguments

tb

Number of total bases (one for 1B, two for 2B, three for 3B, and four for HR)

hbp

Number of hits by pitch

bb

Number of bases on balls

sb

Number of stolen bases

ab

Number of at bats

h

Number of hits

cs

Number of caught stealing

gidp

Number of grounded into double play

Value

ta

Examples

Run this code
# NOT RUN {
ta(125, 11, 40, 10, 400, 105, 2, 6)
# }

Run the code above in your browser using DataLab