Learn R Programming

mlbstats (version 0.1.0)

slg: Calculates slugging percentage

Description

Computes the slugging percentage (SLG), based on the weighted number of singles, doubles, triples, home runs, and at bats

Usage

slg(b1, b2, b3, hr, ab)

Arguments

b1

Number of singles

b2

Number of doubles

b3

Number of triples

hr

Number of home runs

ab

Number of at bats

Value

slg

Examples

Run this code
# NOT RUN {
slg(100, 40, 3, 7, 350)
# }

Run the code above in your browser using DataLab