# NOT RUN {
# arbitray sets
combinations = c(A=1.8, B=0.9,C=1.3, D = 1.3,E = 1.6, AC=0.3,
AD= 0.3,BE = 0.3, AE = 0.4, f = 0.7,g =0.8,
h = 0.5, gf = 0.2, Bh = 0.1,i = 1,j = 0.4,
k=0.7,l = 1.4,kl = 0.2,m = 0.5,lm = 0.2,
o = 0.8,p = 0.9, op = 0.3)
ve = vennplot(combinations)
# named sets
# combinations = c(A=1, B=1,C=1, ABC = 0.1)
# ve = vennplot(combinations,NAME = c("Loon","Goose","Duck"))
# effect of parameter mu
# combinations = c(A=1, B=1, C=1, D=1, E=1, ABCDE = 0.1)
# par(mfrow = c(1,3))
# ve = vennplot(combinations)
# ve = vennplot(combinations,mu=2)
# ve = vennplot(combinations,mu=1.2)
# 3D Venn plot
combinations = c(A=803, B=304,C=1015, D = 1100,E = 1005,f = 967,H=3020,
CD = 1000,BC = 248,ABC = 185,ADE = 327,CDfH = 846,
I=800, J=760,K=1000, L = 1100,M = 900, IK=333,
JM = 251,IL= 289, KM = 412,JL = 213)
timestart <- Sys.time()
ve = vennplot(combinations, disjoint = TRUE,ThreeD = TRUE)
timeend <- Sys.time()
runningtime <- timeend-timestart
print(runningtime)
# effect of parameters priority and weight
# combinations = c(A = 79,B=29,C=58,AB = 25,AC = 44, BC=18,ABC = 1)
# par(mfrow = c(2,2))
# vennplot(combinations, priority = 2)
# vennplot(combinations, priority = 3)
# vennplot(combinations, priority = c(2,3), weight = c(30,1000))
# vennplot(combinations, priority = c(2,3), weight = c(30,10))
# binary data
# combinations = sharks[,c(1,3:5,8)]
# vennplot(combinations = combinations)
# }
Run the code above in your browser using DataLab