Description Usage Arguments Value Note
The sanity checks for d3Venn are outsourced to this function for cleaner code.
1 | .check_validity(sets)
|
sets |
object, will be checked if it fits the requirments of d3Venn |
A list with the follwing elements:
result boolean, TRUE
if the object is a valid object, FALSE
otherwise.
msg character, the error / warning message to be returned.
severity character, either “warning” or “error”. Indicates if the
problem found should raise an error or a
warning
severity
will be called with the given msg
from the calling
function.
fixed data.frame, in case the problem can be fixed by removing elements from
sets
, fixed
will contain this fixed version.
Not all logical errors will be covered here for simplicity. For instance missing lower order intersections and or size restrictions on lower order intersections are not checked. Rational behind this is that we want to make sure that there is at least a plot, even if it is not as intended. We add some more tests than strictly necessary for this goal becasue they were rather easy to implement. The rest is left to the user to investigate further. A close look into the JS console reveals if there were erros during the rendering.
The following issues are checked:
Wrong inputsets is not a data.frame
or misses some columns
Unknown fieldsfields not known to Venn.js are supplied
Duplicated entriesrows are repeated
Duplicate elements in intersectionselements are repeated
Missing main setsintersections contain entries for sets which are not specified
Cardinality is too bigintersection size exceeds main set size
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.