I am trying to create a number of table objects that I can insert into an html page unsing Knit and would like to be able to loop through a vector of names to print the corresponding table.
for example:
TabA = as.table(cbind(c("A","B","C"),c(1,2,3)))
TabB = as.table(cbind(c("D","E","F"),c(1,2,3)))
nams = c("TabA","TabB")
Then in the html using R markdown
Example Table: `r nams[4] `
```{r}
knitr::kable(t(nams[4]),format = "markdown")
```
I know how to assign names on the fly, but not sure how to use the vector as a pointer to the object.