Output.data.frame: Ausgabe von Tabellen

Description Usage Arguments Value Examples

View source: R/Output.data.frame.R

Description

Output.data.frame ist die Standart-Funktion fuer die Ausgabe. Sie Arbeitet mit htmlTable, die einzelnen Header-Ebenen werden ueber Header1_M, Header1_SD gesteuert. Auch die Funktionen Output.table und xtabl arbeiten ueber diese Funktion.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## S3 method for class 'data.frame'
Output(
  x,
  caption = NULL,
  note = NULL,
  output = which_output(),
  print_col = NULL,
  col_names = NULL,
  fix_colnames = options()$stp25$language != "",
  add_row = NULL,
  css.table = "padding-left: .5em; padding-right: .2em;",
  css.cell = "padding-left: .5em; padding-right: .2em;",
  booktabs = TRUE,
  latex_options = c("hold_position"),
  linesep = "",
  align = "l",
  ...
)

Arguments

x

dataframe

caption, note

Ueberschrift Fussnote

output

welcher output, text, html, markdown

print_col

Spalten nicht Ausgeben (data.frame)

col_names, fix_colnames

Spalten Ueberschrift aendern (data.frame)

css.table, css.cell, align

Format an Output.data.frame (htmlTable) padding-left: .5em; padding-right: .2em; Output.data.frame (htmlTable)

booktabs, latex_options

an kableExtra

linesep

linesep = "" linesep = c("", "", "\midrule")

...

Value

null

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#



df1 <- data.frame(
term = c("A", "B", "C", "D"),
n = c(23, 14, 56, 2),
m = c("4.7 (2.4)", "4.1 (2.3)", "8.9 (3.6)", NA)
)



df2 <- data.frame(
  term = c("A", "B", "C", "D"),
  G1_k_n = c(23, 14, 56, 2),
  G1_k_m = c("4.7 (2.4)", "4.1 (2.3)", "8.9 (3.6)", NA),
  G2_n = c(33, 35, 78, 21),
  G2_m = c("4.9 (2.7)", "4.7 (2.5)", "4.1 (5.6)", "4.2 (5.6)")
  )
#+ df-default ,  results='asis'
df1 %>% Output()

#+ df-false ,  results='asis'
df1 %>% Output(output=FALSE)

#+ df-true
df1 %>% Output(output=TRUE)

#+ df-html
df1 %>% Output(output="html")

#+ df-text ,  results='asis'
df1 %>% Output(output="text")

#+ df-word ,  results='asis'
df1 %>% Output(output="word")


#+ df-mark
df1 %>% Output(output="markdown")



# df1 %>%  Output(linesep = c("", "", "\midrule"))

stp4/stp25output documentation built on Sept. 19, 2021, 11:56 a.m.