Я пытаюсь создать таблицу (для включения в таблицу MSFT Word), подобную приведенной здесь:
https://github.com/dcomtois/summarytools
3 - descr (): описательная одномерная статистика
Однако
descr(iris, style = "rmarkdown")
style = "rmarkdown" is actually set as an st_options() - see below
Как указано в тексте, НЕ создает таблицу, которая следует в документе.
view(descr(iris, style = "rmarkdown"))
НЕ создает таблицу, которая следует вдокумент - как сделать следующее.
view(descr(iris), "browser")
print(descr(iris), "browser")
view(descr(iris), "viewer")
print(descr(iris), "viewer")
Следующее создает таблицу в форме для "Использование pander с knitr" (см .: http://rapporter.github.io/pander/knitr.html)
view(descr(iris), "pander")
print(descr(iris), "pander")
Рядом с Iмогу сказать (на данный момент), мне нужно изучить knitr (https://yihui.name/knitr/) - работать над этим.
С риском быть слишком многословным, вот мое "окружение":
R version 3.5.1 (2018-07-02) -- "Feather Spray"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
library(summarytools)
library(dplyr)
library(data.table)
library(pander)
library(knitr)
library(rmarkdown)
<<<<<< в начале источника </p>
st_options(bootstrap.css = FALSE, # Already part of the theme so no need for it
plain.ascii = FALSE, # One of the essential settings
style = "rmarkdown", # Idem.
dfSummary.silent = TRUE, # Suppresses messages about temporary files
footnote = NA, # Keeping the results minimalistic
subtitle.emphasis = FALSE) # For the vignette theme, this gives much better results.
st_css()
library(knitr)
opts_chunk$set(comment = NA, prompt = FALSE, cache = FALSE, echo = TRUE, results = 'asis')
library(tables)