I am a bit confused how to read this data and extract the information I want and eventually store into an array/vector etc ( which i will know how to do. I'll present what the text file says below. (Note that somehow everything is on one line on the text file so i can't use a new line strategy)
"AFFX-Bt-actin-3_at" c("NM_174225", "NP_776650")
"AFFX-Bt-actin-5_at" c("NM_174225", "NP_776650","NP_776850")
"AFFX-Bt-actin-M_at" c("NM_174225", "NP_776650")
"AFFX-Bt-ef1a-3_at" c("NM_174535", "NP_776960")
(note for each line a new vector/array I can sort that out once i am able to 'read' text file)
For example looking at the first line I would like to read for instance AFFX-Bt-actin-3_at, NM_174225 and NP_776650. The following steps I think is how to do it.
1. detect " and start copying until " is reached again
2. first data entered in vector, detect c(" and read until ",
3. when ", detected read until you meet ", again
4. repeat step 3 until you meet ")
From then i will write new information in a new vector once ") detected and the process will repeat
Does anybody have a fair idea what to do?