library(xtable)
library(magrittr)
library(moonBook)
options(ztable.type="html")
a=mytable(head(iris))
a
x = xtable(a)
x
i cannot make xtable, just use mytable... want to use xtable, but output like this.. what is problem?? i installed latex progrem.. help me i cannot find good result in googling..
Descriptive Statistics
--------------------------------
N Total
--------------------------------
Sepal.Length 6 5.0 ± 0.3
Sepal.Width 6 3.4 ± 0.3
Petal.Length 6
- 1.3 1 (16.7%)
- 1.4 3 (50.0%)
- 1.5 1 (16.7%)
- 1.7 1 (16.7%)
Petal.Width 6
- 0.2 5 (83.3%)
- 0.4 1 (16.7%)
Species 6
- setosa 6 (100.0%)
- versicolor 0 (0.0%)
- virginica 0 (0.0%)
--------------------------------
% latex table generated in R 3.6.1 by xtable 1.8-4 package
% Fri Sep 27 14:45:14 2019
\begin{table}[ht]
\centering
\begin{tabular}{rllll}
\hline
& name & N & stats & class \\
\hline
1 & Sepal.Length & 6 & 5.0 ± 0.3 & continuous \\
2 & Sepal.Width & 6 & 3.4 ± 0.3 & continuous \\
3 & Petal.Length & 6 & & categorical \\
4 & - 1.3 & & 1 (16.7\%) & \\
5 & - 1.4 & & 3 (50.0\%) & \\
6 & - 1.5 & & 1 (16.7\%) & \\
7 & - 1.7 & & 1 (16.7\%) & \\
8 & Petal.Width & 6 & & categorical \\
9 & - 0.2 & & 5 (83.3\%) & \\
10 & - 0.4 & & 1 (16.7\%) & \\
11 & Species & 6 & & categorical \\
12 & - setosa & & 6 (100.0\%) & \\
13 & - versicolor & & 0 (0.0\%) & \\
14 & - virginica & & 0 (0.0\%) & \\
\hline
\end{tabular}
\end{table}