-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
79 lines (52 loc) · 2.3 KB
/
README.Rmd
File metadata and controls
79 lines (52 loc) · 2.3 KB
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# Package `genrs` <a href="https://wyaravms.github.io/genrs/"><img src="man/figures/logo.png" align="right" height="139" alt="genrs website" /></a>
<!-- badges: start -->
[](https://github.com/wyaravms/genrs/actions/workflows/R-CMD-check.yaml)
[](<Redirect-URL>)
[-blue.svg)](https://github.com/wyaravms/genrs/blob/main/LICENSE.md)
<!-- badges: end -->
Important Note: This package is just an example that I used to study how to create a package and add some elements to the documentation.
In this package, you will find functions that enable the generation of random samples from various distribution functions. The method used to generate these values was implemented using the Inverse Transform Sampling method.
## Installation
You can install the development version of genrs from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("wyaravms/genrs")
```
## Example
These are some basic examples using the functions available in the `genrs` package:
```{r example}
library(genrs)
```
Function `rburrxii` generates random data following a Burr XII distribution with parameters shape1 and shape2.
```{r burrxii}
rburrxii(10, 2, 3)
```
```{r, echo=TRUE, out.width="80%"}
hist(rburrxii(1000, 2, 4), freq = FALSE, main = "Histogram of the Sample")
```
Function `rparetoi` generates random data following a Pareto I distribution with parameters scale and shape.
```{r paretoi}
rparetoi(10, 3, 6)
```
```{r, echo=TRUE, out.width="80%"}
hist(rparetoi(1000, 10, 6), freq = FALSE, main = "Histogram of the Sample")
```
Function `rloglogis` generates random data following a Log-logistic distribution with parameters scale and shape.
```{r loglogis}
rloglogis(10, 3, 6)
```
```{r, echo=TRUE, out.width="80%"}
hist(rloglogis(1000, 1, 8), freq = FALSE, main = "Histogram of the Sample")
```