[R] replace values in one df by values from key pairs in another df

2015-02-13 Thread arnaud gaboury
I have been searching for a while now, but can't put all pieces of the puzzle together. Goal : I want to replace all these kinds of patterns @U032FHV3S by this @agreenmamba. In a more generic way, it is replacing 'id' by user 'name'. I have two df: The first, 'history', is some message history

Re: [R] replace values in one df by values from key pairs in another df

2015-02-13 Thread arnaud gaboury
This is the wrong part of my code. idName=users[users$id %in% ext] idname 1: U03AEKWTL agreenmamba 2: U032FHV3S poisonivy 3: U03AEKYL4 vairis Best is to use: idNames - users[pmatch(ext, users$id, duplicates.ok = T)]. This leave me with an ordered and duplicate