I've modified the code and it now works.
df1 <- c("GAPDH", "ACTB", "CTSB", "DHRF", "AARS", "ACOT2" )
df2 <- c("GAPDH", "ACTB", "CTSB", "LDHA", "ACOT8" )
df3 <- c("GAPDH", "ACTB", "DHRF", "LDHA" )
data <- list(df1, df2, df3)
names(data) <- c("Fred", "Ciara", "Pat")
data_v2 <- UpSetR::fromList(data)
upset(fromList(data_v2),
nintersects = NA,
nsets = 3,
sets = c("Fred", "Ciara", "Pat"),
empty.intersections = "on",
order.by = "freq",
decreasing = T,
number.angles = 0,
text.scale = 1.1,
point.size = 2.8,
line.size = 1
)
The pplot it drew is below. I have 2 further questions thou.
Surely there should be bars showing the single interesction between Fred and Ciara (CTSB), Fred and Pat (DHRF) and Ciara and Pat (LDHA)? I understood that the function of
nintersects = NA,was to ensure that all intersections were shown.Why is the barplot showing sample size saying all sets have 2 members rather than the actual numbers (Fred = 6, Ciara = 5 and Pat = 4) and how do I change this?
Thanks