Skip to content
Snippets Groups Projects
Commit 70c83273 authored by elisabetta.ronchiri@gmail.com's avatar elisabetta.ronchiri@gmail.com
Browse files

added script

parent dfdf340b
No related branches found
No related tags found
No related merge requests found
da <- read.csv2('tasso.partecipazione.sesso.regione.csv',as.is=T)
str(da)
nrow(da)
da$Tasso.maschi<-as.numeric(da$Tasso.maschi)
da$Anno<-as.factor(da$Anno)
v.max <- aggregate(da$Tasso.maschi, by=list(da$Anno), max)
v.min <- aggregate(da$Tasso.maschi, by=list(da$Anno), min)
v.mean <- aggregate(da$Tasso.maschi, by=list(da$Anno), mean)
df<-data.frame(v.max,v.min$x,v.mean$x)
names(df)<-c('anno','max','min','mean')
library(ggplot2)
ggplot(df,aes(x=anno)) + geom_point(aes(y=max), col='red') + geom_point(aes(y=min),col='blue') + geom_point(aes(y=mean),col='green')
ggplot(da,aes(x=Anno)) + geom_boxplot(aes(y=Tasso.maschi), col='red')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment