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

Move all output formatting from analyses() to table_out() #1

Open
gerasy1987 opened this issue Nov 14, 2017 · 0 comments
Open

Move all output formatting from analyses() to table_out() #1

gerasy1987 opened this issue Nov 14, 2017 · 0 comments
Assignees

Comments

@gerasy1987
Copy link
Owner

Currently treat_only, stars and round_digits are arguments for usefulr::analyses() which does not make sense, since the function is mainly for estimation. Consider moving this functionality and all output formatting to usefulr::table_fun()

This most likely will mean that the following chunk should be moved to usefulr::table_fun()

out <-
    dplyr::mutate(estout,
                  printout =
                    ifelse(is.nan(estimate), "-- [--]",
                           paste0(fround(estimate, digits = round_digits),
                                  ifelse(stars, add_stars(p.value), ""),
                                  " [", fround(std.error, digits = round_digits), "]")),
                  estimate =
                    round(estimate, digits = 3), std.error = round(std.error,
                                                                   digits = round_digits),
                  p.value = round(p.value, digits = round_digits))

out <- dplyr::select(.data = out,
                                  term, estimate, std.error,
                                  printout, p.value)
@gerasy1987 gerasy1987 self-assigned this Nov 14, 2017
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

1 participant