Re: [R] Counting/processing a character vector

2009-02-18 Thread Gavin Simpson
To answer my own post, and for the archives (hopefully not that anyone has to repeat what I had to do ;-), after much hair-pulling , frowning at the screen and general dumb headedness the following slab of R code achieves the results I wanted. It isn't elegant but does a job. msr <- function(x) {

Re: [R] Counting/processing a character vector

2009-02-18 Thread Gavin Simpson
Apologies, Jim Holtman has pointed out a couple of problems/queries with my original email that I would like to make clear. Firstly, I introduced a typo when trying to be helpful. In my email below, I had incorrectly typed out one of the species codes I would count: 1000 16220602 2011 240