pandoc.table.return: Create a table

Description Usage Arguments Details Value Note References See Also Examples

View source: R/pandoc.R

Description

Creates a Pandoc's markdown style table with optional caption and some other tweaks. See 'Details' below.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
pandoc.table.return(t, caption, digits = panderOptions("digits"),
  decimal.mark = panderOptions("decimal.mark"),
  big.mark = panderOptions("big.mark"), round = panderOptions("round"),
  missing = panderOptions("missing"), justify, style = c("multiline",
  "grid", "simple", "rmarkdown", "jira"),
  split.tables = panderOptions("table.split.table"),
  split.cells = panderOptions("table.split.cells"),
  keep.trailing.zeros = panderOptions("keep.trailing.zeros"),
  keep.line.breaks = panderOptions("keep.line.breaks"),
  plain.ascii = panderOptions("plain.ascii"),
  use.hyphening = panderOptions("use.hyphening"), row.names, col.names,
  emphasize.rownames = panderOptions("table.emphasize.rownames"),
  emphasize.rows, emphasize.cols, emphasize.cells, emphasize.strong.rows,
  emphasize.strong.cols, emphasize.strong.cells, emphasize.italics.rows,
  emphasize.italics.cols, emphasize.italics.cells, emphasize.verbatim.rows,
  emphasize.verbatim.cols, emphasize.verbatim.cells, ...)

Arguments

t

data frame, matrix or table

caption

caption (string) to be shown under the table

digits

passed to format. Can be a vector specifying values for each column (has to be the same length as number of columns).

decimal.mark

passed to format

big.mark

passed to format

round

passed to round. Can be a vector specifying values for each column (has to be the same length as number of columns). Values for non-numeric columns will be disregarded.

missing

string to replace missing values

justify

defines alignment in cells passed to format. Can be left, right or centre, which latter can be also spelled as center. Defaults to centre. Can be abbreviated to a string consisting of the letters l, c and r (e.g. 'lcr' instead of c('left', 'centre', 'right').

style

which Pandoc style to use: simple, multiline, grid or rmarkdown

split.tables

where to split wide tables to separate tables. The default value (80) suggests the conventional number of characters used in a line, feel free to change (e.g. to Inf to disable this feature) if you are not using a VT100 terminal any more :)

split.cells

where to split cells' text with line breaks. Default to 30, to disable set to Inf. Can be also supplied as a vector, for each cell separately (if length(split.cells) == number of columns + 1, then first value in split.cells if for row names, and others are for columns). Supports relative (percentage) parameters in combination with split.tables.

keep.trailing.zeros

to show or remove trailing zeros in numbers on a column basis width

keep.line.breaks

(default: FALSE) if to keep or remove line breaks from cells in a table

plain.ascii

(default: FALSE) if output should be in plain ascii (without markdown markup) or not

use.hyphening

boolean (default: FALSE) if try to use hyphening when splitting large cells according to table.split.cells. Requires sylly.

row.names

if FALSE, row names are suppressed. A character vector of row names can also be specified here. By default, row names are included if rownames(t) is neither NULL nor identical to 1:nrow(x)

col.names

a character vector of column names to be used in the table

emphasize.rownames

boolean (default: TRUE) if row names should be highlighted

emphasize.rows

deprecated for emphasize.italics.rows argument

emphasize.cols

deprecated for emphasize.italics.cols argument

emphasize.cells

deprecated for emphasize.italics.cells argument

emphasize.strong.rows

see emphasize.italics.rows but in bold

emphasize.strong.cols

see emphasize.italics.cols but in bold

emphasize.strong.cells

see emphasize.italics.cells but in bold

emphasize.italics.rows

a vector for a two dimensional table specifying which rows to emphasize

emphasize.italics.cols

a vector for a two dimensional table specifying which cols to emphasize

emphasize.italics.cells

a vector for one-dimensional tables or a matrix like structure with two columns for row and column indexes to be emphasized in two dimensional tables. See e.g. which(..., arr.ind = TRUE)

emphasize.verbatim.rows

see emphasize.italics.rows but in verbatim

emphasize.verbatim.cols

see emphasize.italics.cols but in verbatim

emphasize.verbatim.cells

see emphasize.italics.cells but in verbatim

...

unsupported extra arguments directly placed into /dev/null

Details

This function takes any tabular data as its first argument and will try to make it pretty like: rounding and applying digits and custom decimal.mark to numbers, auto-recognizing if row names should be included, setting alignment of cells and dropping trailing zeros by default.

pandoc.table also tries to split large cells with line breaks or even the whole table to separate parts on demand. Other arguments lets the use to highlight some rows/cells/cells in the table with italic or bold text style.

For more details please see the parameters above and passed arguments of panderOptions.

Value

By default this function outputs (see: cat) the result. If you would want to catch the result instead, then call pandoc.table.return instead.

Note

If caption is missing, then the value is first checked in t object's caption attribute and if not found in an internal buffer set by link{set.caption}. justify parameter works similarly, see set.alignment for details.

References

John MacFarlane (2012): _Pandoc User's Guide_. http://johnmacfarlane.net/pandoc/README.html

See Also

set.caption, set.alignment

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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
pandoc.table(mtcars)

# caption
pandoc.table(mtcars, 'Motor Trend Car Road Tests')

