Using the package vcd
in R one can produce a fourfold plot of two categorical vectors and record it the following way
vcd::fourfold(table(x,y))
fourfold_plot <- recordPlot()
I am interested in extracting the information about the overlap of adjacent rings (which can lead to the rejection of the null hypothesis). I know it must be somewhere inside fourfold_plot, because the colors of the plot differ depending on the rejection as stated in
A Fourfold Display for 2 by 2 by k Tables by Michael Friendly
Typing str(fourfold_plot)
prints a hell a lot of information, where i can spot an attribute called check_overlap, which sounds like what I am looking for. I have no idea how to access it though, due to the overcrowding of information produced by str()
.
I understand that my question can be stated more generically, like "How to locate an attribute in an object", but I'm not sure that I have located the source of the information about the null hypothesis rejection correct.