Skip to content
Prev 249518 / 398498 Next

lapply, strsplit, and list elements

On Fri, Feb 4, 2011 at 1:27 PM, Greg Snow <Greg.Snow at imail.org> wrote:
Also this similar approach with a slight simplification of the regular
expression:

   strapply(x, '([0-9]+)/')

or to convert the numbers to numeric at the same time:

   strapply(x, '([0-9]+)/', as.numeric)