# other input/output formats
pandoc.table(mtcars[, 1:3], decimal.mark = ',')
pandoc.table(mtcars[, 1:3], decimal.mark = ',', justify = 'right')
pandoc.table(matrix(sample(1:1000, 25), 5, 5))
pandoc.table(matrix(runif(25), 5, 5))
pandoc.table(matrix(runif(25), 5, 5), digits = 5)
pandoc.table(matrix(runif(25),5,5), round = 1)
pandoc.table(table(mtcars$am))
pandoc.table(table(mtcars$am, mtcars$gear))
pandoc.table(table(state.division, state.region))
pandoc.table(table(state.division, state.region), justify = 'centre')

m <- data.frame(a = c(1, -500, 10320, 23, 77),
  b = runif(5),
  c = c('a', 'bb', 'ccc', 'dddd', 'eeeee'))
pandoc.table(m)
pandoc.table(m, justify = c('right', 'left', 'centre'))
pandoc.table(m, justify = 'rlc') # Same as upper statement

## splitting up too wide tables
pandoc.table(mtcars)
pandoc.table(mtcars, caption = 'Only once after the first part!')

## tables with line breaks in cells
## NOTE: line breaks are removed from table content in case keep.line.breaks is set to FALSE
## and added automatically based on "split.cells" parameter!
t <- data.frame(a = c('hundreds\nof\nmouses', '3 cats'), b=c('FOO is nice', 'BAR\nBAR2'))
pandoc.table(t)
pandoc.table(t, split.cells = 5)

## exporting tables in other Pandoc styles
pandoc.table(m)
pandoc.table(m, style = "grid")
pandoc.table(m, style = "simple")
pandoc.table(t, style = "grid")
pandoc.table(t, style = "grid", split.cells = 5)
tryCatch(pandoc.table(t, style = "simple", split.cells = 5),
  error = function(e) 'Yeah, no newline support in simple tables')

## highlight cells
t <- mtcars[1:3, 1:5]
pandoc.table(t$mpg, emphasize.italics.cells = 1)
pandoc.table(t$mpg, emphasize.strong.cells = 1)
pandoc.table(t$mpg, emphasize.italics.cells = 1, emphasize.strong.cells = 1)
pandoc.table(t$mpg, emphasize.italics.cells = 1:2)
pandoc.table(t$mpg, emphasize.strong.cells = 1:2)
pandoc.table(t, emphasize.italics.cells = which(t > 20, arr.ind = TRUE))
pandoc.table(t, emphasize.italics.cells = which(t == 6, arr.ind = TRUE))
pandoc.table(t, emphasize.verbatim.cells = which(t == 6, arr.ind = TRUE))
pandoc.table(t, emphasize.verbatim.cells = which(t == 6, arr.ind = TRUE),
 emphasize.italics.rows = 1)
## with helpers
emphasize.cols(1)
emphasize.rows(1)
pandoc.table(t)

emphasize.strong.cells(which(t > 20, arr.ind = TRUE))
pandoc.table(t)

### plain.ascii
pandoc.table(mtcars[1:3, 1:3], plain.ascii = TRUE)

### keep.line.breaks
x <- data.frame(a="Pandoc\nPackage")
pandoc.table(x)
pandoc.table(x, keep.line.breaks = TRUE)

## split.cells
x <- data.frame(a = "foo bar", b = "foo bar")
pandoc.table(x, split.cells = 4)
pandoc.table(x, split.cells = 7)
pandoc.table(x, split.cells = c(4, 7))
pandoc.table(x, split.cells = c("20%", "80%"), split.tables = 30)

y <- c("aa aa aa", "aaa aaa", "a a a a a", "aaaaa", "bbbb bbbb bbbb", "bb bbb bbbb")
y <- matrix(y, ncol = 3, nrow = 2)
rownames(y) <- c("rowname one", "rowname two")
colnames(y) <- c("colname one", "colname two", "colname three")
pandoc.table(y, split.cells = 2)
pandoc.table(y, split.cells = 6)
pandoc.table(y, split.cells = c(2, 6, 10))
pandoc.table(y, split.cells = c(2, Inf, Inf))

## first value used for rownames
pander(y, split.cells = c(5, 2, Inf, Inf))
pandoc.table(y, split.cells = c(5, 2, Inf, 5, 3, 10))

## when not enough reverting to default values
pandoc.table(y, split.cells = c(5, 2))

## split.cells with hyphenation
x <- data.frame(a = "Can be also supplied as a vector, for each cell separately",
       b = "Can be also supplied as a vector, for each cell separately")
pandoc.table(x, split.cells = 10, use.hyphening = TRUE)

Example output

sh: 1: cannot create /dev/null: Permission denied

--------------------------------------------------------------------------------
         &nbsp;            mpg    cyl   disp    hp    drat    wt     qsec    vs 
