Re: [R] String match

2016-06-04 Thread Bert Gunter
Please (re)-read the Help file for pmatch, which says: ... " (A partial match occurs if the whole of the element of x matches the beginning of the element of table.) " This is clearly not your situation. One approach (there may be others depending on what your detailed situation actually is) is t

Re: [R] String match

2016-06-04 Thread jim holtman
try this: > WhereToLook = c("ultracemco.bo.openam" , "ultracemco.bo.higham" + ,"ultracemco.bo.lowam" , "ultracemco.bo.closeam" , + "ultracemco.bo.volumeam" ,"ultracemco.bo.adjustedam") > > WhatToLook = c("volume", "close") > > # create pattern match > pat <- paste(WhatToLook, collaps

[R] String match

2016-06-04 Thread Christofer Bogaso
Hi again, I am facing trouble to match a vector strings. Let say I have below full string vector WhereToLook = c("ultracemco.bo.openam" , "ultracemco.bo.higham" ,"ultracemco.bo.lowam" , "ultracemco.bo.closeam" , "ultracemco.bo.volumeam" ,"ultracemco.bo.adjustedam") WhatToLook = c("vol