如何在 R 中创建具有重要意义星号的乳胶表?

如何在 R 中创建具有重要意义星号的乳胶表?

我在 R 中生成了如下乳胶表:

\documentclass[12pt,econ]{authesis}    
\usepackage{natbib}  % natbib citation style
    \usepackage{url}     % added 2015-067-06 bc the example .bib uses url
    \usepackage{graphicx}
    \usepackage{amsmath}
    \usepackage{authblk}
    \usepackage{placeins}
    \usepackage{booktabs}
    \usepackage{ragged2e}
    \usepackage{array, tabularx,multirow, makecell}
    \usepackage{multicol}
    \usepackage{commath}
    \usepackage{dcolumn}
    \setcellgapes{3pt}
    \usepackage{hyperref}
    \usepackage{cleveref}
    \usepackage{subfig}  % to construct sub figures
    \usepackage{anysize}  % for page margins
    \usepackage{adjustbox}
    \usepackage{rotating} %to rotate tables
    \usepackage{pdflscape}

\begin{document}
    \begin{table}[ht]
    \centering
    \begin{tabular}{}
      & myEstVector.cf\_10 & myEstVector.cf\_25 & myEstVector.cf\_50 & myEstVector.cf\_75 & myEstVector.cf\_90 \\ 
     1 & 14.486 & 18.951 & 23.784 & 34.117** & 44.131** \\ 
      2 & (1.23) & (1.512) & (2.015) & (2.784) & (3.56) \\ 
      3 & -1.108 & -1.863 & -2.475 & -3.361* & -3.993* \\ 
      4 & (-0.846) & (-1.198) & (-1.671) & (-2.041) & (-2.537) \\ 
      5 & 0.504*** & 0.482*** & 0.425*** & 0.348*** & 0.292** \\ 
      6 & (4.77) & (5.507) & (4.846) & (4.136) & (3.07) \\ 
      7 & -0.808** & -0.434 & -0.129 & 0.027 & -0.023 \\ 
      8 & (-2.792) & (-1.412) & (-0.501) & (0.136) & (-0.119) \\ 
      9 & 0.001 & -0.001 & -0.002 & -0.003 & -0.003*** \\ 
      10 & (0.105) & (-0.129) & (-2.645) & (-4.392) & (-4.41) \\ 
      11 & -0.01 & -0.001 & 0.031 & 0.009 & -0.026 \\ 
      12 & (-0.237) & (-0.042) & (1.089) & (0.244) & (-0.728) \\ 
      13 & -0.108 & -0.14** & -0.087 & -0.052 & -0.016 \\ 
      14 & (-1.965) & (-2.545) & (-1.776) & (-1.394) & (-0.416) \\ 
      15 & -0.789** & -0.99** & -1.445*** & -1.424*** & -1.948*** \\ 
      16 & (-2.809) & (-3.079) & (-3.892) & (-4.021) & (-4.893) \\ 
      \end{tabular}
    \end{table}
\end {document}

当我在纺织品商店,我收到此错误

Package array Error: Empty preamble : `l' used. 
See the array package documentation for explanation. Type H <return> for immediate help.
...
l.393 \begin{tabular}{}
?

我正在使用 Texshop 并在 pdflatex 下编译此文件。有人能给出解决问题的建议吗?

注意:创建上表的 R 代码如下:

ltxtable=xtable(myNewTable,align=rep("",ncol(myNewTable)+1))
print(ltxtable, floating=TRUE, hline.after=NULL, include.rownames=TRUE, include.colnames=TRUE)

答案1

改变

ltxtable=xtable(myNewTable,align=rep("",ncol(myNewTable)+1)) 

ltxtable=xtable(myNewTable,align=rep("l",ncol(myNewTable)+1))

相关内容