0
kable을 사용하여 실키 테이블을 인쇄하고 싶습니다.
마크 다운에서 코드를 실행할 때 실마리 테이블을 가져 오지만 표 앞에 해당 줄 사이에 부호가 |
인 여러 줄이 표시됩니다.
또한 처음에 경고 메시지가 :kable 여러 줄이있는 시가 테이블을 인쇄합니다.
Warning in kable_markdown(x = structure(c("", "<table style=\"text-
align:center\"><caption><strong>Crude models: OR for mRS at discharge >3
with 95% CI</strong></caption>", : The table should have a header (column
names)
내 출력은 다음과 같습니다
:이 (일부 변경) 테이블에 대한 내 코드입니다
mod.example1 <- glm(bad_outcome~x1+x2+x3+x4, family = "binomial", data = dat0)
mod.example2 <- glm(bad_outcome~x1+x2+x3+x4, family = "binomial", data = dat1)
CI.list <- list(exp(confint(mod.example1)),exp(confint(mod.example2)))
my.stg <- stargazer(
title = "my models: OR for bad outcome",
mod.example1
mod.example2,
type="html",
digits = 2,
t.auto = FALSE,
model.numbers = F,
keep.stat = "n",
report = c("vc*sp"),
omit = "Constant",
star.cutoffs = c(0.05,0.01,0.001),
no.space = FALSE,
single.row = F,
dep.var.labels = c("***bad outcome***"),
covariate.labels = c("x1","x2","x3","x4"),
column.labels = c("-**dat0**-", "-**dat1**-"),
ci= T,
ci.custom = CI.list,
apply.coef=exp)
및 새 청크에서 :
kable(my.stg)
표가 인쇄되지만 여러 줄/직사각형 뒤에 만 인쇄됩니다. 다른 컴퓨터에서 코드를 실행 한 다음 문제가 발생하지 않았습니다. 이 문제의 원인은 무엇일까요?
안녕하세요 @ michal, 당신은 실제 코드/테이블을 제공 할 수 있습니까? – Johnny
안녕하세요 @ 조니, 방금 원래 질문을 수정하고 샘플 코드를 추가했습니다. 고맙습니다! – michal