similarityToolOffProj: Offensive Similarity Tool (Projection)

Usage Arguments Details Value Note Author(s)

View source: R/similarityToolOffProj.R

Usage

1
similarityToolOffx(battedBallVals, playerName, numResults = 10)

Arguments

battedBallVals

A dataframe of batted ball data from FanGraphs.

playerVals

A dataframe containing a player's offensive peripheral data. i.e. PlayerVals = data.frame("LD%" = .xxx, "GB%" = .xxx, "FB%" = .xxx, "Pull%" = .xxx, "Cent%" = .xxx, "Oppo%" = .xxx, "Soft%" = .xxx, "Med%" = .xxx, "Hard%" = .xxx, "HR/FB" = .xxx, "K%" = .xxx, "BB%" = .xxx check.names=FALSE)

numResults

An integer. Defaults to 10.

Details

BattedBallVals are designed to be from FanGraphs, using the Batted Ball tab. They must contain all of the following attributes (other values can be included, but will not be used): GB%, LD%, FB%, HR/FB, Pull%, Cent%, Oppo%, Soft%, Med%, Hard%, K%, BB%, Name. Player Vals must be formatted as decimals.

Value

A dataframe with the players most similar to the given playerVals and their similarity scores.

Note

Similarity scores will differ depending upon the sample size presented due to the normalization applied in the creation of the scores.

Author(s)

John Edwards


Metlover/similarityTool documentation built on Feb. 25, 2018, 3:49 p.m.