------------------------- ------ ----- ------- ----- ------ ------- ------- ----
      **Mazda RX4**         21     6     160    110   3.9    2.62    16.46   0  

    **Mazda RX4 Wag**       21     6     160    110   3.9    2.875   17.02   0  

     **Datsun 710**        22.8    4     108    93    3.85   2.32    18.61   1  

   **Hornet 4 Drive**      21.4    6     258    110   3.08   3.215   19.44   1  

  **Hornet Sportabout**    18.7    8     360    175   3.15   3.44    17.02   0  

       **Valiant**         18.1    6     225    105   2.76   3.46    20.22   1  

     **Duster 360**        14.3    8     360    245   3.21   3.57    15.84   0  

      **Merc 240D**        24.4    4    146.7   62    3.69   3.19     20     1  

      **Merc 230**         22.8    4    140.8   95    3.92   3.15    22.9    1  

      **Merc 280**         19.2    6    167.6   123   3.92   3.44    18.3    1  

      **Merc 280C**        17.8    6    167.6   123   3.92   3.44    18.9    1  

     **Merc 450SE**        16.4    8    275.8   180   3.07   4.07    17.4    0  

     **Merc 450SL**        17.3    8    275.8   180   3.07   3.73    17.6    0  

     **Merc 450SLC**       15.2    8    275.8   180   3.07   3.78     18     0  

 **Cadillac Fleetwood**    10.4    8     472    205   2.93   5.25    17.98   0  

 **Lincoln Continental**   10.4    8     460    215    3     5.424   17.82   0  

  **Chrysler Imperial**    14.7    8     440    230   3.23   5.345   17.42   0  

      **Fiat 128**         32.4    4    78.7    66    4.08    2.2    19.47   1  

     **Honda Civic**       30.4    4    75.7    52    4.93   1.615   18.52   1  

   **Toyota Corolla**      33.9    4    71.1    65    4.22   1.835   19.9    1  

    **Toyota Corona**      21.5    4    120.1   97    3.7    2.465   20.01   1  

  **Dodge Challenger**     15.5    8     318    150   2.76   3.52    16.87   0  

     **AMC Javelin**       15.2    8     304    150   3.15   3.435   17.3    0  

     **Camaro Z28**        13.3    8     350    245   3.73   3.84    15.41   0  

  **Pontiac Firebird**     19.2    8     400    175   3.08   3.845   17.05   0  

      **Fiat X1-9**        27.3    4     79     66    4.08   1.935   18.9    1  

    **Porsche 914-2**       26     4    120.3   91    4.43   2.14    16.7    0  

    **Lotus Europa**       30.4    4    95.1    113   3.77   1.513   16.9    1  

   **Ford Pantera L**      15.8    8     351    264   4.22   3.17    14.5    0  

    **Ferrari Dino**       19.7    6     145    175   3.62   2.77    15.5    0  

    **Maserati Bora**       15     8     301    335   3.54   3.57    14.6    0  

     **Volvo 142E**        21.4    4     121    109   4.11   2.78    18.6    1  
--------------------------------------------------------------------------------

Table: Table continues below

 
--------------------------------------------
         &nbsp;            am   gear   carb 
------------------------- ---- ------ ------
      **Mazda RX4**        1     4      4   

    **Mazda RX4 Wag**      1     4      4   

     **Datsun 710**        1     4      1   

   **Hornet 4 Drive**      0     3      1   

  **Hornet Sportabout**    0     3      2   

       **Valiant**         0     3      1   

     **Duster 360**        0     3      4   

      **Merc 240D**        0     4      2   

      **Merc 230**         0     4      2   

      **Merc 280**         0     4      4   

      **Merc 280C**        0     4      4   

     **Merc 450SE**        0     3      3   

     **Merc 450SL**        0     3      3   

     **Merc 450SLC**       0     3      3   

 **Cadillac Fleetwood**    0     3      4   

 **Lincoln Continental**   0     3      4   

  **Chrysler Imperial**    0     3      4   

      **Fiat 128**         1     4      1   

     **Honda Civic**       1     4      2   

   **Toyota Corolla**      1     4      1   

    **Toyota Corona**      0     3      1   

  **Dodge Challenger**     0     3      2   

     **AMC Javelin**       0     3      2   

     **Camaro Z28**        0     3      4   

  **Pontiac Firebird**     0     3      2   

      **Fiat X1-9**        1     4      1   

    **Porsche 914-2**      1     5      2   

    **Lotus Europa**       1     5      2   

   **Ford Pantera L**      1     5      4   

    **Ferrari Dino**       1     5      6   

    **Maserati Bora**      1     5      8   

     **Volvo 142E**        1     4      2   
--------------------------------------------


--------------------------------------------------------------------------------
         &nbsp;            mpg    cyl   disp    hp    drat    wt     qsec    vs 
------------------------- ------ ----- ------- ----- ------ ------- ------- ----
      **Mazda RX4**         21     6     160    110   3.9    2.62    16.46   0  

    **Mazda RX4 Wag**       21     6     160    110   3.9    2.875   17.02   0  

     **Datsun 710**        22.8    4     108    93    3.85   2.32    18.61   1  

   **Hornet 4 Drive**      21.4    6     258    110   3.08   3.215   19.44   1  

  **Hornet Sportabout**    18.7    8     360    175   3.15   3.44    17.02   0  

       **Valiant**         18.1    6     225    105   2.76   3.46    20.22   1  

     **Duster 360**        14.3    8     360    245   3.21   3.57    15.84   0  

      **Merc 240D**        24.4    4    146.7   62    3.69   3.19     20     1  

      **Merc 230**         22.8    4    140.8   95    3.92   3.15    22.9    1  

      **Merc 280**         19.2    6    167.6   123   3.92   3.44    18.3    1  

      **Merc 280C**        17.8    6    167.6   123   3.92   3.44    18.9    1  

     **Merc 450SE**        16.4    8    275.8   180   3.07   4.07    17.4    0  

     **Merc 450SL**        17.3    8    275.8   180   3.07   3.73    17.6    0  

     **Merc 450SLC**       15.2    8    275.8   180   3.07   3.78     18     0  

 **Cadillac Fleetwood**    10.4    8     472    205   2.93   5.25    17.98   0  

 **Lincoln Continental**   10.4    8     460    215    3     5.424   17.82   0  

  **Chrysler Imperial**    14.7    8     440    230   3.23   5.345   17.42   0  

      **Fiat 128**         32.4    4    78.7    66    4.08    2.2    19.47   1  

     **Honda Civic**       30.4    4    75.7    52    4.93   1.615   18.52   1  

   **Toyota Corolla**      33.9    4    71.1    65    4.22   1.835   19.9    1  

    **Toyota Corona**      21.5    4    120.1   97    3.7    2.465   20.01   1  

  **Dodge Challenger**     15.5    8     318    150   2.76   3.52    16.87   0  

     **AMC Javelin**       15.2    8     304    150   3.15   3.435   17.3    0  

     **Camaro Z28**        13.3    8     350    245   3.73   3.84    15.41   0  

  **Pontiac Firebird**     19.2    8     400    175   3.08   3.845   17.05   0  

      **Fiat X1-9**        27.3    4     79     66    4.08   1.935   18.9    1  

    **Porsche 914-2**       26     4    120.3   91    4.43   2.14    16.7    0  

    **Lotus Europa**       30.4    4    95.1    113   3.77   1.513   16.9    1  

   **Ford Pantera L**      15.8    8     351    264   4.22   3.17    14.5    0  

    **Ferrari Dino**       19.7    6     145    175   3.62   2.77    15.5    0  

    **Maserati Bora**       15     8     301    335   3.54   3.57    14.6    0  

     **Volvo 142E**        21.4    4     121    109   4.11   2.78    18.6    1  
--------------------------------------------------------------------------------

Table: Motor Trend Car Road Tests (continued below)

 
--------------------------------------------
         &nbsp;            am   gear   carb 
------------------------- ---- ------ ------
      **Mazda RX4**        1     4      4   

    **Mazda RX4 Wag**      1     4      4   

     **Datsun 710**        1     4      1   

   **Hornet 4 Drive**      0     3      1   

  **Hornet Sportabout**    0     3      2   

       **Valiant**         0     3      1   

     **Duster 360**        0     3      4   

      **Merc 240D**        0     4      2   

      **Merc 230**         0     4      2   

      **Merc 280**         0     4      4   

      **Merc 280C**        0     4      4   

     **Merc 450SE**        0     3      3   

     **Merc 450SL**        0     3      3   

     **Merc 450SLC**       0     3      3   

 **Cadillac Fleetwood**    0     3      4   

 **Lincoln Continental**   0     3      4   

  **Chrysler Imperial**    0     3      4   

      **Fiat 128**         1     4      1   

     **Honda Civic**       1     4      2   

   **Toyota Corolla**      1     4      1   

    **Toyota Corona**      0     3      1   

  **Dodge Challenger**     0     3      2   

     **AMC Javelin**       0     3      2   

     **Camaro Z28**        0     3      4   

  **Pontiac Firebird**     0     3      2   

      **Fiat X1-9**        1     4      1   

    **Porsche 914-2**      1     5      2   

    **Lotus Europa**       1     5      2   

   **Ford Pantera L**      1     5      4   

    **Ferrari Dino**       1     5      6   

    **Maserati Bora**      1     5      8   

     **Volvo 142E**        1     4      2   
--------------------------------------------


----------------------------------------------
         &nbsp;            mpg    cyl   disp  
------------------------- ------ ----- -------
      **Mazda RX4**         21     6     160  

    **Mazda RX4 Wag**       21     6     160  

     **Datsun 710**        22,8    4     108  

   **Hornet 4 Drive**      21,4    6     258  

  **Hornet Sportabout**    18,7    8     360  

       **Valiant**         18,1    6     225  

     **Duster 360**        14,3    8     360  

      **Merc 240D**        24,4    4    146,7 

      **Merc 230**         22,8    4    140,8 

      **Merc 280**         19,2    6    167,6 

      **Merc 280C**        17,8    6    167,6 

     **Merc 450SE**        16,4    8    275,8 

     **Merc 450SL**        17,3    8    275,8 

     **Merc 450SLC**       15,2    8    275,8 

 **Cadillac Fleetwood**    10,4    8     472  

 **Lincoln Continental**   10,4    8     460  

  **Chrysler Imperial**    14,7    8     440  

      **Fiat 128**         32,4    4    78,7  

     **Honda Civic**       30,4    4    75,7  

   **Toyota Corolla**      33,9    4    71,1  

    **Toyota Corona**      21,5    4    120,1 

  **Dodge Challenger**     15,5    8     318  

     **AMC Javelin**       15,2    8     304  

     **Camaro Z28**        13,3    8     350  

  **Pontiac Firebird**     19,2    8     400  

      **Fiat X1-9**        27,3    4     79   

    **Porsche 914-2**       26     4    120,3 

    **Lotus Europa**       30,4    4    95,1  

   **Ford Pantera L**      15,8    8     351  

    **Ferrari Dino**       19,7    6     145  

    **Maserati Bora**       15     8     301  

     **Volvo 142E**        21,4    4     121  
----------------------------------------------


----------------------------------------------
                   &nbsp;    mpg   cyl    disp
