[R] c(), or cat(), or paste(), all cause unwanted reordering

Jeff Brown dopethatwantscash at yahoo.com
Thu Mar 25 19:53:11 CET 2010


Hi,

I would expect the following:

paste(
	as.character( cat( rep( ".", 2 ) ) ),	
	"a string",
	as.character( cat( rep( ".", 3 ) ) )
);

to yield this string: ". . a string . . .", but instead it yields this:

> . .. . .[1] " a string "

The third argument has been stuck immediately after the first.  The same
thing happens with cat() or c(). What's going on?

Thanks,
Jeff

-- 
View this message in context: http://n4.nabble.com/c-or-cat-or-paste-all-cause-unwanted-reordering-tp1691133p1691133.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list