library(foreign)
data <- read.dta("C:/Users/hellmund/Documents/MyStataDataFile.dta")
names(data)
install.packages(‘beeswarm’)
library(beeswarm)
levels(data$group)
png(file=”C:/Users/hellmund/Documents/il6.png”, bg=”transparent”)
beeswarm(data$il6~data$group,data=data, method=c(“swarm”),pch=16,pwcol=data$Gender,xlab=”,ylab=’il6′,ylim=c(0,20))
legend(‘topright’,legend=levels(data$Gender),title=’Gender’,pch=16,col=2:1)
boxplot(data$il6~data$group, data=data, add = T, names = c(“”,””,””), col=”#0000ff22″)
dev.off()
![](https://static.wixstatic.com/media/88f6e2_38045842ca6c4795a82aef90a1fb7d93~mv2.png/v1/fill/w_320,h_320,al_c,q_85,enc_auto/88f6e2_38045842ca6c4795a82aef90a1fb7d93~mv2.png)
Comments