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

Color by group in individual_patient_plot #1223

Open
3 tasks done
legrasv opened this issue Apr 10, 2024 · 0 comments
Open
3 tasks done

Color by group in individual_patient_plot #1223

legrasv opened this issue Apr 10, 2024 · 0 comments

Comments

@legrasv
Copy link
Contributor

legrasv commented Apr 10, 2024

Feature description

tern/R
/individual_patient_plot.R

Dear NEST,

With how is build the function h_g_ipp, currently we cannot color by something else than patient ID. My colleague try to color by Japanese vs Rest of the world, but the lines were not grouped by patient:
image

Therefore, he had to add a new parameter 'col_var' in the function h_g_ipp and add
col_var in all the ggplot functions (below id_var):
p <- ggplot2::ggplot(
data = df,
mapping = ggplot2::aes(
x = .data[[xvar]],
y = .data[[yvar]],
group = .data[[id_var]],
colour = .data[[col_var]]
)
)

In the end, he got his correct plot:
image

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants