M Berg wrote:
> 
>>str(rx)
> num [1:16] 21 9 8 18 4 12 17 2 9 7 ...
> 
> I want to print out the entire vector as part of the problem.
> When I use \Sexpr(rx) only the first value (in this case 21) is printed
> out.
> 
> 

rx = 1:10
rxs = paste(rx,collapse=", ")

So 

\Sexpr{paste(rx,collapse=", ")} 

should work, but I always prefer

\Sexpr{rxs}

because it is easier to read. And make sure you spell out "collapse" fully,
because it occurs after the .... 
I got bitten for my laziness a few times

Dieter


-- 
View this message in context: 
http://www.nabble.com/Using-package-%22exams%22-and-xtable-tp23731879p23737771.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org 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.

Reply via email to