dustinfife / flexplot

flexplot: graphical data analysis
59 stars 16 forks source link

Label Option Bug for Factor Variables #131

Open mcfibb opened 1 month ago

mcfibb commented 1 month ago

Hey there @dustinfife --

I am running into issues with labeling the z term in the following: flexplot( y ~ x + z, dta)

I’ve tried to leverage bins =, breaks = , and labels = all to no effect; the result remains vs labels. Is labeling z function different when z is a factor variable?

Here's a reproducible example:

library(flexplot)
d <-exercise_data
flexplot(weight.loss~motivation + gender, data=d, se=FALSE,
         labels=list(gender = c("Men", "Women")))

This doesn't work either:

library(flexplot)
d <-exercise_data
flexplot(weight.loss~motivation + gender, data=d, se=FALSE,
       breaks = list(gender = c(1,2)),
       labels=list(gender = c("Men", "Women")))

Any ideas?

Thank you!

dustinfife commented 1 month ago

I can't reproduce that error. Do you have the most recent version of flexplot?

mcfibb commented 1 month ago

I think so. I reinstalled from GitHub last Friday. I’m away from my computer currently, but should be able to confirm (and give more code context if you like) in a few hours.

On Wed, May 29, 2024 at 16:21 dustinfife @.***> wrote:

I can't reproduce that error. Do you have the most recent version of flexplot?

— Reply to this email directly, view it on GitHub https://github.com/dustinfife/flexplot/issues/131#issuecomment-2138407243, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALIA5CDSKT3WHGSXZ64PMVLZEZPGXAVCNFSM6AAAAABIGNQBJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZYGQYDOMRUGM . You are receiving this because you authored the thread.Message ID: @.***>