powered by
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)
ops(h, bb, hbp, ab, sf, b1, b2, b3, hr)
Number of hits
Number of bases on balls
Number of hits by pitch
Number of at bats
Number of sacrifice flies
Number of singles
Number of doubles
Number of triples
Number of home runs
ops
# NOT RUN { ops(200, 18, 4, 401, 4, 50, 20, 3, 13) # }
Run the code above in your browser using DataLab