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_stats results optionally assigned to parent frame #16

Open
gasparl opened this issue Apr 16, 2022 · 1 comment
Open

add_stats results optionally assigned to parent frame #16

gasparl opened this issue Apr 16, 2022 · 1 comment

Comments

@gasparl
Copy link

gasparl commented Apr 16, 2022

There could be an option to assign the given results output automatically to the parent frame.
...so that instead of
my_results = add_stats(my_results, my_t_test)
... one can just write
add_stats(my_results, my_t_test, assign_results = TRUE)

But the outcome could still be returned invisibly, so that either notation can be used in any case.

@WillemSleegers
Copy link
Owner

Your suggestion, with the argument, ends up being longer than the original line, so I'm not sure it's worth it.

Also note that if you want to store multiple analyses, you can use piping to prevent having to repeat specifying the data frame:

my_results <- my_results %>%
  add_stats(my_t_test) %>%
  add_stats(my_correlation) %>%
  add_stats(my_lm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants