I was trying to use Sweave function.

Do you know why the following code in my .Rnw file:

<<results=tex, echo=FALSE>>=
print(xtable(stat.table(list("Couverture du livret" = couv),  list(n =
count(), "\\%" = percent(couv)))), floating = F)
@
\\

NA = \Sexpr{table(is.na(couv))[2]}

gives me this result in my .tex file :

% latex table generated in R 2.3.1 by xtable 1.3-2 package
% Mon Jun  5 13:24:15 2006
\begin{tabular}{rrr}
\hline
 & n & \% \\
\hline
Plutot negatif & 8.00 & 21.62 \\
Plutot positif & 29.00 & 78.38 \\
\hline
\end{tabular}\\

NA = \Sexpr{table( is.na(couv))[2]}

and not :

NA = 26

(where "26" is the result of table(is.na(couv))[2])

?

I don't understand !

-- 
David

	[[alternative HTML version deleted]]

