powered by
Computes the slugging percentage (SLG), based on the weighted number of singles, doubles, triples, home runs, and at bats
slg(b1, b2, b3, hr, ab)
Number of singles
Number of doubles
Number of triples
Number of home runs
Number of at bats
slg
# NOT RUN { slg(100, 40, 3, 7, 350) # }
Run the code above in your browser using DataLab