update_statcast: Update a statcast data object with additional and/or new data

View source: R/fetch.R

update_statcastR Documentation

Update a statcast data object with additional and/or new data

Description

This function adds new statcast data to an existing statcast object.

Usage

update_statcast(sc, dates, overwrite = FALSE, verbose = TRUE)

Arguments

sc

A statcast data object

dates

A flexible parameter for specifying dates (see [fetch_statcast()] for more details)

overwrite

TRUE or FALSE: whether or not dates in sc will be overwritten with new data corresponding to dates argument. If TRUE the server will be queried with all dates listed in dates, even if some/all already exist in sc. If FALSE, only dates that don't already exist in sc will be queried.

verbose

TRUE or FALSE: Whether or not to report messages.

Details

This function is useful for updating an existing statcast data object when new data becomes available.

Value

A statcast object, with any new dates worth of data incorporated.

See Also

[fetch_statcast()]

Examples

sc <- statcast()
update_statcast(sc,'2017 April 12')

devin-AK/statcastr documentation built on Nov. 18, 2022, 1:48 p.m.