SM.R

library(ggplot2)
library(gridExtra)

F=read.csv("PLOSONE2013Data.csv")
CY=(F$CYNewWorldOrder+F$CYMLK+F$CYMoon+F$CYJFK+F$CY911+F$CYDiana)/6
CLIM=(F$CNatFluct+F$CdueGHG+F$CseriousDamage+F$CO2causesCC+F$HumansInsign)/5
LGO13=data.frame(cbind(CLIM,CY))

F=read.csv("LskyetalPsychSciClimate.csv")
CY=(F$CYNewWorldOrder+F$CYSARS+F$CYPearlHarbor+F$CYMLK+F$CYMoon+F$CYJFK+F$CY911+F$CYDiana+F$CYOkla+F$CYCoke+F$CYArea51+F$CYRoswell)/12
CLIM=(F$CO2TempUp+F$CO2AtmosUp+F$CO2WillNegChange+F$CO2HasNegChange+F$CauseCO2)/5
LOG13=data.frame(cbind(CLIM,CY))

CLIM=CLIM[CY<=2.5]
CY=CY[CY<=2.5]
LOG13tr=data.frame(cbind(CLIM,CY))

S1a=ggplot(data = LOG13, aes(x=CY,y=CLIM)) + geom_point(size=1,position = position_jitter(w = 0.05, h = 0.05)) + geom_smooth(method="lm") +ggtitle("LOG13")
S1b=ggplot(data = LGO13, aes(x=CY,y=CLIM)) + geom_point(size=1,position = position_jitter(w = 0.05, h = 0.05)) + geom_smooth(method="lm") +ggtitle("LGO13")
png("S1.png",width=3600,height=1800,res=600)
grid.arrange(S1a,S1b, ncol=2, nrow=1)
dev.off()

S2a=ggplot(data = LOG13) + geom_histogram(aes(x=CY),binwidth=1/12,origin=1-1/24) +ggtitle("LOG13")
S2b=ggplot(data = LOG13) + geom_histogram(aes(x=CLIM),binwidth=1/5,origin=1-1/10) +ggtitle("LOG13")
S2c=ggplot(data = LGO13) + geom_histogram(aes(x=CY),binwidth=1/6,origin=1-1/12) +ggtitle("LGO13")
S2d=ggplot(data = LGO13) + geom_histogram(aes(x=CLIM),binwidth=1/5,origin=1-1/10) +ggtitle("LGO13")

png("S2.png",width=3600,height=3600,res=600)
grid.arrange(S2a,S2b,S2c,S2d, ncol=2, nrow=2)
dev.off()

S3a=ggplot(data = LOG13, aes(x=CY,y=CLIM)) + geom_point(size=1,position = position_jitter(w = 0.05, h = 0.05)) + geom_smooth(method="loess")+ggtitle("LOG13") #+ ylim(1,4) + xlim(1,4)
S3b=ggplot(data = LOG13, aes(x=CLIM,y=CY)) + geom_point(size=1,position = position_jitter(w = 0.05, h = 0.05)) + geom_smooth(method="loess")+ggtitle("LOG13") #+ ylim(1,4) + xlim(1,4)
S3c=ggplot(data = LOG13tr, aes(x=CY,y=CLIM)) + geom_point(size=1,position = position_jitter(w = 0.05, h = 0.05)) + geom_smooth(method="loess")+ggtitle("LOG13 outliers removed") #+ ylim(1,4) + xlim(1,4)
S3d=ggplot(data = LOG13tr, aes(x=CLIM,y=CY)) + geom_point(size=1,position = position_jitter(w = 0.05, h = 0.05)) + geom_smooth(method="loess")+ggtitle("LOG13 outliers removed") #+ ylim(1,4) + xlim(1,4)
S3e=ggplot(data = LGO13, aes(x=CY,y=CLIM)) + geom_point(size=1,position = position_jitter(w = 0.05, h = 0.05)) + geom_smooth(method="loess")+ggtitle("LGO13")
S3f=ggplot(data = LGO13, aes(x=CLIM,y=CY)) + geom_point(size=1,position = position_jitter(w = 0.05, h = 0.05)) + geom_smooth(method="loess")+ggtitle("LGO13")

png("S3.png",width=3600,height=5300,res=600)
grid.arrange(S3a,S3b,S3c,S3d,S3e,S3f, ncol=2, nrow=3)
dev.off()

Back to list of R-files

Advertisements