Description Usage Arguments Examples
Function to find streaks in a vector, typically winning or losing streaks. Slight modification of function by Jim Albert at https://baseballwithr.wordpress.com/2014/07/07/team-streaks-part-i-2/
1 | streaks(myvector, streakitem = "W", nonstreakitem = "L")
|
myvector |
a vector of characters or numbers such as 0 and 1. |
streakitem |
a character or number that stands for the item you're seeking a streak for, such as "W" or 1. |
nonstreakitem |
a character or number that stands for the item that usually interrupts the streak, such as "L" when seeking "W" streaks. There can be other streak-interrupting items not identified, such as "T" for ties. |
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.