Re: [R] partial match of one column in data frame to another character vector

2010-08-10 Thread Henrique Dallazuanna
Try this: myData$fullID <- sapply(gsub("^ +| +$", "", myData$id), grep, x = fullID, value = TRUE) On Tue, Aug 10, 2010 at 3:39 PM, Juliet Hannah wrote: > Here is some data (dput output below) > > > myData > id group > 1

[R] partial match of one column in data frame to another character vector

2010-08-10 Thread Juliet Hannah
Here is some data (dput output below) > myData id group 1 D599 A 2 002-0004 B 3 F01932