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

Allow functions to take data frames instead of individual vectors #2

Closed
austinj opened this issue Oct 4, 2019 · 4 comments
Closed
Assignees

Comments

@austinj
Copy link

austinj commented Oct 4, 2019

Obviously, not an urgent issue, but taking a data frame as the first argument and then specifying variable names instead of needing to pass individual vectors for each argument would make these functions easier to manipulate.

@austinj
Copy link
Author

austinj commented Nov 6, 2019

Apologies; by "these functions," I mean effect_size_MB() and effect_size_ABk().

@jepusto
Copy link
Owner

jepusto commented Mar 18, 2020

See http://adv-r.had.co.nz/Computing-on-the-language.html for techniques to address this.

@jepusto
Copy link
Owner

jepusto commented Mar 18, 2020

data(Saddler)

Saddler_quality <- subset(Saddler, measure=="writing quality")

# current usage
effect_size_MB(Saddler_quality$outcome, Saddler_quality$treatment,
               Saddler_quality$case, Saddler_quality$time)

# what we want:
effect_size_MB(data = Saddler_quality,
               outcome = outcome,
               treatment = treatment,
               id = case,
               time = time)

@jepusto
Copy link
Owner

jepusto commented Mar 18, 2020

Make sure to include a unit test.

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

3 participants