View source: R/calculate_threat.R
calculate_threat | R Documentation |
Calculating xT for passes, carries, etc
calculate_threat(data, type = "opta")
data |
The dataframe that stores your data. Must contain starting x,y locations and ending x,y locations: |
type |
indicator for what type of data the data. Currently, options include "opta" (default) and "statsbomb" |
returns a dataframe object
## Not run:
endResult <- calculate_threat(test, type = "statsbomb")
endResult
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.