https://github.com/alinetalhouk/amisc
Miscellaneous Utility Functions
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.3%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Miscellaneous Utility Functions
Basic Info
- Host: GitHub
- Owner: AlineTalhouk
- Language: R
- Default Branch: master
- Size: 171 KB
Statistics
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
- Releases: 0
Created over 10 years ago
· Last pushed almost 2 years ago
Metadata Files
Readme
Changelog
README.Rmd
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
[](https://github.com/AlineTalhouk/Amisc/actions)
[](https://app.codecov.io/gh/AlineTalhouk/Amisc?branch=master)
# Amisc
The goal of Amisc is to obtain a descriptive statistics for various columns in a data.frame(df) according to a particular factor column(by1) in df.
We can select columns of our interests, wheter they are numerical or categorical. If input columns are solely in numerical type, Amisc will generate a summary table with Mean, Median, Total(optional) and Missing(if there is one) of the inputs and display it by different factors in by1.
On the other hand, if all input columns are categorical, Amisc counts all marginal totals(with precentage %)and Missing(if there is one) for each category in the inputs, and return the result table according to the factors in by1. If we have a mixture of numerical and factor inputs, Amisc will output two separated tables: one for categorical, and one for numerical.
## Installation
You can install Amisc from GitHub with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("AlineTalhouk/Amisc")
```
## Example
This is a basic example which shows you how to summarize different variable types:
```{r example}
# change column types as all columns in mtcars are originally numeric
mtcars$cyl <- as.factor(mtcars$cyl)
mtcars$vs <- as.character(mtcars$vs)
# categorical
Amisc::describeBy(data = mtcars, var.names = "vs", by1 = "cyl",
dispersion = "sd", Missing = TRUE, stats = "parametric")
# numerical
Amisc::describeBy(data = mtcars, var.names = "hp", by1 = "cyl",
dispersion = "sd", Missing = TRUE, stats = "parametric")
```
Owner
- Name: Aline Talhouk
- Login: AlineTalhouk
- Kind: user
- Website: AlineTalhouk.com
- Repositories: 3
- Profile: https://github.com/AlineTalhouk
GitHub Events
Total
Last Year
Dependencies
DESCRIPTION
cran
- R >= 3.2.0 depends
- dplyr * imports
- forcats * imports
- magrittr * imports
- purrr * imports
- rlang * imports
- scales * imports
- tidyr * imports
- covr * suggests
- testthat >= 3.0.0 suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite