-
Notifications
You must be signed in to change notification settings - Fork 11
/
README.Rmd
114 lines (79 loc) · 2.56 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# descriptr
> Generate descriptive statistics
<!-- badges: start -->
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/descriptr)](https://cran.r-project.org/package=descriptr)
[![R-CMD-check](https://github.com/rsquaredacademy/descriptr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rsquaredacademy/descriptr/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/rsquaredacademy/descriptr/graph/badge.svg)](https://app.codecov.io/gh/rsquaredacademy/descriptr)
<!-- badges: end -->
## Installation
```{r cran-installation, eval = FALSE}
# Install release version from CRAN
install.packages("descriptr")
# Install development version from GitHub
# install.packages("devtools")
devtools::install_github("rsquaredacademy/descriptr")
# Install the development version from `rsquaredacademy` universe
install.packages("descriptr", repos = "https://rsquaredacademy.r-universe.dev")
```
## Articles
- [Continuous Data](https://descriptr.rsquaredacademy.com/articles/continuous-data.html)
- [Categorical Data](https://descriptr.rsquaredacademy.com/articles/categorical-data.html)
- [Visualization](https://descriptr.rsquaredacademy.com/articles/visualization.html)
## Usage
We will use a modified version of the `mtcars` data set in the below examples.
The only difference between the data sets is related to the variable types.
```{r load, eval=TRUE, echo=FALSE}
library(descriptr)
```
```{r egdata}
str(mtcarz)
```
### Continuous Data
#### Summary Statistics
```{r descript1}
ds_summary_stats(mtcarz, mpg)
```
#### Frequency Distribution
```{r descript4}
ds_freq_table(mtcarz, mpg)
```
### Categorical Data
#### One Way Table
```{r descript3}
ds_freq_table(mtcarz, cyl)
```
#### Two Way Table
```{r descript2}
ds_cross_table(mtcarz, cyl, gear)
```
### Group Summary
```{r descript5}
ds_group_summary(mtcarz, cyl, mpg)
```
#### Multiple Variable Statistics
```{r descriptr6}
ds_tidy_stats(mtcarz, mpg, disp, hp)
```
## Features
- Summary statistics
- Two way tables
- One way table
- Group wise summary
- Multiple variable statistics
- Multiple one way tables
- Multiple two way tables
## Getting Help
If you encounter a bug, please file a minimal reproducible example using
[reprex](https://reprex.tidyverse.org/index.html) on github. For questions and
clarifications, use [StackOverflow](https://stackoverflow.com/).