R will plot the Venn diagrams and shaded areas correctly, but it will not say A or A' in the console. The image below is an example of what I'm trying to have done. Note that the function "venn" is used from the "venn" package: https://cran.r-project.org/web/packages/venn/venn.pdf
Example of preferred output in the console
genvd = function(x){
x = venn(x,zcolor = "blue",ilabels = F)
if (x == "A") {
print("A",quote = FALSE)
return(x)
}
else if (x == "~A") {
print("A'",quote = FALSE)
return(x)
}
}
genvd("A")
genvd("~A")
Error Code:
Error in if (x == "A") { : argument is of length zero