Learn R Programming

statsr (version 0.3.0)

calc_streak: Calculate hitting streaks

Description

Calculate hitting streaks

Usage

calc_streak(x)

Arguments

x

A data frame or character vector of hits ("H") and misses ("M").

Value

A data frame with one column, length, containing the length of each hit streak.

Examples

Run this code
# NOT RUN {
data(kobe_basket)
calc_streak(kobe_basket$shot)

# }

Run the code above in your browser using DataLab