I am generating figures and reports using RMarkdown in .html format. I now wish to create three separate tables in the .html document but am unsure if I can create these. My data.frame
consists of call logs, by differing locations and service roles. The amount of time (duration, in minutes) is also recorded. However, I have data on many workers so wish to subset by each worker's ID.
Can I create a row of three (subset, different data.frames) like this one in Excel?
My data.set is sensitive, so here is an example using R's inbuilt datasets and my RMarkdown code.
---
title: <center> <h1>Call Centre Report</h1> </center>
output:
html_document
---
```{r echo=FALSE}
library("htmlTable")
htmlTable(subset(mtcars, gear=="4"),
header = paste(c("mpg", "cyl",
"disp", "hp", "drat",
"wt", "qsec", "vs", "am", "gear", "carb")))
```
```{r echo=FALSE}
library("htmlTable")
htmlTable(subset(iris, Species=="setosa"),
align="rrrr|r",
header = paste(c("Sepal Length", "Sepal Width",
"Petal Length", "Petal Width", "Species")))
```
```{r echo=FALSE}
library("htmlTable")
htmlTable(subset(chickwts, feed=="horsebean"),
align="r|r",
header = paste(c("Weight", "Feed")))
```
Thank you.