------------------------- ------ ----- -------
            **Mazda RX4**     21     6     160

        **Mazda RX4 Wag**     21     6     160

           **Datsun 710**   22,8     4     108

       **Hornet 4 Drive**   21,4     6     258

    **Hornet Sportabout**   18,7     8     360

              **Valiant**   18,1     6     225

           **Duster 360**   14,3     8     360

            **Merc 240D**   24,4     4   146,7

             **Merc 230**   22,8     4   140,8

             **Merc 280**   19,2     6   167,6

            **Merc 280C**   17,8     6   167,6

           **Merc 450SE**   16,4     8   275,8

           **Merc 450SL**   17,3     8   275,8

          **Merc 450SLC**   15,2     8   275,8

   **Cadillac Fleetwood**   10,4     8     472

  **Lincoln Continental**   10,4     8     460

    **Chrysler Imperial**   14,7     8     440

             **Fiat 128**   32,4     4    78,7

          **Honda Civic**   30,4     4    75,7

       **Toyota Corolla**   33,9     4    71,1

        **Toyota Corona**   21,5     4   120,1

     **Dodge Challenger**   15,5     8     318

          **AMC Javelin**   15,2     8     304

           **Camaro Z28**   13,3     8     350

     **Pontiac Firebird**   19,2     8     400

            **Fiat X1-9**   27,3     4      79

        **Porsche 914-2**     26     4   120,3

         **Lotus Europa**   30,4     4    95,1

       **Ford Pantera L**   15,8     8     351

         **Ferrari Dino**   19,7     6     145

        **Maserati Bora**     15     8     301

           **Volvo 142E**   21,4     4     121
----------------------------------------------


----- ----- ----- ----- -----
 152   248   132   474   520 

 56    371   50    915   134 

 688   189   20    172   635 

 626   242   305   40    149 

 472   369   55    465   961 
----- ----- ----- ----- -----


-------- --------- --------- -------- ---------
 0.3902   0.9365    0.08853   0.3939   0.8544  

 0.7534   0.3919    0.5773    0.3344   0.9183  

 0.3164   0.07706   0.01261   0.2302   0.04767 

 0.4484   0.7936    0.2097    0.3869   0.6349  

 0.3995   0.1168    0.2441    0.2274   0.05252 
-------- --------- --------- -------- ---------


---------- ---------- --------- --------- ----------
 0.33388    0.063422   0.14148   0.89884   0.05796  

 0.59527    0.43568    0.56928   0.56753   0.040336 

 0.98738    0.42013    0.73727   0.58832   0.49851  

 0.22985    0.010955   0.92914   0.32368   0.84911  

 0.029373   0.46958    0.78984   0.75223   0.062249 
---------- ---------- --------- --------- ----------


----- ----- ----- ----- -----
 0.8   0.6   0.4   0.9    1  

 0.8   0.5   0.2   0.3   0.7 

 0.6   0.6   0.2   0.7   0.1 

 0.4   0.5    1    0.8   0.6 

 0.8   0.5   0.7   0.1   0.8 
----- ----- ----- ----- -----


---------
 0    1  
---- ----
 19   13 
---------


---------------------
 &nbsp;   3    4   5 
-------- ---- --- ---
 **0**    15   4   0 

 **1**    0    8   5 
---------------------


-------------------------------------------------------------------
         &nbsp;           Northeast   South   North Central   West 
------------------------ ----------- ------- --------------- ------
    **New England**           6         0           0          0   

  **Middle Atlantic**         3         0           0          0   

   **South Atlantic**         0         8           0          0   

 **East South Central**       0         4           0          0   

 **West South Central**       0         4           0          0   

 **East North Central**       0         0           5          0   

 **West North Central**       0         0           7          0   

      **Mountain**            0         0           0          8   

      **Pacific**             0         0           0          5   
-------------------------------------------------------------------


-------------------------------------------------------------------
         &nbsp;           Northeast   South   North Central   West 
------------------------ ----------- ------- --------------- ------
    **New England**           6         0           0          0   

  **Middle Atlantic**         3         0           0          0   

   **South Atlantic**         0         8           0          0   

 **East South Central**       0         4           0          0   

 **West South Central**       0         4           0          0   

 **East North Central**       0         0           5          0   

 **West North Central**       0         0           7          0   

      **Mountain**            0         0           0          8   

      **Pacific**             0         0           0          5   
-------------------------------------------------------------------


------------------------
   a       b        c   
------- -------- -------
   1     0.8547     a   

 -500    0.7803    bb   

 10320   0.2939    ccc  

  23     0.9799   dddd  

  77     0.9584   eeeee 
------------------------


------------------------
      a b           c   
------- -------- -------
      1 0.8547      a   

   -500 0.7803     bb   

  10320 0.2939     ccc  

     23 0.9799    dddd  

     77 0.9584    eeeee 
------------------------


------------------------
      a b           c   
------- -------- -------
      1 0.8547      a   

   -500 0.7803     bb   

  10320 0.2939     ccc  

     23 0.9799    dddd  

     77 0.9584    eeeee 
------------------------


--------------------------------------------------------------------------------
         &nbsp;            mpg    cyl   disp    hp    drat    wt     qsec    vs 
------------------------- ------ ----- ------- ----- ------ ------- ------- ----
      **Mazda RX4**         21     6     160    110   3.9    2.62    16.46   0  

    **Mazda RX4 Wag**       21     6     160    110   3.9    2.875   17.02   0  

     **Datsun 710**        22.8    4     108    93    3.85   2.32    18.61   1  

   **Hornet 4 Drive**      21.4    6     258    110   3.08   3.215   19.44   1  

  **Hornet Sportabout**    18.7    8     360    175   3.15   3.44    17.02   0  

       **Valiant**         18.1    6     225    105   2.76   3.46    20.22   1  

     **Duster 360**        14.3    8     360    245   3.21   3.57    15.84   0  

      **Merc 240D**        24.4    4    146.7   62    3.69   3.19     20     1  

      **Merc 230**         22.8    4    140.8   95    3.92   3.15    22.9    1  

      **Merc 280**         19.2    6    167.6   123   3.92   3.44    18.3    1  

      **Merc 280C**        17.8    6    167.6   123   3.92   3.44    18.9    1  

     **Merc 450SE**        16.4    8    275.8   180   3.07   4.07    17.4    0  

     **Merc 450SL**        17.3    8    275.8   180   3.07   3.73    17.6    0  

     **Merc 450SLC**       15.2    8    275.8   180   3.07   3.78     18     0  

 **Cadillac Fleetwood**    10.4    8     472    205   2.93   5.25    17.98   0  

 **Lincoln Continental**   10.4    8     460    215    3     5.424   17.82   0  

  **Chrysler Imperial**    14.7    8     440    230   3.23   5.345   17.42   0  

      **Fiat 128**         32.4    4    78.7    66    4.08    2.2    19.47   1  

     **Honda Civic**       30.4    4    75.7    52    4.93   1.615   18.52   1  

   **Toyota Corolla**      33.9    4    71.1    65    4.22   1.835   19.9    1  

    **Toyota Corona**      21.5    4    120.1   97    3.7    2.465   20.01   1  

  **Dodge Challenger**     15.5    8     318    150   2.76   3.52    16.87   0  

     **AMC Javelin**       15.2    8     304    150   3.15   3.435   17.3    0  

     **Camaro Z28**        13.3    8     350    245   3.73   3.84    15.41   0  

  **Pontiac Firebird**     19.2    8     400    175   3.08   3.845   17.05   0  

      **Fiat X1-9**        27.3    4     79     66    4.08   1.935   18.9    1  

    **Porsche 914-2**       26     4    120.3   91    4.43   2.14    16.7    0  

    **Lotus Europa**       30.4    4    95.1    113   3.77   1.513   16.9    1  

   **Ford Pantera L**      15.8    8     351    264   4.22   3.17    14.5    0  

    **Ferrari Dino**       19.7    6     145    175   3.62   2.77    15.5    0  

    **Maserati Bora**       15     8     301    335   3.54   3.57    14.6    0  

     **Volvo 142E**        21.4    4     121    109   4.11   2.78    18.6    1  
--------------------------------------------------------------------------------

Table: Table continues below

 
--------------------------------------------
         &nbsp;            am   gear   carb 
------------------------- ---- ------ ------
      **Mazda RX4**        1     4      4   

    **Mazda RX4 Wag**      1     4      4   

     **Datsun 710**        1     4      1   

   **Hornet 4 Drive**      0     3      1   

  **Hornet Sportabout**    0     3      2   

       **Valiant**         0     3      1   

     **Duster 360**        0     3      4   

      **Merc 240D**        0     4      2   

      **Merc 230**         0     4      2   

      **Merc 280**         0     4      4   

      **Merc 280C**        0     4      4   

     **Merc 450SE**        0     3      3   

     **Merc 450SL**        0     3      3   

     **Merc 450SLC**       0     3      3   

 **Cadillac Fleetwood**    0     3      4   

 **Lincoln Continental**   0     3      4   

  **Chrysler Imperial**    0     3      4   

      **Fiat 128**         1     4      1   

     **Honda Civic**       1     4      2   

   **Toyota Corolla**      1     4      1   

    **Toyota Corona**      0     3      1   

  **Dodge Challenger**     0     3      2   

     **AMC Javelin**       0     3      2   

     **Camaro Z28**        0     3      4   

  **Pontiac Firebird**     0     3      2   

      **Fiat X1-9**        1     4      1   

    **Porsche 914-2**      1     5      2   

    **Lotus Europa**       1     5      2   

   **Ford Pantera L**      1     5      4   

    **Ferrari Dino**       1     5      6   

    **Maserati Bora**      1     5      8   

     **Volvo 142E**        1     4      2   
--------------------------------------------


--------------------------------------------------------------------------------
         &nbsp;            mpg    cyl   disp    hp    drat    wt     qsec    vs 
------------------------- ------ ----- ------- ----- ------ ------- ------- ----
      **Mazda RX4**         21     6     160    110   3.9    2.62    16.46   0  

    **Mazda RX4 Wag**       21     6     160    110   3.9    2.875   17.02   0  

     **Datsun 710**        22.8    4     108    93    3.85   2.32    18.61   1  

   **Hornet 4 Drive**      21.4    6     258    110   3.08   3.215   19.44   1  

  **Hornet Sportabout**    18.7    8     360    175   3.15   3.44    17.02   0  

       **Valiant**         18.1    6     225    105   2.76   3.46    20.22   1  

     **Duster 360**        14.3    8     360    245   3.21   3.57    15.84   0  

      **Merc 240D**        24.4    4    146.7   62    3.69   3.19     20     1  

      **Merc 230**         22.8    4    140.8   95    3.92   3.15    22.9    1  

      **Merc 280**         19.2    6    167.6   123   3.92   3.44    18.3    1  

      **Merc 280C**        17.8    6    167.6   123   3.92   3.44    18.9    1  

     **Merc 450SE**        16.4    8    275.8   180   3.07   4.07    17.4    0  

     **Merc 450SL**        17.3    8    275.8   180   3.07   3.73    17.6    0  

     **Merc 450SLC**       15.2    8    275.8   180   3.07   3.78     18     0  

 **Cadillac Fleetwood**    10.4    8     472    205   2.93   5.25    17.98   0  

 **Lincoln Continental**   10.4    8     460    215    3     5.424   17.82   0  

  **Chrysler Imperial**    14.7    8     440    230   3.23   5.345   17.42   0  

      **Fiat 128**         32.4    4    78.7    66    4.08    2.2    19.47   1  

     **Honda Civic**       30.4    4    75.7    52    4.93   1.615   18.52   1  

   **Toyota Corolla**      33.9    4    71.1    65    4.22   1.835   19.9    1  

    **Toyota Corona**      21.5    4    120.1   97    3.7    2.465   20.01   1  

  **Dodge Challenger**     15.5    8     318    150   2.76   3.52    16.87   0  

     **AMC Javelin**       15.2    8     304    150   3.15   3.435   17.3    0  

     **Camaro Z28**        13.3    8     350    245   3.73   3.84    15.41   0  

  **Pontiac Firebird**     19.2    8     400    175   3.08   3.845   17.05   0  

      **Fiat X1-9**        27.3    4     79     66    4.08   1.935   18.9    1  

    **Porsche 914-2**       26     4    120.3   91    4.43   2.14    16.7    0  

    **Lotus Europa**       30.4    4    95.1    113   3.77   1.513   16.9    1  

   **Ford Pantera L**      15.8    8     351    264   4.22   3.17    14.5    0  

    **Ferrari Dino**       19.7    6     145    175   3.62   2.77    15.5    0  

    **Maserati Bora**       15     8     301    335   3.54   3.57    14.6    0  

     **Volvo 142E**        21.4    4     121    109   4.11   2.78    18.6    1  
--------------------------------------------------------------------------------

Table: Only once after the first part! (continued below)

 
--------------------------------------------
         &nbsp;            am   gear   carb 
------------------------- ---- ------ ------
      **Mazda RX4**        1     4      4   

    **Mazda RX4 Wag**      1     4      4   

     **Datsun 710**        1     4      1   

   **Hornet 4 Drive**      0     3      1   

  **Hornet Sportabout**    0     3      2   

       **Valiant**         0     3      1   

     **Duster 360**        0     3      4   

      **Merc 240D**        0     4      2   

      **Merc 230**         0     4      2   

      **Merc 280**         0     4      4   

      **Merc 280C**        0     4      4   

     **Merc 450SE**        0     3      3   

     **Merc 450SL**        0     3      3   

     **Merc 450SLC**       0     3      3   

 **Cadillac Fleetwood**    0     3      4   

 **Lincoln Continental**   0     3      4   

  **Chrysler Imperial**    0     3      4   

      **Fiat 128**         1     4      1   

     **Honda Civic**       1     4      2   

   **Toyota Corolla**      1     4      1   

    **Toyota Corona**      0     3      1   

  **Dodge Challenger**     0     3      2   

     **AMC Javelin**       0     3      2   

     **Camaro Z28**        0     3      4   

  **Pontiac Firebird**     0     3      2   

      **Fiat X1-9**        1     4      1   

    **Porsche 914-2**      1     5      2   

    **Lotus Europa**       1     5      2   

   **Ford Pantera L**      1     5      4   

    **Ferrari Dino**       1     5      6   

    **Maserati Bora**      1     5      8   

     **Volvo 142E**        1     4      2   
--------------------------------------------


----------------------------------
         a                 b      
-------------------- -------------
 hundreds of mouses   FOO is nice 

       3 cats          BAR BAR2   
----------------------------------


-----------------
    a        b   
---------- ------
 hundreds   FOO  
    of       is  
  mouses    nice 

    3       BAR  
   cats     BAR2 
-----------------


------------------------
   a       b        c   
------- -------- -------
   1     0.8547     a   

 -500    0.7803    bb   

 10320   0.2939    ccc  

  23     0.9799   dddd  

  77     0.9584   eeeee 
------------------------



+-------+--------+-------+
|   a   |   b    |   c   |
+=======+========+=======+
|   1   | 0.8547 |   a   |
+-------+--------+-------+
| -500  | 0.7803 |  bb   |
+-------+--------+-------+
| 10320 | 0.2939 |  ccc  |
+-------+--------+-------+
|  23   | 0.9799 | dddd  |
+-------+--------+-------+
|  77   | 0.9584 | eeeee |
+-------+--------+-------+



   a       b        c   
------- -------- -------
   1     0.8547     a   
 -500    0.7803    bb   
 10320   0.2939    ccc  
  23     0.9799   dddd  
  77     0.9584   eeeee 



+--------------------+-------------+
|         a          |      b      |
+====================+=============+
| hundreds of mouses | FOO is nice |
+--------------------+-------------+
|       3 cats       |  BAR BAR2   |
+--------------------+-------------+



+----------+------+
|    a     |  b   |
+==========+======+
| hundreds | FOO  |
|    of    |  is  |
|  mouses  | nice |
+----------+------+
|    3     | BAR  |
|   cats   | BAR2 |
+----------+------+

[1] "Yeah, no newline support in simple tables"

------ ---- ------
 *21*   21   22.8 

------ ---- ------


-------- ---- ------
 **21**   21   22.8 

-------- ---- ------


---------- ---- ------
 ***21***   21   22.8 

---------- ---- ------


------ ------ ------
 *21*   *21*   22.8 

------ ------ ------


-------- -------- ------
 **21**   **21**   22.8 

-------- -------- ------


---------------------------------------------------------
      &nbsp;          mpg     cyl   disp     hp     drat 
------------------- -------- ----- ------- ------- ------
   **Mazda RX4**      *21*     6    *160*   *110*   3.9  

 **Mazda RX4 Wag**    *21*     6    *160*   *110*   3.9  

  **Datsun 710**     *22.8*    4    *108*   *93*    3.85 
---------------------------------------------------------


----------------------------------------------------
      &nbsp;         mpg    cyl   disp   hp    drat 
------------------- ------ ----- ------ ----- ------
   **Mazda RX4**      21    *6*   160    110   3.9  

 **Mazda RX4 Wag**    21    *6*   160    110   3.9  

  **Datsun 710**     22.8    4    108    93    3.85 
