Skip to content

Wishlist: Support factors as x or y #2

@zeileis

Description

@zeileis

Thanks:

Grant @grantmcdermott, the project looks really nice and useful, thanks!

Wishlist:

I just wanted to put on the wishlist that in addition to numeric x and y, it would be great if the factor-based plot() flavors were also supported in plot2(). Especially the plots where y is a factor are in my opinion underappreciated in base R. (It's not surprising that I would say that because I implemented these...)

Plots:

In plot(x, y, ...) and plot(y ~ x, ...) we have the following:

x
Numeric
 
Factor
y   Numeric Scatterplot Parallel boxplots
Factor Spinogram
(Spineplot with histogram-style breaks in x)
Spineplot
(Flavor of mosaic plot)

Examples:

data("SwissLabor", package = "AER")
plot(income ~ age, data = SwissLabor)            ## Numeric ~ Numeric
plot(income ~ foreign, data = SwissLabor)        ## Numeric ~ Factor
plot(participation ~ age, data = SwissLabor)     ## Factor ~ Numeric
plot(participation ~ foreign, data = SwissLabor) ## Factor ~ Factor

It would be great if the plots above would work with plot2() as well - and if the coloring and grouping etc. would also be supported.

GM edit: adding checklist to track

Metadata

Metadata

Assignees

No one assigned

    Labels

    wishlistFeatures we'd like to support

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions