/usr/share/doc/r-cran-xtable/tests/test.margintable.R is in r-cran-xtable 1:1.8-2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | ### Test of feature request #2168 implementation
### Enables use of margintable floating environment
### DJS, 17/08/2012
library(xtable)
x <- matrix(rnorm(6), ncol = 2)
x.small <- xtable(x, label='tabsmall', caption = 'A margin table')
print(x.small, floating.environment = 'margintable',
table.environments = "",
table.placement = NULL)
## % latex table generated in R 2.15.0 by xtable 1.7-1 package
## % Fri Aug 17 01:42:42 2012
## \begin{margintable}
## \centering
## \begin{tabular}{rrr}
## \hline
## & 1 & 2 \\
## \hline
## 1 & 1.42 & -1.11 \\
## 2 & -0.57 & 0.23 \\
## 3 & -0.67 & -0.60 \\
## \hline
## \end{tabular}
## \caption{A margin table}
## \label{tabsmall}
## \end{margintable}
print(x.small, floating.environment = 'margintable',
table.environments = "")
## % latex table generated in R 2.15.0 by xtable 1.7-1 package
## % Fri Aug 17 01:42:46 2012
## \begin{margintable}
## \centering
## \begin{tabular}{rrr}
## \hline
## & 1 & 2 \\
## \hline
## 1 & 1.42 & -1.11 \\
## 2 & -0.57 & 0.23 \\
## 3 & -0.67 & -0.60 \\
## \hline
## \end{tabular}
## \caption{A margin table}
## \label{tabsmall}
## \end{margintable}
## Warning message:
## In print.xtable(x.small, floating.environment = "margintable", table.environments = "") :
## margintable does not allow for table placement; setting table.placement to NULL
|