Hello, I have data where I have an indicator for when someone had coverage in a year. I need to add across a row starting at the first 1 a person has and stopping when there is a '.'. The 1 can start not at the first year and can have 1's after the streak ends. This is what it looks like now: ID Yr_2000 Yr_2001 Yr_2002 Yr_2003 Yr_2004 Yr_2005 Yr_2006 Yr_2007 Yr_2008 Yr_2009 Yr_2010 A 1 1 1 . . . 1 1 . . . B . . . 1 1 1 . . . . 1 C . . . . . . . . . . . D . 1 1 1 1 1 1 1 1 . . E . . . . . . . . . . . F 1 1 . 1 . . 1 1 . . . G . . . . . 1 1 1 1 . 1 H . . . . . . . . . . 1 ID . 1 1 1 . . . . . . . G 1 . . . . . . . 1 . . K 1 1 1 1 1 . . . . . . I want a table like this: ID Coverage Length A 3 B 3 C 0 D 8 E 0 F 2 G 4 H 1 ID 3 G 1 K 5 Thank you!
... View more