In this JASA paper, we generalized the squared Pearson correlation to capture a mixture of linear dependences between two real-valued variables, with or without an index variable that specifies the line memberships. When the index variable is not available, we developed a K-lines clustering algorithm. Thanks Heather for helping develop the gR2 R pakcage!