Code Monkey home page Code Monkey logo

Comments (5)

MikkelZ avatar MikkelZ commented on July 4, 2024 1

from ggtukey.

ethanbass avatar ethanbass commented on July 4, 2024

I'm not sure I understand what you mean. Can you give an example?
When using geom_tukey with facet_wrap, the call to facet_wrap has to come first as in the vignette.

For example if you have a plot "p":

p <- penguins |> tidyr::drop_na(sex, species) |> 
  ggplot(aes(x=species, y=body_mass_g)) +
  geom_boxplot() + 
  geom_jitter(col="slategray", alpha=0.6) +
  ylab("Body mass (g)") +
  xlab("Species") + egg::theme_article()

this first example will produce the correct plot:

p+ facet_wrap(~sex) +
  geom_tukey(where="whisker")

whereas this second plot will come at wonky because geom_tukey doesn't know you have facets when you call it.

p +   geom_tukey(where="whisker") +
  facet_wrap(~sex)

from ggtukey.

MikkelZ avatar MikkelZ commented on July 4, 2024

from ggtukey.

ethanbass avatar ethanbass commented on July 4, 2024

Ah I understand what you mean now. Thanks for the clarification. You can control this behavior with the type argument. The default is the two-way ANOVA. In this case, ggtukey will do a global test across all facets. To just test for differences within the facetted groups, you can select type = "one-way". I think this is the option you want.

from ggtukey.

ethanbass avatar ethanbass commented on July 4, 2024

Excellent!

from ggtukey.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.