Hello,
I am trying to use the package "exams" to construct problem sets.
I have constructed an exercise which generates a list of integers and asks
the student to compute the median.
rx is the vector of n numbers
>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.
I have been trying to get xtable to work.
> xtable(rx)
Error in UseMethod("xtable") : no applicable method for "xtable"
> methods(xtable)
[1] xtable.anova* xtable.aov* xtable.aovlist*
[4] xtable.coxph* xtable.data.frame* xtable.glm*
[7] xtable.lm* xtable.matrix* xtable.prcomp*
[10] xtable.summary.aov* xtable.summary.aovlist* xtable.summary.glm*
[13] xtable.summary.lm* xtable.summary.prcomp* xtable.table*
[16] xtable.ts* xtable.zoo*
Non-visible functions are asterisked
I am new to R and would appreciate any suggestions.
What is the best way to get exams/Sweave to print out the entire vector?
Thanks in advance.
DBerg
[[alternative HTML version deleted]]