Skip to content

ggbivariate only working with numerical outcome variable and output looks weird #553

@theanita1

Description

@theanita1

Hi there
Apologies if this issue has been previously addressed but I couldn't see it previously being brought up

I can only get ggbivariate to work if the outcome variable is a number - e.g. 0/1, 1/2 and then the output doesn't look anything like the examples you've got on the vingettes

Here's what I mean

df<- pengiuns
GGally:: ggbivariate(df, "sex")

If I run this without first transforming the sex variable, I get this error:

Image

But, if I transform the outcome variable

df<- df %>% mutate(sex = factor(sex, 
                                levels = c("male", "female"), 
                                labels = c(1, 0)) %>%
                     as.character() %>% 
                     as.numeric())

then I get this output:

Image

Which technically the function runs, but doesn't look anything like what you have as your examples

Hopefully it's an easy fix, maybe something running on my RStudio (4.5.0) or a dependency that has been masked

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions