💾 Archived View for gemlog.blue › users › cariboudatascience › 1613189510.gmi captured on 2023-09-08 at 16:54:58. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-04)

-=-=-=-=-=-=-

Prevalence Of Drug Use Disorders Males vs Females

Software required to recreate plots:

Run code:

install.packages("ggplot2")
library(ggplot2)
rm(list=ls())
df <- read.csv("./prevalence-of-drug-use-disorders-males-vs-females.csv")
US <- subset(df,Code =="USA" & Year >="1990")
## Plot1:
plot(US$Year,US$Male,main="Male",type="l")
grid(col="gray")
## Plot2:
plot(US$Year,US$Female,type="l",main="Female")
grid(col="gray")
## Plot 3:
ggplot(US) + geom_line(aes(x=Year,y=Male,col="Males")) +
  geom_line(aes(x=Year,y=Female,col="Female")) +
  labs(title="Share(%) of population suffering from drug use disorders: males versus females",y="Drug use prevalence ")

Plots:

(Plot1) Female Prevalence

(Plot2) Male Prevalence

(GGPlot2) Combined Male and Female Prevalence

Resources:

R Code, data

R Language and Rtools10 (click and "base" and "Rtools")

Download and install RStduio