Hi all,
Does any of you cool R-sharks know how to transform data from this:
Gene GO_terms
ENO GO:0000015^GO:0000287^GO:0004634^GO:0006096
CCYL1 GO:0000079
SAP30 GO:0000118^GO:0003677^GO:0004407^GO:0046872^GO:0006351
To this in R?:
Gene GO_terms
ENO GO:0000015
ENO GO:0000287
ENO GO:0004634
ENO GO:0006096
CCYL1 GO:0000079
SAP30 GO:0000118
SAP30 GO:0003677
SAP30 GO:0004407
SAP30 GO:0046872
SAP30 GO:0006351
Thanks from a Birgitte that cannot figure it out :-)
What's the reason for using R? Just curious.
Because I have to use the "transformed" data in R, so I thought there had to be a smart way to do this. I was not aware that Python/awk etc. is better for text formatting until now. I am still pretty new to all of this "programming stuff" - learning every day :-)
If you would like to see a Python option, I can provide one.
If it is not too much trouble, I would love to see an example :-) Thank you!
You should not use R for such text formatting. Its better to use scripting language such as Python or database like psql.