summary stats across columns, where column names indicate groups
问题 Data frame have includes a few thousand vectors that follow a naming pattern. Each vector name includes a noun, then either _a , _b , or _c . Below are the first 10 vars and obs: id turtle_a banana_a castle_a turtle_b banana_b castle_b turtle_c banana_c castle_c A -0.58 -0.88 -0.56 -0.53 -0.32 -0.42 -0.52 -0.89 -0.72 B NA NA NA -0.84 -0.36 -0.26 NA NA NA C 0.00 -0.43 -0.75 -0.35 -0.88 -0.14 -0.26 -0.15 -0.81 D -0.81 -0.63 -0.77 -0.82 -0.83 -0.50 -0.77 -0.25 -0.07 E -0.25 -0.33 -0.09 -0.51 -0