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 a Function to Create Publication Ready Tables #3

Open
rtaph opened this issue Sep 29, 2018 · 1 comment
Open

Add a Function to Create Publication Ready Tables #3

rtaph opened this issue Sep 29, 2018 · 1 comment
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed

Comments

@rtaph
Copy link
Collaborator

rtaph commented Sep 29, 2018

Some users may use the package in order to tables with their rates in publications and professional documents. A potential package enhancement would be to create a function that creates publication-ready tables of outcome rates (LaTex and HTML).

If a new class is added to the outcomerate() output, this could potentially be worked into another package that focused on this task.

@rtaph rtaph added enhancement New feature or request help wanted Extra attention is needed hacktoberfest labels Sep 29, 2018
@davidmasp
Copy link

Hi, new here so I may be out of the loop. How this would differ from the kable function in knitr or xtable

Something like this for instance.

# load package
library(outcomerate)
# set counts per disposition code (needs to be a named vector)
freq <- c(I = 4, P = 2, R = 1, NC = 1, O = 1, UH = 1, UO = 1, NE = 1)
# calculate rates, assuming 90% of unknown cases are elligble
res = outcomerate(freq, e = eligibility_rate(freq))
knitr::kable(as.data.frame(res),format = "html")
res
RR1 0.3636364
RR2 0.5454545
RR3 0.3703704
RR4 0.5555556
RR5 0.4444444
RR6 0.6666667
COOP1 0.5000000
COOP2 0.7500000
COOP3 0.5714286
COOP4 0.8571429
REF1 0.0909091
REF2 0.0925926
REF3 0.1111111
CON1 0.7272727
CON2 0.7407407
CON3 0.8888889
LOC1 0.8181818
LOC2 0.8333333

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants