0

This is leading on from an answer from r combine ggRadar and facet_wrap.

In the above question/answer it was shown how to use facets within ggRadar by doing something along the lines of:

ggiraphExtra::ggRadar(aes(facet = facetvar1))

This facet wraps a single variable, but is it possible to instead do the equivalent of facet_grid with two different variables (say, facetvar1 and facetvar2).

For a reprex:

ggiraphExtra::ggRadar(mtcars, aes(facet = c(cyl))) ## This works, but what if I want to facet by "gear" and "cyl"
Jack
  • 173
  • 8

1 Answers1

0

Maybe you can use the forcats package to create a cross variable between the two variables you want, and then facet the plot with that new variable:

yourdata %>%
     mutate(new_facet = forcats::fct_cross(gear, cyl sep = " + "))

You will get a new variable that contains all possible combinations between both variables, thus producing more facets.