I am trying to print a nice looking vector in Sweave.

c <- 1:4

I want to see (1, 2, 3, 4) in TeX. .

If I use
paste(c, ",", sep="")
I get
 "1," "2," "3," "4,"

If use cat(c, sep=",")
I can't seem to assign it to an object,
1,2,3,4> myvec <- cat(c, sep=",")
1,2,3,4> myvec
NULL

and if I bypass the object assignment and put
"My vector is (\Sweave{cat(c, sep=",")}). "
prints out
"My vector is (). "

Suggestions?


Robin Jeffries
MS, DrPH Candidate
Department of Biostatistics
UCLA
530-624-0428

	[[alternative HTML version deleted]]

