Learn R Programming

baseballDBR (version 0.1.2)

Fld_pct: Fielding: Calculate batting average

Description

Find batting average for batters with more than zero at bats. Required fields from the Fielding table are; "PO", "A", and "E."

Usage

Fld_pct(dat = NULL)

Arguments

dat

A data frame you would wish to calculate. The data frame must have the same column names found in The Lahman package or the Chadwick Bureau GitHub repository.

See Also

Other Fielding functions: Ch

Examples

Run this code

data("Fielding2016")
head(Fielding2016)

Fielding2016$Fld_pct <- Fld_pct(Fielding2016)

Run the code above in your browser using DataLab