Coder Social home page Coder Social logo

clinicopath / finalfit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ewenharrison/finalfit

0.0 1.0 0.0 273.1 MB

Quickly create elegant regression results tables and plots when modelling in R

Home Page: https://finalfit.org/

License: Other

R 100.00%

finalfit's Introduction

CRAN_Status_Badge CRAN_Status_Badge TravisCRAN_Status_Badge Build status Coverage status

finalfit

The finalfit package provides functions that help you quickly create elegant final results tables and plots when modelling in R. These can easily be exported as Word documents, PDFs, or html files.

Its design follows Hadley Wickham's tidy tool manifesto.

In addition, it provides functions for identifying and handling missing data, together with a number of functions to bootstrap simulate regression model results.

Installation

You can install finalfit from CRAN:

install.packages("finalfit")

It is recommended that this package is used together with dplyr which can be installed via:

install.packages("dplyr")

Documentation

The package documentation is maintained independently at finalfit.org.

Examples

See getting started and the All tables vignettes for extensive examples.

Crosstable / table 1

# Crosstable 
explanatory = c("age.factor", "sex.factor", "obstruct.factor")
dependent = 'mort_5yr'
colon_s %>%
  summary_factorlist(dependent, explanatory, 
  p=TRUE, add_dependent_label=TRUE) -> t1
knitr::kable(t1, align=c("l", "l", "r", "r", "r"))

Regression table

explanatory = c("age.factor", "sex.factor", 
  "obstruct.factor", "perfor.factor")
dependent = 'mort_5yr'
colon_s %>%
  finalfit(dependent, explanatory, metrics=TRUE) -> t2
knitr::kable(t2[[1]], row.names=FALSE, align=c("l", "l", "r", "r", "r", "r"))
knitr::kable(t2[[2]], row.names=FALSE, col.names="")

When exported to PDF:

Regression plots

explanatory = c("age.factor", "sex.factor", 
  "obstruct.factor", "perfor.factor")
dependent = 'mort_5yr'
colon_s %>%
  or_plot(dependent, explanatory)

finalfit's People

Contributors

ewenharrison avatar marius-mather avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.