0

How can i split a string based on space/word boundary in R?

t = "ID=gene:Bra032485;biotype=protein_coding;description=AT5G40170 (E%3D6e-176) AtRLP54 | AtRLP54 (Receptor Like Protein 54)%3B kinase/ protein binding ;gene_id=Bra032485;logic_name=glean;version=1"

I have tried this but it did not worked

sub("([A-Za-z1-9]+)+[[:space:]]","\\1",t)

The output i want is

ID=gene:Bra032485;biotype=protein_coding;description=AT5G40170
upendra
  • 2,141
  • 9
  • 39
  • 64

0 Answers0