]> git.donarmstrong.com Git - xtable.git/blob - pkg/tests/test.matharray.R
172ff92c4c8df5d00f0f403bc07988165ed8c98b
[xtable.git] / pkg / tests / test.matharray.R
1 require(xtable)
2 V <- matrix(c(1.140380e-03,  3.010497e-05,  7.334879e-05,
3               3.010497e-05,  3.320683e-04, -5.284854e-05,
4               7.334879e-05, -5.284854e-05,  3.520928e-04), nrow = 3)
5 ### Simple test of print.xtableMatharray
6 print.xtableMatharray(xtable(V, display = rep("E", 4)))
7
8 class(V) <- c("xtableMatharray")
9 class(V)
10
11 ### Test without any additional arguments
12 mth <- xtableMatharray(V)
13 str(mth)
14 print(mth)
15
16 ### Test with arguments to xtable
17 mth <- xtableMatharray(V, display = rep("E", 4))
18 str(mth)
19 print(mth)
20
21 mth <- xtableMatharray(V, digits = 6)
22 str(mth)
23 print(mth)
24
25 ### Test with additional print.xtableMatharray arguments
26 mth <- xtableMatharray(V, digits = 6)
27 str(mth)
28 print(mth, format.args = list(decimal.mark = ","))
29 print(mth, scalebox = 0.5)
30 print(mth, comment = TRUE)
31 print(mth, timestamp = "2000-01-01")
32 print(mth, comment = TRUE, timestamp = "2000-01-01")
33
34
35
36
37