Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rrrlw/dragonking
Software implementing published dragon king (DK) related statistical tools developed by the Erdi research group at the Center for Complex System Studies (CCSS) at Kalamazoo College.
https://github.com/rrrlw/dragonking
Last synced: about 9 hours ago
JSON representation
Software implementing published dragon king (DK) related statistical tools developed by the Erdi research group at the Center for Complex System Studies (CCSS) at Kalamazoo College.
- Host: GitHub
- URL: https://github.com/rrrlw/dragonking
- Owner: rrrlw
- License: apache-2.0
- Created: 2018-06-16T20:43:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-08T17:29:31.000Z (about 6 years ago)
- Last Synced: 2024-09-21T21:29:40.577Z (4 months ago)
- Language: R
- Size: 20.5 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dragonking: An R package implementing statistical tools for identification of dragon kings
[![Travis-CI Build Status](https://travis-ci.org/rrrlw/dragonking.svg?branch=master)](https://travis-ci.org/rrrlw/dragonking)
[![](http://www.r-pkg.org/badges/version/dragonking)](https://CRAN.R-project.org/package=dragonking)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![CRAN Downloads](http://cranlogs.r-pkg.org/badges/grand-total/dragonking)](https://CRAN.R-project.org/package=dragonking)## Purpose
The dragonking R package implements published statistical tests and test statistics for identification of dragon kings.
## Installation
To install the dragonking R package, run the following code in R:
```r
devtools::install_github("rrrlw/dragonking")
```Note that you need the devtools package to install dragonking from GitHub (at least until it is accepted into CRAN).
To install devtools and dragonking, run the following code in R:```r
# install and load devtools
install.packages("devtools")
library("devtools")# install dragonking
install_github("rrrlw/dragonking")
```## Example use
The following code demonstrates the use of dragonking with a mock dataset.
For examples of more detailed and varied use, please see the documentation and available vignettes.```r
# load dragonking package
library("dragonking")# create mock dataset with no dragon kings (DKs)
set.none <- rexp(100)# create mock dataset with 5 DKs
set.dk <- c(rexp(95),
15.1, 14.9, 15.0, 14.95, 15.09) # DKs# run DK test on dataset without DKs (we are looking for 2 DKs)
results.none <- dk_test(set.none, r = 2)
print(results.none["Test Statistic"]) # retrieve test stat
print(results.none["p-value"]) # retrieve p-value# run DK test on dataset with DKs (we are looking for 3 DKs)
dk_test(set.dk, r = 3) # print out test stat and p-value
```Please report any bugs, comments, suggestions, etc. regarding dragonking on the [GitHub issues page](https://github.com/rrrlw/dragonking/issues).