Message-ID: <201001032309.o03N9ad9020222@xylocopa.ucdavis.edu>
Date: 2010-01-03T23:09:36Z
From: Jim Bouldin
Subject: calculations on columns with partially matching names
Is there a command for partial matching of character strings? Specifically,
I'd like to be able to calculate the mean of the values in any columns in a
data frame or matrix that have identity in part of their column names. For
example, columns labeled "mpw06a" and "mpw06b" match on the first five
characters; their mean would be taken whereas any columns beginning with
other than "mpw06" would be excluded. I need to compare every pair of
columns in the frame, and in some cases, possibly three at a time.
Thanks in advance for any ideas.
Jim Bouldin
Research Ecologist
Department of Plant Sciences, UC Davis
Davis CA, 95616
530-554-1740