1

This is my code for the table, I was expecting siunitx to add the comma to the numebers with more than 3 digits, i.e., 3456 -> 3,456 but it does not happen, the numebers without decimals are shown as they are. I tried some code found in answers in this site that works for people but not for me. Any help?

 \usepackage{siunitx}
 \sisetup{group-separator={,},group-minimum-digits={3},output-decimal-marker={.}}

  \begin{table}
   \centerfloat
   \caption{Descriptive statistics of Expedia and Tripadvisor datasets.}
   \label{tab:stats}
  \scalebox{1}{
  \begin{tabular}{l S S}
\hline
\multicolumn{1}{c}{Statistics}&\multicolumn{1}{c}{Tripadvisor} &\multicolumn{1}{c}             {Expedia} \\
\hline
Total Hotels & 5356 & 3701 \\
[1em]
Average Reviews per Hotel & 68.3 & 154.93 \\
[1em]
Average Review Length & 665.4 & 210.23 \\
[1em]
Average Review Rating & 3.9 & 4.0 \\
[1em]
Average Hotel Review Rating & 3.6 & 3.9 \\
[1em]
Total Responses & 102564 & 13123 \\
[1em]
Average Response per Hotel & 22.3 & 3.9 \\
[1em]
Average Response Length & 397.8 & 251.3 \\
\hline
\end{tabular}
}
\caption*{}
\end{table}

enter code here

closed as unclear what you're asking by Torbjørn T., Werner, Stefan Pinnow, Zarko, user13907 Oct 1 '16 at 10:09

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Nathanael Farley Oct 9 '14 at 15:43
  • The siunitx-package will only format numbers in the \num{}-command. – René B. Christensen Oct 9 '14 at 16:11
  • this is not what I understood. For example here tex.stackexchange.com/questions/121387/… look at the first answer. That is what I want but the example does not work for me. – user63979 Oct 9 '14 at 16:39
  • This is 'works for me': can you add \listfiles to your input and report the version information this adds to your .log file? – Joseph Wright Oct 9 '14 at 21:12
  • @user63979: I stand corrected. I just tried compiling your document, and your current code seems to work on my machine (at least in the memoir document class). – René B. Christensen Oct 10 '14 at 14:15

Browse other questions tagged or ask your own question.