Learn R Programming

openintro (version 2.4.0)

calc_streak: Calculate hit streaks

Description

Calculate hit streaks

Usage

calc_streak(x)

Value

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

Arguments

x

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

Examples

Run this code
data(kobe_basket)
calc_streak(kobe_basket$shot)

Run the code above in your browser using DataLab