Skip to content

Printing "pretty' vectors in Sweave

3 messages · Joshua Wiley, Robin Jeffries

#
Hi Robin,

Have you looked at the 'collapse' argument to paste?
something like:

myvec <- paste(1:4, collapse = ", ")

Might do what you want.  Also maybe ?bquote or the like to get rid of quotes possibly (I'm not in a position to try presently).

Side note, it is really probably best not to use 'c' as a variable name since it is such a fundamental function.

Cheers,

Josh
On Jan 18, 2011, at 21:46, Robin Jeffries <rjeffries at ucla.edu> wrote: