[R] Complex merging problems

2015-01-12 Thread npretnar
Hello, I have two data frames structured as follows: df1 v1 v2 1 83 1 83 1 84 1 84 1 85 1 85 2 90 2 91 2 91 2 91 2 92 4 89 4 89 4 90 4 90 df2 v1 v2 1 83 2 83 3

Re: [R] Separating a Complicated String Vector

2015-01-03 Thread npretnar
t;[0-9]", tmpDF$V1), ] > data.frame(tmpDF, V3 = toupper(gsub("[0-9]", "", tmpDF$V1))) > > Seems to do the trick. > > Best, > Ista > > On Sat, Jan 3, 2015 at 9:41 PM, npretnar wrote: >> I have a string variable (V1) in a data frame structured as

[R] Separating a Complicated String Vector

2015-01-03 Thread npretnar
I have a string variable (V1) in a data frame structured as follows: V1 V2 A 5 a1 1 a2 1 a3 1 a4 1 a5 1 B 4 b1 1 b2 1 b3 1 b4 1 I want the following: V1 V2 V3 a1 1 A a2 1 A a3