Re: [R] can I paste 'newline'?

2007-07-20 Thread runner
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

[R] can I paste 'newline'?

2007-07-19 Thread runner
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

Re: [R] can I paste 'newline'?

2007-07-19 Thread Duncan Murdoch
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

Re: [R] can I paste 'newline'?

2007-07-19 Thread jim holtman
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