js229 / Vennerable

Vennerable provides Venn diagrams in R. It displays Venn and Euler diagrams for up to 9 different sets and using a variety of geometries. It allows the display of area-weighted Venn diagrams and allows fine graphical control over the result.
90 stars 39 forks source link

plot with invalid 'type' argument yield misleading error message #2

Open js229 opened 8 years ago

js229 commented 8 years ago

Originally raised on R-Forge by jg61

When calling the 'plot' method with an invalid 'type' argument (e.g. with a typo), a misleading error message (see below) is shown. It would be an improvement to check the 'type' argument against the available options and return a useful error message, informing the user that this type is not existing.

data(StemCell) w <- Venn(Sets=StemCell[1:2]) Weights(w) <- 1:4 plot(w, type="foo")

Error: length(cutedge) == 1 is not TRUE In addition: Warning messages: 1: In .local(from, to, graph) : The following edges already exist and will be replaced: i2|i3 2: In .local(from, to, graph) : The following edges already exist and will be replaced: i3|i2

gk7279 commented 8 years ago

36 might be due to the wrong type which is ChowRuskey. If we use AWFE or Battle, then the plot works fine.