Thanks for replied from you all. I 've got better understanding of what
cat/paste does. what I am trying is to make FASTA format data. i.e. for each
line starting with '', add '\n' at both ends while get rid of all '\n's for
the rest.
e.g. this is original messy data, I need to remove newlines
It is ok to bury a reg expression '\n' when using 'cat', but not 'paste'.
e.g.
cat ('I need to move on to a new line', '\n', 'at here') # change line!
paste ('I need to move on to a new line', '\n', 'at here') # '\n' is just a
character as it is.
Is there a way around pasting '\n' ? Thanks a
On 19/07/2007 7:41 PM, runner wrote:
It is ok to bury a reg expression '\n' when using 'cat', but not 'paste'.
e.g.
cat ('I need to move on to a new line', '\n', 'at here') # change line!
paste ('I need to move on to a new line', '\n', 'at here') # '\n' is just a
character as it is.
Is
Notice the difference:
cat ('I need to move on to a new line', '\n', 'at here') # change line!
I need to move on to a new line
at here paste ('I need to move on to a new line', '\n', 'at here') #
'\n' is just a
[1] I need to move on to a new line \n at here
cat(paste ('I need to move on to a