0

Trying to extract data from data frame Sample Column:

Second
Daughter (Birth)
No Relation
Son (Adopted)

Desired output (two column):

Data1            Data2
Daughter        (Birth)
No relation
Son             (Adopted)

using this command but not getting the results:

as.data.frame(sub(".*\\w+[^)]*?(\\w+)\\).*", "\\1", test1$second))

Any suggestions or help is appreciated.

neilfws
  • 29,020
  • 5
  • 49
  • 59
scorpionz
  • 35
  • 1
  • 7

0 Answers0