list_to_output <- c("Tab 1","Tab 2","Tab 3")
for(i in list_to_output){
cat("\n")
cat("### ", i, " {.tabset .tabset-pills}\n") # Create second level headings with the names.
g <- gganatogram(data = hgMale_key,
organism = "human", sex = "male",
fill = "value",
fillOutline = "#a6bddb")
print("This is a test.")
print(ggplotly(g),cat('\n'))
}
I'm unable to print within a loop of tabs, and it seems like a limitation, as many other types of plots work using the print function.
Here's an example trying to output it using ggplotly. Is there a way to print like this through an "asis" chunk within gganatogram? Thank you.
Tabs of Anatograms {.tabset}