Title
library(xtable)
library(pander)
data(tli)
tli.table <- kable(tli[1:10,])
#digits(tli.table)[c(2,6)] <- 0
print(tli.table,type="html")
##
##
## | grade|sex |disadvg |ethnicty | tlimth|
## |-----:|:---|:-------|:--------|------:|
## | 6|M |YES |HISPANIC | 43|
## | 7|M |NO |BLACK | 88|
## | 5|F |YES |HISPANIC | 34|
## | 3|M |YES |HISPANIC | 65|
## | 8|M |YES |WHITE | 75|
## | 5|M |NO |BLACK | 74|
## | 8|F |YES |HISPANIC | 72|
## | 4|M |YES |BLACK | 79|
## | 6|M |NO |WHITE | 88|
## | 7|M |YES |HISPANIC | 87|
pandoc.table(head(iris[,1:4]))
##
## ---------------------------------------------------------
## Sepal.Length Sepal.Width Petal.Length Petal.Width
## -------------- ------------- -------------- -------------
## 5.1 3.5 1.4 0.2
##
## 4.9 3 1.4 0.2
##
## 4.7 3.2 1.3 0.2
##
## 4.6 3.1 1.5 0.2
##
## 5 3.6 1.4 0.2
##
## 5.4 3.9 1.7 0.4
## ---------------------------------------------------------
# install.packages("googleVis")
library(googleVis)
library(MASS)
data(Animals)
tab1 <- gvisTable(Animals,
options = list(width = 600, height = 650,
page = "enable",
pageSize = nrow(Animals)))
print(tab1, "chart")
tbl2 <- gvisTable(Population, options=list(page='enable',
height='automatic',
width='automatic'))
print(tbl2, "chart")
library(xtable)
data(iris)
print(xtable(head(iris, 10)), type = "html", include.rownames = F)
| Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species |
| 5.10 | 3.50 | 1.40 | 0.20 | setosa |
| 4.90 | 3.00 | 1.40 | 0.20 | setosa |
| 4.70 | 3.20 | 1.30 | 0.20 | setosa |
| 4.60 | 3.10 | 1.50 | 0.20 | setosa |
| 5.00 | 3.60 | 1.40 | 0.20 | setosa |
| 5.40 | 3.90 | 1.70 | 0.40 | setosa |
| 4.60 | 3.40 | 1.40 | 0.30 | setosa |
| 5.00 | 3.40 | 1.50 | 0.20 | setosa |
| 4.40 | 2.90 | 1.40 | 0.20 | setosa |
| 4.90 | 3.10 | 1.50 | 0.10 | setosa |
“r
library(xtable)
data(tli)
print(xtable(tli[1:10, ]),type=‘html’, comment=F)
”
| | grade | sex | disadvg | ethnicty | tlimth |
| 1 | 6 | M | YES | HISPANIC | 43 |
| 2 | 7 | M | NO | BLACK | 88 |
| 3 | 5 | F | YES | HISPANIC | 34 |
| 4 | 3 | M | YES | HISPANIC | 65 |
| 5 | 8 | M | YES | WHITE | 75 |
| 6 | 5 | M | NO | BLACK | 74 |
| 7 | 8 | F | YES | HISPANIC | 72 |
| 8 | 4 | M | YES | BLACK | 79 |
| 9 | 6 | M | NO | WHITE | 88 |
| 10 | 7 | M | YES | HISPANIC | 87 |
|