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

add group_modify_safely #108

Open
IndrajeetPatil opened this issue Jun 2, 2021 · 0 comments
Open

add group_modify_safely #108

IndrajeetPatil opened this issue Jun 2, 2021 · 0 comments
Labels
feature 🔨 a feature request or enhancement

Comments

@IndrajeetPatil
Copy link
Owner

add NA for grouping level where the function fails

library(tidyverse)
df <- tibble(x1 = 1.2, x2 = 1.3, x3 = 1.4)
dplyr::bind_rows(df, df %>% mutate(across(everything(), ~ .x * NA)))
#> # A tibble: 2 x 3
#>      x1    x2    x3
#>   <dbl> <dbl> <dbl>
#> 1   1.2   1.3   1.4
#> 2  NA    NA    NA

Created on 2021-06-02 by the reprex package (v2.0.0)

Will be a general version of something like this:
https://github.com/IndrajeetPatil/ggstatsplot/blob/e8791db76f5ac705eac0a54d70897c7daa21af2f/R/helpers_ggcatstats_graphics.R#L89

@IndrajeetPatil IndrajeetPatil added the feature 🔨 a feature request or enhancement label Jun 2, 2021
@IndrajeetPatil IndrajeetPatil changed the title add grouped_safely add group_modify_safely Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🔨 a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant