Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Facet Labels in Mod2 #60

Closed
atanasj opened this issue Aug 4, 2022 · 1 comment
Closed

Change Facet Labels in Mod2 #60

atanasj opened this issue Aug 4, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@atanasj
Copy link

atanasj commented Aug 4, 2022

Is there a way to relabel the Mod2 (usually something line "mean of x - 1 SD", etc)? For example, my facet labels current read "Mean of bhs_ch…" etc., and I want them to read "Hopelessness…".

In addition to the underlying names of the associated continuous variable… I have tried to directly target the listed element and the attributes by using str_replace and reassigning names, but this does not seem to work, e.g.,

stringr::str_replace(names(obj$data$mod2_group), "Mean of bhs_ch", "Hopelessness")

But nothing works. Is there a simpler way to achieve this?

EDIT:

I see this is a similar issue to #58… Sorry about that. Please feel free to close if they have the same response.

@atanasj atanasj added the enhancement New feature or request label Aug 4, 2022
@atanasj atanasj changed the title Relabel Facet Labels in Mod2 Change Facet Labels in Mod2 Aug 4, 2022
@atanasj
Copy link
Author

atanasj commented Aug 4, 2022

Sorry… I realised after reviewing #58 that I needed to change the parameter in the function call like below:

interact_plot(
...,
mod2.label = c("x", "y", "z")
)

All works as expected now. Thanks for such a handy package!

@atanasj atanasj closed this as completed Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant