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 there a way around pasting '\n' ? Thanks a lot.
What do you want to get? Do you want a two element vector? Then use c(). Do you want a one element vector that prints on two lines? Use either form, they both work (but you need to use cat() to do the display). > x <- paste ('I need to move on to a new line', '\n', 'at here') > cat(x) I need to move on to a new line at here> ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.