Let's say that I have the following information.
My_inf<-structure(c(0.00376, 0.00332, 0.00256, 0.00371, 0.00179, 0.00817,
0.00817, 0.00746, 0.00959, 0.00533, 3.44713, 3.44713, 3.44713,
3.44713, 3.44713, -3.44713, -3.44713, -3.44713, -3.44713, -3.44713,
1.0005, 0.99994, 1.00172, 1.00108, 1.00147, -0.00941, -0.00833,
-0.00816, -0.00956, -0.00468, 2.95108, 2.95429, 2.94188, 2.94577,
2.94165), .Dim = c(5L, 7L), .Dimnames = list(c("NSW$^{+}$", "QLD$^{+}$",
"SA$^{+}$", "TAS$^{+}$", "VIC$^{+}$"), c("Mean", "Median", "Max",
"Min", "Std. Dev.", "Skewness", "Kurtosis")))
I want to use the xtable
command for transform this data frame into a latex table. Using xtable(My_inf)
but i get the following output.
\begin{table}[ht]
\centering
\begin{tabular}{rrrrrrrr}
\hline
& Mean & Median & Max & Min & Std. Dev. & Skewness & Kurtosis \\
\hline
NSW\$\verb|^|\{+\} \$& 0.00 & 0.01 & 3.45 & -3.45 & 1.00 & -0.01 & 2.95 \\
QLD\$\verb|^|\{+\}\$ & 0.00 & 0.01 & 3.45 & -3.45 & 1.00 & -0.01 & 2.95 \\
SA\$\verb|^|\{+\}\$ & 0.00 & 0.01 & 3.45 & -3.45 & 1.00 & -0.01 & 2.94 \\
TAS\$\verb|^|\{+\}\$ & 0.00 & 0.01 & 3.45 & -3.45 & 1.00 & -0.01 & 2.95 \\
VIC\$\verb|^|\{+\}\$ & 0.00 & 0.01 & 3.45 & -3.45 & 1.00 & -0.00 & 2.94 \\
\hline
\end{tabular}
\end{table}
As you can see the row names have changed according to xtable
command. My desired output would be, for example:
NSW$^{+}$ & 0.00 & 0.01 & 3.45 & -3.45 & 1.00 & -0.01 & 2.95 \\
How can I get my desired output? I should change the row names in the original data frame or maybe use another package for latex tables.