This research was done on the genome-wide association studies and anazlyzed by Alice B. Popejoy and Stephanie M. Fullerton. They collected data from US National Human Genome Research Institute and analysed the sample descriptions included in the GWAS Catalog. It was repeated years later to see if there was any progress made in inclusion.It became danegerous to leave certain groups out
dataLabel<- c("European\n","Asian\n","Others\n")
dataSet1<- c(96 ,3, 1)
dataSet2<-c(81, 14, 5 )
# set up par()
par(mfrow = c(1,2), mar = c(2,3,1,5))
#pie graphs 1
# add main, init.angle, radius, and col
pie(dataSet1,
labels = dataLabel,
col = rainbow(length(dataLabel)),
main = "2009",
init.angle = -82,
radius = 1)
# pie graph 2
# add main, init.angle, radius, and col
pie(dataSet2,
labels = dataLabel,
col = rainbow(length(dataLabel)),
main = "2016",
init.angle = -82,
radius = 1)
If you want, you can examine this code below to see how stracked bar graphs are made
# data
dat2016 <- c(14, 3,1,0.54,0.28,0.08,0.05)
dat2016_rev <- rev(dat2016)
barplotdata2016 <- matrix(c(dat2016_rev))
# labels
labels_x <- rev(c("Asian","African","Mixed", "Hispanic &\nLatin American",
"Pacific Islander","Arab & Middle East","Native peoples"))
par(mfrow = c(1,1))
barplot(barplotdata2016,
width = 0.01,
xlim = c(0,0.1),
axes = F,
col = c(1,2,3,4,5,6,7),
legend.text = labels_x)