我尝试在使用Appendix
时交叉引用character vector
中的rmarkdown
部分。实际上,character vector
函数中使用了stargazer
来引用Appendix
。以下是我的stargazer
函数-
stargazer(as.data.frame(sum_stat[c(
"DEGREE",
"EIGENVECTOR",
"BETWEENNESS",
"CLOSENESS",
"OVERALLCENTRALITY",
"LNASSETS",
"LEVERAGE",
"INVREC",
"LOSS",
"ROA",
"ZSCORE",
"MERGER",
"MTB",
"FOREIGN",
"EXTRAORDINARY",
"SEGMENT",
"SPECIALIZED",
"MATERIALWEAKNESS",
"RESTATEMENT",
"BIGN",
"GOINGCONCERN",
"CALENDARYEAR",
"LNNONAUDFEES",
"LNAUDFEES",
"AUDTURNOVER",
"RESTRUCTURE",
"LITIGATE",
"AGE",
"AUDITORTENURE",
"AUDITLAG",
"AUDFEES",
"NAUDFEES")]),
summary.stat = c("n", "mean", "sd", "p25", "median", "p75"),
column.sep.width = "1pt",
title= "Summary Stat of Variables", type = "latex",
label="tab:mysummarytable",
digits= 1,
header = FALSE,
notes.align = "l",
font.size = "scriptsize",
single.row = T,
no.space = T,
covariate.labels = sumstat_label,
notes = c(
"All variables are defined in Appendix A",
"All continuous variables are winsorized at 1 and 99 percent.",
"The Pctl (25(75)) corresponds to 25th and 75th percentile."
)
)
在notes
参数中,第一个元素是"All variables are defined in Appendix A"
。实际上,我想交叉引用,即notes
参数中的附录A 。我通过以下方式创建了文档的Appendix
部分-
\appendix
# (APPENDIX) Appendix {-}
# Appendix A
\label{appendix:a}
在rmarkdown
的正文中,我通过以下代码cross refer
\ref{appendix:a}
附录A ,该代码工作得很好。当我在以上\ref{appendix:a}
的{{1}}参数中使用notes
时,它不起作用。我像这样创建向量的第一个元素-stargazer
,它不起作用。
请注意,这是"All variables are defined in Appendix \ref{appendix:a}"
-
output
部分
YAML