Code Monkey home page Code Monkey logo

statar's Introduction

statar

Build Status CRAN_Status_Badge Coverage Status

This package contains R functions corresponding to useful Stata commands.

The package includes:

Some examples:

library(dplyr)
library(statar)

starwars %>% sum_up(height)
 
#Variable │      Obs  Missing     Mean   StdDev      Min      Max 
#─────────┼───────────────────────────────────────────────────────
#  height │       81        6  174.358  34.7704       66      264 

starwars %>% group_by(gender) %>% sum_up(height)

#>  gender │ Variable │      Obs  Missing     Mean   StdDev      Min      Max 
#>─────────┼──────────┼───────────────────────────────────────────────────────
#>  female │   height │       17        2  165.471  23.0302       96      213 
#>---------┼----------┼-------------------------------------------------------
#>hermap~e │   height │        1        0      175       NA      175      175 
#>---------┼----------┼-------------------------------------------------------
#>    male │   height │       59        3  179.237  35.3916       66      264 
#>---------┼----------┼-------------------------------------------------------
#>    none │   height │        1        1      200       NA      200      200 
#>---------┼----------┼-------------------------------------------------------
#>      NA │   height │        3        0      120  40.7063       96      167

starwars %>% tab(gender, eye_color)
 
#>       gender │     eye_color │    Freq.  Percent     Cum. 
#>──────────────┼───────────────┼────────────────────────────
#>       female │         black │        2     2.30     2.30 
#>       female │          blue │        6     6.90     9.20 
#>       female │         brown │        5     5.75    14.94 
#>       female │         hazel │        2     2.30    17.24 
#>       female │     red, blue │        1     1.15    18.39 
#>       female │       unknown │        1     1.15    19.54 
#>       female │         white │        1     1.15    20.69 
#>       female │        yellow │        1     1.15    21.84 
#>--------------┼---------------┼----------------------------
#>hermaphrodite │        orange │        1     1.15    22.99 
#>--------------┼---------------┼----------------------------
#>         male │         black │        7     8.05    31.03 
#>         male │          blue │       13    14.94    45.98 
#>         male │     blue-gray │        1     1.15    47.13 
#>         male │         brown │       16    18.39    65.52 
#>         male │          dark │        1     1.15    66.67 
#>         male │          gold │        1     1.15    67.82 
#>         male │ green, yellow │        1     1.15    68.97 
#>         male │         hazel │        1     1.15    70.11 
#>         male │        orange │        7     8.05    78.16 
#>         male │          pink │        1     1.15    79.31 
#>         male │           red │        2     2.30    81.61 
#>         male │       unknown │        2     2.30    83.91 
#>         male │        yellow │        9    10.34    94.25 
#>--------------┼---------------┼----------------------------
#>         none │         black │        1     1.15    95.40 
#>         none │           red │        1     1.15    96.55 
#>--------------┼---------------┼----------------------------
#>           NA │           red │        2     2.30    98.85 
#>           NA │        yellow │        1     1.15   100.00 

You can install

  • The latest released version from CRAN with

     install.packages("statar")
  • The current version from github with

    devtools::install_github("matthieugomez/statar")

statar's People

Contributors

matthieugomez avatar eloualiche avatar

Watchers

James Cloos avatar Rodrigo 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.