----------------------------------------------------


----------------------------------------------------
      &nbsp;         mpg    cyl   disp   hp    drat 
------------------- ------ ----- ------ ----- ------
   **Mazda RX4**      21    `6`   160    110   3.9  

 **Mazda RX4 Wag**    21    `6`   160    110   3.9  

  **Datsun 710**     22.8    4    108    93    3.85 
----------------------------------------------------


----------------------------------------------------------
      &nbsp;         mpg     cyl    disp     hp     drat  
------------------- ------ ------- ------- ------- -------
   **Mazda RX4**     *21*   *`6`*   *160*   *110*   *3.9* 

 **Mazda RX4 Wag**    21     `6`     160     110     3.9  

  **Datsun 710**     22.8     4      108     93     3.85  
----------------------------------------------------------


----------------------------------------------------------
      &nbsp;          mpg     cyl   disp     hp     drat  
------------------- -------- ----- ------- ------- -------
   **Mazda RX4**      *21*    *6*   *160*   *110*   *3.9* 

 **Mazda RX4 Wag**    *21*     6     160     110     3.9  

  **Datsun 710**     *22.8*    4     108     93     3.85  
----------------------------------------------------------


---------------------------------------------------------------
      &nbsp;           mpg      cyl    disp       hp      drat 
------------------- ---------- ----- --------- --------- ------
   **Mazda RX4**      **21**     6    **160**   **110**   3.9  

 **Mazda RX4 Wag**    **21**     6    **160**   **110**   3.9  

  **Datsun 710**     **22.8**    4    **108**   **93**    3.85 
---------------------------------------------------------------


---------------------------------------
                     mpg    cyl   disp 
------------------- ------ ----- ------
     Mazda RX4        21     6    160  

   Mazda RX4 Wag      21     6    160  

    Datsun 710       22.8    4    108  
---------------------------------------


----------------
       a        
----------------
 Pandoc Package 
----------------


---------
    a    
---------
 Pandoc  
 Package 
---------


-----------
  a     b  
----- -----
 foo   foo 
 bar   bar 
-----------


-------------------
    a         b    
--------- ---------
 foo bar   foo bar 
-------------------


---------------
  a       b    
----- ---------
 foo   foo bar 
 bar           
---------------


---------------
  a       b    
----- ---------
 foo   foo bar 
 bar           
---------------


-----------------------------------------
  &nbsp;     colname   colname   colname 
               one       two      three  
----------- --------- --------- ---------
 **rowname     aa         a       bbbb   
   one**       aa         a       bbbb   
               aa         a       bbbb   
                          a              
                          a              

 **rowname     aaa      aaaaa      bb    
   two**       aaa                 bbb   
                                  bbbb   
-----------------------------------------


-----------------------------------------
  &nbsp;     colname   colname   colname 
               one       two      three  
----------- --------- --------- ---------
 **rowname    aa aa     a a a     bbbb   
   one**       aa        a a      bbbb   
                                  bbbb   

 **rowname     aaa      aaaaa    bb bbb  
   two**       aaa                bbbb   
-----------------------------------------


-------------------------------------------------
     &nbsp;        colname   colname    colname  
                     one       two       three   
----------------- --------- --------- -----------
 **rowname one**     aa       a a a    bbbb bbbb 
                     aa        a a       bbbb    
                     aa                          

 **rowname two**     aaa      aaaaa     bb bbb   
                     aaa                 bbbb    
-------------------------------------------------


----------------------------------------------------------
     &nbsp;        colname   colname two   colname three  
                     one                                  
----------------- --------- ------------- ----------------
 **rowname one**     aa       a a a a a    bbbb bbbb bbbb 
                     aa                                   
                     aa                                   

 **rowname two**     aaa        aaaaa       bb bbb bbbb   
                     aaa                                  
----------------------------------------------------------


----------------------------------------------------
  &nbsp;     colname   colname two   colname three  
               one                                  
----------- --------- ------------- ----------------
 **rowname     aa       a a a a a    bbbb bbbb bbbb 
   one**       aa                                   
               aa                                   

 **rowname     aaa        aaaaa       bb bbb bbbb   
   two**       aaa                                  
----------------------------------------------------


---------------------------------------------
  &nbsp;     colname   colname two   colname 
               one                    three  
----------- --------- ------------- ---------
 **rowname     aa       a a a a a     bbbb   
   one**       aa                     bbbb   
               aa                     bbbb   

 **rowname     aaa        aaaaa        bb    
   two**       aaa                     bbb   
                                      bbbb   
---------------------------------------------


------------------------------------------------------
     &nbsp;        colname   colname   colname three  
                     one       two                    
----------------- --------- --------- ----------------
 **rowname one**    aa aa       a      bbbb bbbb bbbb 
                     aa         a                     
                                a                     
                                a                     
                                a                     

 **rowname two**     aaa      aaaaa     bb bbb bbbb   
                     aaa                              
------------------------------------------------------

Warning messages:
1: In split.large.cells(t) :
  length of split.cells vector is smaller than data. Default value will be used for other cells
2: In split.large.cells(t.colnames) :
  length of split.cells vector is smaller than data. Default value will be used for other cells

-------------------------
     a            b      
------------ ------------
   Can be       Can be   
    also         also    
  supplied     supplied  
    as a         as a    
  vector,      vector,   
  for each     for each  
    cell         cell    
 separately   separately 
-------------------------

pander documentation built on Nov. 6, 2018, 5:05 p.m.