library(ggplot2) library(magrittr) library(dplyr) library(tidyverse) library(ggsci) library(ggpubr)
library(DiagrammeR)
grViz("digraph flowchart { # node definitions with substituted label text node [fontname = Helvetica, shape = rectangle] tab1 [label = '@@1'] tab2 [label = '@@2'] tab3 [label = '@@3'] tab4 [label = '@@4'] tab5 [label = '@@5'] # edge definitions with the node IDs tab1 -> tab2; tab2-> tab3; tab3-> tab4; tab4 -> tab5; } [1]: '2062 patients from the eICU database were on nitroglyerin infusion' [2]: '1893 patients had coresponding blood pressure data' [3]: '1277 patients with SBP, nitroglycerin infusion rate, and titration within filtration criteria' [4]: '693 patients with a SBP measurement within 15 minutes before and after a nitroglycerin dose change' [5]: '326 patients had at least 1 nitroglycerin titration' " )
data <- data.frame( Hospital=c(1:40), Patients=c(1,2,9,20,4,2,6,25,2,12,16,23,1,4,2,1,4,1,25,6,11,7,1,10,49,8,14,6,1,7,6,10,1,1,2,6,9,1,4,6) )
ggp <- ggplot(data, aes(x=Hospital, y= Patients)) + geom_bar(stat = "identity", fill = "#00abff") + labs(title= "Number of Patients from each Hospital", x= NULL, y="Patients") + theme(axis.ticks.y = element_blank(), axis.text.y = element_blank(), panel.background = element_blank())
ggp + coord_flip()
library(lares)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.