├── .Rbuildignore
├── .github
├── .gitignore
└── workflows
│ ├── R-CMD-check.yaml
│ ├── rhub.yaml
│ └── test-coverage.yaml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── DESCRIPTION
├── LICENSE
├── LICENSE.md
├── NAMESPACE
├── NEWS.md
├── R
├── vdist-app.R
├── vdist-binomial.R
├── vdist-chisquare.R
├── vdist-data-prep.R
├── vdist-f.R
├── vdist-normal.R
├── vdist-plots.R
├── vdist-t.R
├── vdist-utils.R
├── vistributions.R
└── zzz.R
├── README.Rmd
├── README.md
├── _pkgdown.yml
├── codecov.yml
├── cran-comments.md
├── docs
├── 404.html
├── CNAME
├── CODE_OF_CONDUCT.html
├── LICENSE-text.html
├── LICENSE.html
├── articles
│ ├── index.html
│ ├── introduction-to-vistributions.html
│ └── introduction-to-vistributions_files
│ │ └── figure-html
│ │ ├── binom_per1-1.png
│ │ ├── binom_per2-1.png
│ │ ├── binom_plot-1.png
│ │ ├── binom_prob1-1.png
│ │ ├── binom_prob2-1.png
│ │ ├── binom_prob3-1.png
│ │ ├── binom_prob4-1.png
│ │ ├── chi_per1-1.png
│ │ ├── chi_per2-1.png
│ │ ├── chi_plot-1.png
│ │ ├── chi_plot-2.png
│ │ ├── chi_prob1-1.png
│ │ ├── chi_prob2-1.png
│ │ ├── f_per1-1.png
│ │ ├── f_per2-1.png
│ │ ├── f_plot-1.png
│ │ ├── f_plot-2.png
│ │ ├── f_prob1-1.png
│ │ ├── f_prob2-1.png
│ │ ├── norm_per1-1.png
│ │ ├── norm_per2-1.png
│ │ ├── norm_per3-1.png
│ │ ├── norm_plot-1.png
│ │ ├── norm_prob1-1.png
│ │ ├── norm_prob2-1.png
│ │ ├── norm_prob3-1.png
│ │ ├── t_per1-1.png
│ │ ├── t_per2-1.png
│ │ ├── t_per3-1.png
│ │ ├── t_plot-1.png
│ │ ├── t_prob1-1.png
│ │ ├── t_prob2-1.png
│ │ ├── t_prob3-1.png
│ │ └── t_prob4-1.png
├── authors.html
├── bootstrap-toc.css
├── bootstrap-toc.js
├── deps
│ ├── bootstrap-5.3.1
│ │ ├── bootstrap.bundle.min.js
│ │ ├── bootstrap.bundle.min.js.map
│ │ └── bootstrap.min.css
│ ├── bootstrap-toc-1.0.1
│ │ └── bootstrap-toc.min.js
│ ├── clipboard.js-2.0.11
│ │ └── clipboard.min.js
│ ├── data-deps.txt
│ ├── font-awesome-6.4.2
│ │ ├── css
│ │ │ ├── all.css
│ │ │ ├── all.min.css
│ │ │ ├── v4-shims.css
│ │ │ └── v4-shims.min.css
│ │ └── webfonts
│ │ │ ├── fa-brands-400.ttf
│ │ │ ├── fa-brands-400.woff2
│ │ │ ├── fa-regular-400.ttf
│ │ │ ├── fa-regular-400.woff2
│ │ │ ├── fa-solid-900.ttf
│ │ │ ├── fa-solid-900.woff2
│ │ │ ├── fa-v4compatibility.ttf
│ │ │ └── fa-v4compatibility.woff2
│ ├── headroom-0.11.0
│ │ ├── headroom.min.js
│ │ └── jQuery.headroom.min.js
│ ├── jquery-3.6.0
│ │ ├── jquery-3.6.0.js
│ │ ├── jquery-3.6.0.min.js
│ │ └── jquery-3.6.0.min.map
│ └── search-1.0.0
│ │ ├── autocomplete.jquery.min.js
│ │ ├── fuse.min.js
│ │ └── mark.min.js
├── docsearch.css
├── docsearch.js
├── docsearch.json
├── google02e424888b5e2def.html
├── hex_vistributions.png
├── index.html
├── katex-auto.js
├── lightswitch.js
├── link.svg
├── news
│ └── index.html
├── pkgdown.css
├── pkgdown.js
├── pkgdown.yml
├── reference
│ ├── Rplot001.png
│ ├── Rplot002.png
│ ├── Rplot003.png
│ ├── Rplot004.png
│ ├── Rplot005.png
│ ├── Rplot006.png
│ ├── Rplot007.png
│ ├── Rplot008.png
│ ├── Rplot009.png
│ ├── Rplot010.png
│ ├── figures
│ │ ├── README-binom-1.png
│ │ ├── README-normal-1.png
│ │ ├── README-normal-2.png
│ │ └── README-normal-3.png
│ ├── index.html
│ ├── vdist_binom_perc.html
│ ├── vdist_binom_plot-1.png
│ ├── vdist_binom_plot-2.png
│ ├── vdist_binom_plot-3.png
│ ├── vdist_binom_plot-4.png
│ ├── vdist_binom_plot-5.png
│ ├── vdist_binom_plot-6.png
│ ├── vdist_binom_plot-7.png
│ ├── vdist_binom_plot.html
│ ├── vdist_binom_prob.html
│ ├── vdist_chisquare_perc.html
│ ├── vdist_chisquare_plot-1.png
│ ├── vdist_chisquare_plot-2.png
│ ├── vdist_chisquare_plot-3.png
│ ├── vdist_chisquare_plot-4.png
│ ├── vdist_chisquare_plot-5.png
│ ├── vdist_chisquare_plot-6.png
│ ├── vdist_chisquare_plot-7.png
│ ├── vdist_chisquare_plot.html
│ ├── vdist_chisquare_prob.html
│ ├── vdist_f_perc.html
│ ├── vdist_f_plot-1.png
│ ├── vdist_f_plot-2.png
│ ├── vdist_f_plot-3.png
│ ├── vdist_f_plot-4.png
│ ├── vdist_f_plot-5.png
│ ├── vdist_f_plot-6.png
│ ├── vdist_f_plot.html
│ ├── vdist_f_prob.html
│ ├── vdist_launch_app.html
│ ├── vdist_norm_plot-1.png
│ ├── vdist_norm_plot-2.png
│ ├── vdist_norm_plot.html
│ ├── vdist_normal_perc.html
│ ├── vdist_normal_plot-1.png
│ ├── vdist_normal_plot-2.png
│ ├── vdist_normal_plot-3.png
│ ├── vdist_normal_plot-4.png
│ ├── vdist_normal_plot-5.png
│ ├── vdist_normal_plot-6.png
│ ├── vdist_normal_plot-7.png
│ ├── vdist_normal_plot-8.png
│ ├── vdist_normal_plot.html
│ ├── vdist_normal_prob.html
│ ├── vdist_t-1.png
│ ├── vdist_t-10.png
│ ├── vdist_t-2.png
│ ├── vdist_t-3.png
│ ├── vdist_t-4.png
│ ├── vdist_t-5.png
│ ├── vdist_t-6.png
│ ├── vdist_t-7.png
│ ├── vdist_t-8.png
│ ├── vdist_t-9.png
│ ├── vdist_t.html
│ ├── vdist_t_perc.html
│ ├── vdist_t_plot.html
│ ├── vdist_t_prob.html
│ ├── vistributions-package.html
│ └── vistributions.html
├── search.json
└── sitemap.xml
├── man
├── figures
│ ├── README-binom-1.png
│ ├── README-normal-1.png
│ ├── README-normal-2.png
│ └── README-normal-3.png
├── vdist_binom_plot.Rd
├── vdist_chisquare_plot.Rd
├── vdist_f_plot.Rd
├── vdist_launch_app.Rd
├── vdist_normal_plot.Rd
├── vdist_t.Rd
└── vistributions.Rd
├── tests
├── figs
│ ├── deps.txt
│ └── test-visual
│ │ ├── binomial-perc-lower.svg
│ │ ├── binomial-perc-upper.svg
│ │ ├── binomial-plot.svg
│ │ ├── binomial-prob-exact.svg
│ │ ├── binomial-prob-interval.svg
│ │ ├── binomial-prob-lower.svg
│ │ ├── binomial-prob-upper.svg
│ │ ├── chisquare-perc-lower.svg
│ │ ├── chisquare-perc-upper.svg
│ │ ├── chisquare-plot-1.svg
│ │ ├── chisquare-plot-1a.svg
│ │ ├── chisquare-plot-2.svg
│ │ ├── chisquare-plot-3.svg
│ │ ├── chisquare-prob-lower.svg
│ │ ├── chisquare-prob-upper.svg
│ │ ├── f-perc-lower.svg
│ │ ├── f-perc-upper.svg
│ │ ├── f-plot-1.svg
│ │ ├── f-plot-2.svg
│ │ ├── f-prob-lower.svg
│ │ ├── f-prob-upper.svg
│ │ ├── normal-perc-both.svg
│ │ ├── normal-perc-lower.svg
│ │ ├── normal-perc-upper.svg
│ │ ├── normal-plot-1.svg
│ │ ├── normal-plot-2.svg
│ │ ├── normal-prob-both.svg
│ │ ├── normal-prob-lower.svg
│ │ ├── normal-prob-upper.svg
│ │ ├── t-perc-both.svg
│ │ ├── t-perc-lower.svg
│ │ ├── t-perc-upper.svg
│ │ ├── t-plot-1.svg
│ │ ├── t-plot-2.svg
│ │ ├── t-plot-3.svg
│ │ ├── t-prob-both.svg
│ │ ├── t-prob-interval.svg
│ │ ├── t-prob-lower.svg
│ │ └── t-prob-upper.svg
├── testthat.R
└── testthat
│ ├── _snaps
│ └── visual
│ │ ├── binomial-perc-lower.svg
│ │ ├── binomial-perc-upper.svg
│ │ ├── binomial-plot.svg
│ │ ├── binomial-prob-exact.svg
│ │ ├── binomial-prob-interval.svg
│ │ ├── binomial-prob-lower.svg
│ │ ├── binomial-prob-upper.svg
│ │ ├── chisquare-perc-lower.svg
│ │ ├── chisquare-perc-upper.svg
│ │ ├── chisquare-plot-1.svg
│ │ ├── chisquare-plot-1a.svg
│ │ ├── chisquare-plot-2.svg
│ │ ├── chisquare-plot-3.svg
│ │ ├── chisquare-prob-lower.svg
│ │ ├── chisquare-prob-upper.svg
│ │ ├── f-perc-lower.svg
│ │ ├── f-perc-upper.svg
│ │ ├── f-plot-1.svg
│ │ ├── f-plot-2.svg
│ │ ├── f-prob-lower.svg
│ │ ├── f-prob-upper.svg
│ │ ├── normal-perc-both.svg
│ │ ├── normal-perc-lower.svg
│ │ ├── normal-perc-upper.svg
│ │ ├── normal-plot-1.svg
│ │ ├── normal-plot-2.svg
│ │ ├── normal-prob-both.svg
│ │ ├── normal-prob-lower.svg
│ │ ├── normal-prob-upper.svg
│ │ ├── t-perc-both.svg
│ │ ├── t-perc-lower.svg
│ │ ├── t-perc-upper.svg
│ │ ├── t-plot-1.svg
│ │ ├── t-plot-2.svg
│ │ ├── t-plot-3.svg
│ │ ├── t-prob-both.svg
│ │ ├── t-prob-interval.svg
│ │ ├── t-prob-lower.svg
│ │ └── t-prob-upper.svg
│ ├── test-binomial.R
│ ├── test-chisquare.R
│ ├── test-f.R
│ ├── test-normal.R
│ ├── test-t.R
│ └── test-visual.R
├── vignettes
├── .gitignore
└── introduction-to-vistributions.Rmd
└── vistributions.Rproj
/.Rbuildignore:
--------------------------------------------------------------------------------
1 | ^.*\.Rproj$
2 | ^\.Rproj\.user$
3 | ^\.travis\.yml$
4 | ^appveyor\.yml$
5 | ^cran-comments\.md$
6 | ^README\.Rmd$
7 | ^codecov\.yml$
8 | ^NEWS$
9 | ^_pkgdown\.yml$
10 | ^docs$
11 | ^README-.*\.png$
12 | ^CODE_OF_CONDUCT\.md$
13 | ^LICENSE\.md$
14 | ^revdep$
15 | ^hex_vistributions\.png$
16 |
17 | ^\.github$
18 |
--------------------------------------------------------------------------------
/.github/.gitignore:
--------------------------------------------------------------------------------
1 | *.html
2 |
--------------------------------------------------------------------------------
/.github/workflows/R-CMD-check.yaml:
--------------------------------------------------------------------------------
1 | # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2 | # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3 | on:
4 | push:
5 | branches: [master, develop]
6 | pull_request:
7 | branches: [master, develop]
8 |
9 | name: R-CMD-check.yaml
10 |
11 | permissions: read-all
12 |
13 | jobs:
14 | R-CMD-check:
15 | runs-on: ${{ matrix.config.os }}
16 |
17 | name: ${{ matrix.config.os }} (${{ matrix.config.r }})
18 |
19 | strategy:
20 | fail-fast: false
21 | matrix:
22 | config:
23 | - {os: macos-latest, r: 'release'}
24 | - {os: windows-latest, r: 'release'}
25 | - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
26 | - {os: ubuntu-latest, r: 'release'}
27 | - {os: ubuntu-latest, r: 'oldrel-1'}
28 |
29 | env:
30 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
31 | R_KEEP_PKG_SOURCE: yes
32 |
33 | steps:
34 | - uses: actions/checkout@v4
35 |
36 | - uses: r-lib/actions/setup-pandoc@v2
37 |
38 | - uses: r-lib/actions/setup-r@v2
39 | with:
40 | r-version: ${{ matrix.config.r }}
41 | http-user-agent: ${{ matrix.config.http-user-agent }}
42 | use-public-rspm: true
43 |
44 | - uses: r-lib/actions/setup-r-dependencies@v2
45 | with:
46 | extra-packages: any::rcmdcheck
47 | needs: check
48 |
49 | - uses: r-lib/actions/check-r-package@v2
50 | with:
51 | upload-snapshots: true
52 | build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
53 |
--------------------------------------------------------------------------------
/.github/workflows/rhub.yaml:
--------------------------------------------------------------------------------
1 | # R-hub's generic GitHub Actions workflow file. It's canonical location is at
2 | # https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
3 | # You can update this file to a newer version using the rhub2 package:
4 | #
5 | # rhub::rhub_setup()
6 | #
7 | # It is unlikely that you need to modify this file manually.
8 |
9 | name: R-hub
10 | run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"
11 |
12 | on:
13 | workflow_dispatch:
14 | inputs:
15 | config:
16 | description: 'A comma separated list of R-hub platforms to use.'
17 | type: string
18 | default: 'linux,windows,macos'
19 | name:
20 | description: 'Run name. You can leave this empty now.'
21 | type: string
22 | id:
23 | description: 'Unique ID. You can leave this empty now.'
24 | type: string
25 |
26 | jobs:
27 |
28 | setup:
29 | runs-on: ubuntu-latest
30 | outputs:
31 | containers: ${{ steps.rhub-setup.outputs.containers }}
32 | platforms: ${{ steps.rhub-setup.outputs.platforms }}
33 |
34 | steps:
35 | # NO NEED TO CHECKOUT HERE
36 | - uses: r-hub/actions/setup@v1
37 | with:
38 | config: ${{ github.event.inputs.config }}
39 | id: rhub-setup
40 |
41 | linux-containers:
42 | needs: setup
43 | if: ${{ needs.setup.outputs.containers != '[]' }}
44 | runs-on: ubuntu-latest
45 | name: ${{ matrix.config.label }}
46 | strategy:
47 | fail-fast: false
48 | matrix:
49 | config: ${{ fromJson(needs.setup.outputs.containers) }}
50 | container:
51 | image: ${{ matrix.config.container }}
52 |
53 | steps:
54 | - uses: r-hub/actions/checkout@v1
55 | - uses: r-hub/actions/platform-info@v1
56 | with:
57 | token: ${{ secrets.RHUB_TOKEN }}
58 | job-config: ${{ matrix.config.job-config }}
59 | - uses: r-hub/actions/setup-deps@v1
60 | with:
61 | token: ${{ secrets.RHUB_TOKEN }}
62 | job-config: ${{ matrix.config.job-config }}
63 | - uses: r-hub/actions/run-check@v1
64 | with:
65 | token: ${{ secrets.RHUB_TOKEN }}
66 | job-config: ${{ matrix.config.job-config }}
67 |
68 | other-platforms:
69 | needs: setup
70 | if: ${{ needs.setup.outputs.platforms != '[]' }}
71 | runs-on: ${{ matrix.config.os }}
72 | name: ${{ matrix.config.label }}
73 | strategy:
74 | fail-fast: false
75 | matrix:
76 | config: ${{ fromJson(needs.setup.outputs.platforms) }}
77 |
78 | steps:
79 | - uses: r-hub/actions/checkout@v1
80 | - uses: r-hub/actions/setup-r@v1
81 | with:
82 | job-config: ${{ matrix.config.job-config }}
83 | token: ${{ secrets.RHUB_TOKEN }}
84 | - uses: r-hub/actions/platform-info@v1
85 | with:
86 | token: ${{ secrets.RHUB_TOKEN }}
87 | job-config: ${{ matrix.config.job-config }}
88 | - uses: r-hub/actions/setup-deps@v1
89 | with:
90 | job-config: ${{ matrix.config.job-config }}
91 | token: ${{ secrets.RHUB_TOKEN }}
92 | - uses: r-hub/actions/run-check@v1
93 | with:
94 | job-config: ${{ matrix.config.job-config }}
95 | token: ${{ secrets.RHUB_TOKEN }}
96 |
--------------------------------------------------------------------------------
/.github/workflows/test-coverage.yaml:
--------------------------------------------------------------------------------
1 | # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2 | # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3 | on:
4 | push:
5 | branches: [master, develop]
6 | pull_request:
7 | branches: [master, develop]
8 |
9 | name: test-coverage.yaml
10 |
11 | permissions: read-all
12 |
13 | jobs:
14 | test-coverage:
15 | runs-on: ubuntu-latest
16 | env:
17 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18 |
19 | steps:
20 | - uses: actions/checkout@v4
21 |
22 | - uses: r-lib/actions/setup-r@v2
23 | with:
24 | use-public-rspm: true
25 |
26 | - uses: r-lib/actions/setup-r-dependencies@v2
27 | with:
28 | extra-packages: any::covr, any::xml2
29 | needs: coverage
30 |
31 | - name: Test coverage
32 | run: |
33 | cov <- covr::package_coverage(
34 | quiet = FALSE,
35 | clean = FALSE,
36 | install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
37 | )
38 | covr::to_cobertura(cov)
39 | shell: Rscript {0}
40 |
41 | - uses: codecov/codecov-action@v4
42 | with:
43 | fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
44 | file: ./cobertura.xml
45 | plugin: noop
46 | disable_search: true
47 | token: ${{ secrets.CODECOV_TOKEN }}
48 |
49 | - name: Show testthat output
50 | if: always()
51 | run: |
52 | ## --------------------------------------------------------------------
53 | find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
54 | shell: bash
55 |
56 | - name: Upload test results
57 | if: failure()
58 | uses: actions/upload-artifact@v4
59 | with:
60 | name: coverage-test-failures
61 | path: ${{ runner.temp }}/package
62 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | inst/doc
2 | .Rproj.user
3 | .Rhistory
4 | .RData
5 | .Ruserdata
6 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Code of Conduct
2 |
3 | As contributors and maintainers of this project, we pledge to respect all people who
4 | contribute through reporting issues, posting feature requests, updating documentation,
5 | submitting pull requests or patches, and other activities.
6 |
7 | We are committed to making participation in this project a harassment-free experience for
8 | everyone, regardless of level of experience, gender, gender identity and expression,
9 | sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
10 |
11 | Examples of unacceptable behavior by participants include the use of sexual language or
12 | imagery, derogatory comments or personal attacks, trolling, public or private harassment,
13 | insults, or other unprofessional conduct.
14 |
15 | Project maintainers have the right and responsibility to remove, edit, or reject comments,
16 | commits, code, wiki edits, issues, and other contributions that are not aligned to this
17 | Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
18 | from the project team.
19 |
20 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
21 | opening an issue or contacting one or more of the project maintainers.
22 |
23 | This Code of Conduct is adapted from the Contributor Covenant
24 | (http://contributor-covenant.org), version 1.0.0, available at
25 | http://contributor-covenant.org/version/1/0/0/
26 |
--------------------------------------------------------------------------------
/DESCRIPTION:
--------------------------------------------------------------------------------
1 | Package: vistributions
2 | Type: Package
3 | Title: Visualize Probability Distributions
4 | Version: 0.2.0.9000
5 | Authors@R: person("Aravind", "Hebbali", email = "hebbali.aravind@gmail.com", role = c("aut", "cre"))
6 | Description: Visualize and compute percentiles/probabilities of normal, t, f, chi square
7 | and binomial distributions.
8 | Depends:
9 | R(>= 3.2)
10 | Imports:
11 | ggplot2,
12 | magrittr,
13 | stats,
14 | utils
15 | Suggests:
16 | covr,
17 | knitr,
18 | rmarkdown,
19 | testthat,
20 | vdiffr,
21 | xplorerr
22 | License: MIT + file LICENSE
23 | URL: https://github.com/rsquaredacademy/vistributions, https://vistributions.rsquaredacademy.com
24 | BugReports: https://github.com/rsquaredacademy/vistributions/issues
25 | Encoding: UTF-8
26 | RoxygenNote: 7.3.2
27 | VignetteBuilder: knitr
28 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | YEAR: 2018
2 | COPYRIGHT HOLDER: Aravind Hebbali
3 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # MIT License
2 |
3 | Copyright (c) 2018 Aravind Hebbali
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/NAMESPACE:
--------------------------------------------------------------------------------
1 | # Generated by roxygen2: do not edit by hand
2 |
3 | export(vdist_binom_perc)
4 | export(vdist_binom_plot)
5 | export(vdist_binom_prob)
6 | export(vdist_chisquare_perc)
7 | export(vdist_chisquare_plot)
8 | export(vdist_chisquare_prob)
9 | export(vdist_f_perc)
10 | export(vdist_f_plot)
11 | export(vdist_f_prob)
12 | export(vdist_launch_app)
13 | export(vdist_normal_perc)
14 | export(vdist_normal_plot)
15 | export(vdist_normal_prob)
16 | export(vdist_t_perc)
17 | export(vdist_t_plot)
18 | export(vdist_t_prob)
19 | import(ggplot2)
20 | import(magrittr)
21 | import(stats)
22 | import(utils)
23 |
--------------------------------------------------------------------------------
/NEWS.md:
--------------------------------------------------------------------------------
1 | # vistributions 0.2.0.9000
2 |
3 | # vistributions 0.2.0
4 |
5 | This is a minor release for bug fixes.
6 |
7 | # vistributions 0.1.2
8 |
9 | This is a patch release to fix CRAN note about lazy data.
10 |
11 | # vistributions 0.1.1
12 |
13 | This is a patch release to fix bugs in the app.
14 |
15 | # vistributions 0.1.0
16 |
17 | * Added a `NEWS.md` file to track changes to the package.
18 |
--------------------------------------------------------------------------------
/R/vdist-app.R:
--------------------------------------------------------------------------------
1 | #' @title Launch shiny app
2 | #' @description Launches shiny app for visualizing distributions.
3 | #' @examples
4 | #' \dontrun{
5 | #' vdist_launch_app ()
6 | #' }
7 | #' @export
8 | #'
9 | vdist_launch_app <- function() {
10 |
11 | xplorerr::app_vistributions()
12 | }
13 |
--------------------------------------------------------------------------------
/R/vdist-binomial.R:
--------------------------------------------------------------------------------
1 | #' Visualize binomial distribution
2 | #'
3 | #' Visualize how changes in number of trials and the probability of
4 | #' success affect the shape of the binomial distribution. Compute & visualize
5 | #' probability from a given quantile and quantiles out of given probability.
6 | #'
7 | #' @param n Number of trials.
8 | #' @param p Aggregate probability.
9 | #' @param s Number of success.
10 | #' @param type Lower/upper/exact/interval.
11 | #' @param tp Probability of success in a trial.
12 | #' @param print_plot logical; if \code{TRUE}, prints the plot else returns a plot object.
13 | #'
14 | #' @examples
15 | #' # visualize binomial distribution
16 | #' vdist_binom_plot(10, 0.3)
17 | #'
18 | #' # visualize probability from a given quantile
19 | #' vdist_binom_prob(10, 0.3, 4, type = 'exact')
20 | #' vdist_binom_prob(10, 0.3, 4, type = 'lower')
21 | #' vdist_binom_prob(10, 0.3, 4, type = 'upper')
22 | #' vdist_binom_prob(10, 0.3, c(4, 6), type = 'interval')
23 | #'
24 | #'
25 | #' # visualize quantiles out of given probability
26 | #' vdist_binom_perc(10, 0.5, 0.05)
27 | #' vdist_binom_perc(10, 0.5, 0.05, "upper")
28 | #'
29 | #' @seealso \code{\link[stats]{Binomial}}
30 | #'
31 | #'
32 | #' @export
33 | #'
34 | vdist_binom_plot <- function(n = 10, p = 0.3, print_plot = TRUE) {
35 |
36 | check_numeric(n)
37 | check_numeric(p, "p")
38 | check_range(p)
39 |
40 | data <- bplot_data_prep(n, p)
41 | plot <- bplot_plot_build(data, n, p)
42 |
43 | if (print_plot) {
44 | print(plot)
45 | } else {
46 | return(plot)
47 | }
48 |
49 | }
50 |
51 | #' @rdname vdist_binom_plot
52 | #' @export
53 | #'
54 | vdist_binom_prob <- function(n = 10, p = 0.3, s = 4, type = c("lower", "upper", "exact", "interval"), print_plot = TRUE) {
55 |
56 | check_range(p)
57 | check_numeric(n)
58 | check_numeric(p, "p")
59 | check_numeric(s, "s")
60 |
61 | method <- match.arg(type)
62 |
63 | if (method == "interval") {
64 | if (length(s) != 2) {
65 | stop("Please specify an interval for s.", call. = FALSE)
66 | }
67 | }
68 |
69 | if (any(s > n)) {
70 | stop("s must be less than or equal to n.", call. = FALSE)
71 | }
72 |
73 | data <- bprob_data_prep(n, p, s, method)
74 | plot <- bprob_plot_build(data, method, n, p, s)
75 |
76 | if (print_plot) {
77 | print(plot)
78 | } else {
79 | return(plot)
80 | }
81 |
82 | }
83 |
84 | #' @rdname vdist_binom_plot
85 | #' @export
86 | #'
87 | vdist_binom_perc <- function(n = 10, p = 0.5, tp = 0.05, type = c("lower", "upper"), print_plot = TRUE) {
88 |
89 | check_numeric(n)
90 | check_numeric(p, "p")
91 | check_numeric(tp, "tp")
92 | check_range(p)
93 | check_range(tp, 0, 0.5, "tp")
94 |
95 | method <- match.arg(type)
96 | data <- bperc_data_prep(n, p, tp, method)
97 | plot <- bperc_plot_build(data, method, n, p, tp)
98 |
99 | if (print_plot) {
100 | print(plot)
101 | } else {
102 | return(plot)
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/R/vdist-chisquare.R:
--------------------------------------------------------------------------------
1 | #' Visualize chi square distribution
2 | #'
3 | #' Visualize how changes in degrees of freedom affect the shape of
4 | #' the chi square distribution. Compute & visualize quantiles out of given
5 | #' probability and probability from a given quantile.
6 | #'
7 | #' @param df Degrees of freedom.
8 | #' @param probs Probability value.
9 | #' @param perc Quantile value.
10 | #' @param type Lower tail or upper tail.
11 | #' @param normal If \code{TRUE}, normal curve with same \code{mean} and
12 | #' \code{sd} as the chi square distribution is drawn.
13 | #' @param xaxis_range The upper range of the X axis.
14 | #' @param print_plot logical; if \code{TRUE}, prints the plot else returns a plot object.
15 | #'
16 | #' @examples
17 | #' # visualize chi square distribution
18 | #' vdist_chisquare_plot()
19 | #' vdist_chisquare_plot(df = 5)
20 | #' vdist_chisquare_plot(df = 5, normal = TRUE)
21 | #'
22 | #' # visualize quantiles out of given probability
23 | #' vdist_chisquare_perc(0.165, 8, 'lower')
24 | #' vdist_chisquare_perc(0.22, 13, 'upper')
25 | #'
26 | #' # visualize probability from a given quantile.
27 | #' vdist_chisquare_prob(13.58, 11, 'lower')
28 | #' vdist_chisquare_prob(15.72, 13, 'upper')
29 | #'
30 | #' @seealso \code{\link[stats]{Chisquare}}
31 | #'
32 | #' @export
33 | #'
34 | vdist_chisquare_plot <- function(df = 3, normal = FALSE, xaxis_range = 25, print_plot = TRUE) {
35 |
36 | check_numeric(df, "df")
37 | check_logical(normal)
38 |
39 | data <- cplot_data_prep(df, xaxis_range)
40 | plot <- cplot_plot_build(data, df, xaxis_range, normal)
41 |
42 | if (print_plot) {
43 | print(plot)
44 | } else {
45 | return(plot)
46 | }
47 |
48 | }
49 |
50 | #' @rdname vdist_chisquare_plot
51 | #' @export
52 | #'
53 | vdist_chisquare_perc <- function(probs = 0.95, df = 3, type = c("lower", "upper"), print_plot = TRUE) {
54 |
55 | check_numeric(probs, "probs")
56 | check_numeric(df, "df")
57 | check_range(probs, 0, 1, "probs")
58 |
59 | method <- match.arg(type)
60 | data <- cperc_data_prep(probs, df, method)
61 | plot <- cperc_plot_build(data, method, probs, df)
62 |
63 | if (print_plot) {
64 | print(plot)
65 | } else {
66 | return(plot)
67 | }
68 |
69 | }
70 |
71 | #' @rdname vdist_chisquare_plot
72 | #' @export
73 | #'
74 | vdist_chisquare_prob <- function(perc = 13, df = 11, type = c("lower", "upper"), print_plot = TRUE) {
75 |
76 | check_numeric(df, "df")
77 | check_numeric(perc, "perc")
78 |
79 | method <- match.arg(type)
80 | data <- cprob_data_prep(perc, df, method)
81 | plot <- cprob_plot_build(data, method, perc, df)
82 |
83 | if (print_plot) {
84 | print(plot)
85 | } else {
86 | return(plot)
87 | }
88 |
89 | }
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/R/vdist-f.R:
--------------------------------------------------------------------------------
1 | #' Visualize f distribution
2 | #'
3 | #' @description Visualize how changes in degrees of freedom affect the
4 | #' shape of the F distribution. Compute & visualize quantiles out of given
5 | #' probability and probability from a given quantile.
6 | #'
7 | #' @param num_df Degrees of freedom associated with the numerator of f statistic.
8 | #' @param den_df Degrees of freedom associated with the denominator of f statistic.
9 | #' @param normal If \code{TRUE}, normal curve with same \code{mean} and
10 | #' \code{sd} as the F distribution is drawn.
11 | #' @param probs Probability value.
12 | #' @param perc Quantile value.
13 | #' @param type Lower tail or upper tail.
14 | #' @param print_plot logical; if \code{TRUE}, prints the plot else returns a plot object.
15 | #'
16 | #' @examples
17 | #' # visualize F distribution
18 | #' vdist_f_plot()
19 | #' vdist_f_plot(6, 10, normal = TRUE)
20 | #'
21 | #' # visualize probability from a given quantile
22 | #' vdist_f_perc(0.95, 3, 30, 'lower')
23 | #' vdist_f_perc(0.125, 9, 35, 'upper')
24 | #'
25 | #' # visualize quantiles out of given probability
26 | #' vdist_f_prob(2.35, 5, 32)
27 | #' vdist_f_prob(1.5222, 9, 35, type = "upper")
28 | #'
29 | #' @seealso \code{\link[stats]{FDist}}
30 | #'
31 | #' @export
32 | #'
33 | vdist_f_plot <- function(num_df = 4, den_df = 30, normal = FALSE, print_plot = TRUE) {
34 |
35 | check_numeric(num_df, "num_df")
36 | check_numeric(den_df, "den_df")
37 | check_logical(normal)
38 |
39 | data <- fplot_data_prep(num_df, den_df)
40 | plot <- fplot_plot_build(data, num_df, den_df, normal)
41 |
42 | if (print_plot) {
43 | print(plot)
44 | } else {
45 | return(plot)
46 | }
47 |
48 | }
49 |
50 | #' @rdname vdist_f_plot
51 | #' @export
52 | #'
53 | vdist_f_perc <- function(probs = 0.95, num_df = 3, den_df = 30, type = c("lower", "upper"), print_plot = TRUE) {
54 |
55 | check_numeric(num_df, "num_df")
56 | check_numeric(den_df, "den_df")
57 | check_numeric(probs, "probs")
58 | check_range(probs, 0, 1, "probs")
59 |
60 | method <- match.arg(type)
61 | data <- fperc_data_prep(probs, num_df, den_df, method)
62 | plot <- fperc_plot_build(data, probs, num_df, den_df, method)
63 |
64 | if (print_plot) {
65 | print(plot)
66 | } else {
67 | return(plot)
68 | }
69 |
70 | }
71 |
72 | #' @rdname vdist_f_plot
73 | #' @export
74 | #'
75 | vdist_f_prob <- function(perc = 2.35, num_df = 5, den_df = 32, type = c("lower", "upper"), print_plot = TRUE) {
76 |
77 | check_numeric(perc, "perc")
78 | check_numeric(num_df, "num_df")
79 | check_numeric(den_df, "den_df")
80 |
81 | method <- match.arg(type)
82 | data <- fprob_data_prep(perc, num_df, den_df, method)
83 | plot <- fprob_plot_build(data, perc, num_df, den_df, method)
84 |
85 | if (print_plot) {
86 | print(plot)
87 | } else {
88 | return(plot)
89 | }
90 |
91 | }
92 |
93 |
--------------------------------------------------------------------------------
/R/vdist-normal.R:
--------------------------------------------------------------------------------
1 | #' Visualize normal distribution
2 | #'
3 | #' Visualize how changes in mean and standard deviation affect the
4 | #' shape of the normal distribution. Compute & visualize quantiles out of given
5 | #' probability and probability from a given quantile.
6 | #'
7 | #' @param mean Mean of the normal distribution.
8 | #' @param perc Quantile value.
9 | #' @param sd Standard deviation of the normal distribution.
10 | #' @param probs Probability value.
11 | #' @param type Lower tail, upper tail or both.
12 | #' @param print_plot logical; if \code{TRUE}, prints the plot else returns a plot object.
13 | #'
14 | #' @examples
15 | #' # visualize normal distribution
16 | #' vdist_normal_plot()
17 | #' vdist_normal_plot(mean = 2, sd = 0.6)
18 | #'
19 | #' # visualize quantiles out of given probability
20 | #' vdist_normal_perc(0.95, mean = 2, sd = 1.36)
21 | #' vdist_normal_perc(0.3, mean = 2, sd = 1.36, type = 'upper')
22 | #' vdist_normal_perc(0.95, mean = 2, sd = 1.36, type = 'both')
23 | #'
24 | #' # visualize probability from a given quantile
25 | #' vdist_normal_prob(3.78, mean = 2, sd = 1.36)
26 | #' vdist_normal_prob(3.43, mean = 2, sd = 1.36, type = 'upper')
27 | #' vdist_normal_prob(c(-1.74, 1.83), type = 'both')
28 | #'
29 | #' @seealso \code{\link[stats]{Normal}}
30 | #'
31 | #' @export
32 | #'
33 | vdist_normal_plot <- function(mean = 0, sd = 1, print_plot = TRUE) {
34 |
35 | check_numeric(mean, "mean")
36 | check_numeric(sd, "sd")
37 | check_positive(sd)
38 |
39 | data <- nplot_data_prep(mean, sd)
40 | plot <- nplot_plot_build(data, mean, sd)
41 |
42 | if (print_plot) {
43 | print(plot)
44 | } else {
45 | return(plot)
46 | }
47 |
48 | }
49 |
50 | #' @rdname vdist_normal_plot
51 | #' @export
52 | #'
53 | vdist_normal_perc <- function(probs = 0.95, mean = 0, sd = 1, type = c("lower", "upper", "both"), print_plot = TRUE) {
54 |
55 | check_numeric(mean, "mean")
56 | check_numeric(sd, "sd")
57 | check_positive(sd)
58 | check_numeric(probs, "probs")
59 | check_range(probs, 0, 1, "probs")
60 |
61 | method <- match.arg(type)
62 | data <- nperc_data_prep(probs, mean, sd, method)
63 | plot <- nperc_plot_build(data, probs, mean, sd, method)
64 |
65 | if (print_plot) {
66 | print(plot)
67 | } else {
68 | return(plot)
69 | }
70 |
71 | }
72 |
73 | #' @rdname vdist_normal_plot
74 | #' @export
75 | #'
76 | vdist_normal_prob <- function(perc = 3, mean = 0, sd = 1, type = c("lower", "upper", "both"), print_plot = TRUE) {
77 |
78 | method <- match.arg(type)
79 |
80 | if (length(perc) == 2) {
81 | method <- "both"
82 | }
83 |
84 | check_numeric(mean, "mean")
85 | check_numeric(sd, "sd")
86 | check_numeric(perc, "perc")
87 | check_positive(sd)
88 |
89 | if (length(perc) > 2) {
90 | stop("Please do not specify more than 2 percentile values.", call. = FALSE)
91 | }
92 |
93 | if ((method == "both") & (length(perc) != 2)) {
94 | stop("Specify two percentile values.", call. = FALSE)
95 | }
96 |
97 | data <- nprob_data_prep(perc, mean, sd, method)
98 | plot <- nprob_plot_build(data, perc, mean, sd, method)
99 |
100 | if (print_plot) {
101 | print(plot)
102 | } else {
103 | return(plot)
104 | }
105 |
106 | }
107 |
--------------------------------------------------------------------------------
/R/vdist-t.R:
--------------------------------------------------------------------------------
1 | #' Visualize t distribution
2 | #'
3 | #' Visualize how degrees of freedom affect the shape of t
4 | #' distribution, visualize quantiles out of given probability and
5 | #' probability from a given quantile.
6 | #'
7 | #' @param df Degrees of freedom.
8 | #' @param probs Probability value.
9 | #' @param perc Quantile value.
10 | #' @param type Lower tail, upper tail, interval or both.
11 | #' @param print_plot logical; if \code{TRUE}, prints the plot else returns a plot object.
12 | #'
13 | #' @examples
14 | #' # visualize t distribution
15 | #' vdist_t_plot()
16 | #' vdist_t_plot(6)
17 | #' vdist_t_plot(df = 8)
18 | #'
19 | #' # visualize quantiles out of given probability
20 | #' vdist_t_perc(probs = 0.95, df = 4, type = 'lower')
21 | #' vdist_t_perc(probs = 0.35, df = 4, type = 'upper')
22 | #' vdist_t_perc(probs = 0.69, df = 7, type = 'both')
23 | #'
24 | #' # visualize probability from a given quantile
25 | #' vdist_t_prob(2.045, 7, 'lower')
26 | #' vdist_t_prob(0.945, 7, 'upper')
27 | #' vdist_t_prob(1.445, 7, 'interval')
28 | #' vdist_t_prob(1.6, 7, 'both')
29 | #'
30 | #' @seealso \code{\link[stats]{TDist}}
31 | #'
32 | #' @name vdist_t
33 | NULL
34 |
35 | #' @export
36 | #' @rdname vdist_t
37 | #'
38 | vdist_t_plot <- function(df = 3, print_plot = TRUE) {
39 |
40 | check_numeric(df, "df")
41 |
42 | data <- tplot_data_prep(df)
43 | plot <- tplot_plot_build(data, df)
44 |
45 | if (print_plot) {
46 | print(plot)
47 | } else {
48 | return(plot)
49 | }
50 |
51 | }
52 |
53 | #' @rdname vdist_t
54 | #' @export
55 | #'
56 | vdist_t_perc <- function(probs = 0.95, df = 4, type = c("lower", "upper", "both"), print_plot = TRUE) {
57 |
58 | check_numeric(probs, "probs")
59 | check_numeric(df, "df")
60 | check_range(probs, 0, 1, "probs")
61 |
62 | method <- match.arg(type)
63 | data <- tperc_data_prep(probs, df, method)
64 | plot <- tperc_plot_build(data, probs, df, method)
65 |
66 | if (print_plot) {
67 | print(plot)
68 | } else {
69 | return(plot)
70 | }
71 |
72 | }
73 |
74 | #' @rdname vdist_t
75 | #' @export
76 | #'
77 | vdist_t_prob <- function(perc = 1.6, df = 7, type = c("lower", "upper", "interval", "both"), print_plot = TRUE) {
78 |
79 | check_numeric(perc, "perc")
80 | check_numeric(df, "df")
81 | method <- match.arg(type)
82 |
83 | data <- tprob_data_prep(perc, df, method)
84 | plot <- tprob_plot_build(data, perc, df, method)
85 |
86 | if (print_plot) {
87 | print(plot)
88 | } else {
89 | return(plot)
90 | }
91 |
92 | }
93 |
94 |
--------------------------------------------------------------------------------
/R/vdist-utils.R:
--------------------------------------------------------------------------------
1 | #' @import utils
2 | #' @import ggplot2
3 | check_suggests <- function(pkg) {
4 |
5 | pkg_flag <- tryCatch(packageVersion(pkg), error = function(e) NA)
6 |
7 | if (is.na(pkg_flag)) {
8 |
9 | msg <- message(paste0('\n', pkg, ' must be installed for this functionality.'))
10 |
11 | if (interactive()) {
12 | message(msg, "\nWould you like to install it?")
13 | if (menu(c("Yes", "No")) == 1) {
14 | install.packages(pkg)
15 | } else {
16 | stop(msg, call. = FALSE)
17 | }
18 | } else {
19 | stop(msg, call. = FALSE)
20 | }
21 | }
22 |
23 | }
24 |
25 | check_numeric <- function(val, var = "n") {
26 | if (!is.numeric(val)) {
27 | stop(paste(var, "must be numeric."), call. = FALSE)
28 | }
29 | }
30 |
31 | check_logical <- function(val, var = "normal") {
32 | if (!is.logical(val)) {
33 | stop(paste(var, "must be a logical value."), call. = FALSE)
34 | }
35 | }
36 |
37 | check_positive <- function(val, var = "sd") {
38 | if (val < 0) {
39 | stop(paste(var, "must be a positive value."), call. = FALSE)
40 | }
41 | }
42 |
43 | check_range <- function(val, min = 0, max = 1, var = "p") {
44 | if ((val < min) | (val > max)) {
45 | stop(paste(var, "must be between", min, "and", max, "only."), call. = FALSE)
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/R/vistributions.R:
--------------------------------------------------------------------------------
1 | #' \code{vistributions} package
2 | #'
3 | #' Visualize probability distributions.
4 | #'
5 | #' @docType package
6 | #' @keywords internal
7 | #' @name vistributions
8 | #' @aliases vistributions-package
9 | "_PACKAGE"
10 | NULL
11 |
12 | ## quiets concerns of R CMD check re: the .'s that appear in pipelines
13 | if (getRversion() >= "2.15.1") {
14 | globalVariables(c(
15 | ".", "df", "chi", "x", "y", "z", "x1", "x2"
16 | ))
17 | }
18 |
--------------------------------------------------------------------------------
/R/zzz.R:
--------------------------------------------------------------------------------
1 | #' @import magrittr
2 | #' @import stats
3 | .onAttach <- function(...) {
4 |
5 | if (!interactive() || runif(1) > 0.1) return()
6 |
7 | pkgs <- available.packages()
8 |
9 | cran_version <-
10 | pkgs %>%
11 | extract("vistributions", "Version") %>%
12 | package_version()
13 |
14 | local_version <- packageVersion("vistributions")
15 | behind_cran <- cran_version > local_version
16 |
17 | tips <- c(
18 | "Learn more about vistributions at https://github.com/rsquaredacademy/vistributions/.",
19 | "Use suppressPackageStartupMessages() to eliminate package startup messages.",
20 | "You might like our blog. Visit: https://blog.rsquaredacademy.com",
21 | "Check out all our R packages. Visit: https://pkgs.rsquaredacademy.com/."
22 | )
23 |
24 | tip <- sample(tips, 1)
25 |
26 | if (interactive()) {
27 | if (behind_cran) {
28 | msg <- "A new version of vistributions is available with bug fixes and new features."
29 | packageStartupMessage(msg, "\nWould you like to install it?")
30 | if (menu(c("Yes", "No")) == 1) {
31 | update.packages("vistributions")
32 | }
33 | } else {
34 | packageStartupMessage(paste(strwrap(tip), collapse = "\n"))
35 | }
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/README.Rmd:
--------------------------------------------------------------------------------
1 | ---
2 | output: github_document
3 | ---
4 |
5 |
6 |
7 | ```{r setup, include = FALSE}
8 | knitr::opts_chunk$set(
9 | collapse = TRUE,
10 | comment = "#>",
11 | fig.path = "man/figures/README-",
12 | out.width = "100%"
13 | )
14 | ```
15 | # vistributions
16 |
17 | > Visualize probability distributions
18 |
19 |
20 | [](https://cran.r-project.org/package=vistributions)
21 | [](https://github.com/rsquaredacademy/vistributions/actions/workflows/R-CMD-check.yaml)
22 | [](https://app.codecov.io/github/rsquaredacademy/vistributions?branch=master)
23 |
24 |
25 | ## Installation
26 |
27 | ```{r cran-installation, eval = FALSE}
28 | # Install release version from CRAN
29 | install.packages("vistributions")
30 |
31 | # Install development version from GitHub
32 | # install.packages("devtools")
33 | devtools::install_github("rsquaredacademy/vistributions")
34 | ```
35 |
36 | ## Articles
37 |
38 | - [Explore Distributions](https://vistributions.rsquaredacademy.com/articles/introduction-to-vistributions.html)
39 |
40 | ## Usage
41 |
42 | ```{r, echo=FALSE, message=FALSE}
43 | library(vistributions)
44 | ```
45 |
46 | ### Normal Distribution
47 |
48 | ```{r normal}
49 | # visualize normal distribution
50 | vdist_normal_plot()
51 |
52 | # visualize quantiles out of given probability
53 | vdist_normal_perc(0.95, mean = 2, sd = 1.36, type = 'both')
54 |
55 | # visualize probability from a given quantile
56 | vdist_normal_prob(c(-1.74, 1.83), type = 'both')
57 | ```
58 |
59 | ## Getting Help
60 |
61 | If you encounter a bug, please file a minimal reproducible example using
62 | [reprex](https://reprex.tidyverse.org/index.html) on github. For questions
63 | and clarifications, use [StackOverflow](https://stackoverflow.com/).
64 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # vistributions
5 |
6 | > Visualize probability distributions
7 |
8 |
9 |
10 | [](https://cran.r-project.org/package=vistributions)
11 | [](https://github.com/rsquaredacademy/vistributions/actions/workflows/R-CMD-check.yaml)
12 | [](https://app.codecov.io/github/rsquaredacademy/vistributions?branch=master)
14 |
15 |
16 | ## Installation
17 |
18 | ``` r
19 | # Install release version from CRAN
20 | install.packages("vistributions")
21 |
22 | # Install development version from GitHub
23 | # install.packages("devtools")
24 | devtools::install_github("rsquaredacademy/vistributions")
25 | ```
26 |
27 | ## Articles
28 |
29 | - [Explore
30 | Distributions](https://vistributions.rsquaredacademy.com/articles/introduction-to-vistributions.html)
31 |
32 | ## Usage
33 |
34 | ### Normal Distribution
35 |
36 | ``` r
37 | # visualize normal distribution
38 | vdist_normal_plot()
39 | ```
40 |
41 |
42 |
43 | ``` r
44 |
45 | # visualize quantiles out of given probability
46 | vdist_normal_perc(0.95, mean = 2, sd = 1.36, type = 'both')
47 | ```
48 |
49 |
50 |
51 | ``` r
52 |
53 | # visualize probability from a given quantile
54 | vdist_normal_prob(c(-1.74, 1.83), type = 'both')
55 | ```
56 |
57 |
58 |
59 | ## Getting Help
60 |
61 | If you encounter a bug, please file a minimal reproducible example using
62 | [reprex](https://reprex.tidyverse.org/index.html) on github. For
63 | questions and clarifications, use
64 | [StackOverflow](https://stackoverflow.com/).
65 |
--------------------------------------------------------------------------------
/_pkgdown.yml:
--------------------------------------------------------------------------------
1 | url: https://vistributions.rsquaredacademy.com
2 | template:
3 | bootstrap: 5
4 |
5 | authors:
6 | Aravind Hebbali:
7 | href: https://www.aravindhebbali.com
8 |
9 | templates:
10 | params:
11 | bootswatch: cerulean
12 | ganalytics: UA-57270671-33
13 | docsearch:
14 | api_key:
15 | index_name: vistribution
16 |
17 | navbar:
18 | title: "vistributions"
19 | type: inverse
20 | left:
21 | - text: "Home"
22 | href: index.html
23 | - text: "Guides"
24 | menu:
25 | - text: "Introduction"
26 | href: articles/introduction-to-vistributions.html
27 | - text: "Reference"
28 | menu:
29 | - text: "Functions"
30 | href: reference/index.html
31 | - text: "News"
32 | href: news/index.html
33 |
34 | right:
35 | - icon: fa-github
36 | href: https://github.com/rsquaredacademy/vistributions
37 |
38 | home:
39 | links:
40 | - text: Our R packages
41 | href: https://pkgs.rsquaredacademy.com
42 | - text: Read our blog
43 | href: https://blog.rsquaredacademy.com
44 | - text: Our ebooks
45 | href: https://ebooks.rsquaredacademy.com
46 | - text: Online courses
47 | href: https://www.rsquaredacademy.com
48 |
49 | reference:
50 | - title: Shiny App
51 |
52 | contents:
53 | - vdist_launch_app
54 |
55 | - title: Binomial
56 |
57 | contents:
58 | - vdist_binom_plot
59 | - vdist_binom_perc
60 | - vdist_binom_prob
61 |
62 |
63 | - title: Chi Square
64 |
65 | contents:
66 | - vdist_chisquare_plot
67 | - vdist_chisquare_perc
68 | - vdist_chisquare_prob
69 |
70 | - title: Normal
71 |
72 | contents:
73 | - vdist_normal_plot
74 | - vdist_normal_perc
75 | - vdist_normal_prob
76 |
77 | - title: f
78 |
79 | contents:
80 | - vdist_f_plot
81 | - vdist_f_perc
82 | - vdist_f_prob
83 |
84 | - title: t
85 |
86 | contents:
87 | - vdist_t_plot
88 | - vdist_t_perc
89 | - vdist_t_prob
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | comment: false
2 |
3 | coverage:
4 | status:
5 | project:
6 | default:
7 | target: auto
8 | threshold: 1%
9 | informational: true
10 | patch:
11 | default:
12 | target: auto
13 | threshold: 1%
14 | informational: true
15 |
--------------------------------------------------------------------------------
/cran-comments.md:
--------------------------------------------------------------------------------
1 | ## R CMD check results
2 |
3 | 0 errors | 0 warnings | 0 note
4 |
5 |
--------------------------------------------------------------------------------
/docs/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Page not found (404) • vistributions
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | Skip to contents
17 |
18 |
19 |
20 |
21 |
vistributions
22 |
23 |
0.2.0.9000
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Home
33 |
34 | Guides
35 |
38 |
39 |
40 | Reference
41 |
45 |
46 |
47 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
61 |
62 | Content not found. Please use links in the navbar.
63 |
64 |
65 |
66 |
67 |
68 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/docs/CNAME:
--------------------------------------------------------------------------------
1 | vistributions.rsquaredacademy.com
2 |
--------------------------------------------------------------------------------
/docs/CODE_OF_CONDUCT.html:
--------------------------------------------------------------------------------
1 |
2 | Contributor Code of Conduct • vistributions
3 | Skip to contents
4 |
5 |
6 |
7 |
8 |
vistributions
9 |
10 |
0.2.0.9000
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Home
19 |
20 | Guides
21 |
23 |
24 | Reference
25 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
43 |
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
44 |
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
45 |
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
46 |
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
47 |
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
48 |
This Code of Conduct is adapted from the Contributor Covenant (http://contributor-covenant.org ), version 1.0.0, available at http://contributor-covenant.org/version/1/0/0/
49 |
50 |
51 |
52 |
53 |
54 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/docs/LICENSE-text.html:
--------------------------------------------------------------------------------
1 |
2 | License • vistributions
3 | Skip to contents
4 |
5 |
6 |
7 |
8 |
vistributions
9 |
10 |
0.2.0.9000
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Home
19 |
20 | Guides
21 |
23 |
24 | Reference
25 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 | YEAR: 2018
42 | COPYRIGHT HOLDER: Aravind Hebbali
43 |
44 |
45 |
46 |
47 |
48 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/docs/LICENSE.html:
--------------------------------------------------------------------------------
1 |
2 | MIT License • vistributions
3 | Skip to contents
4 |
5 |
6 |
7 |
8 |
vistributions
9 |
10 |
0.2.0.9000
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Home
19 |
20 | Guides
21 |
23 |
24 | Reference
25 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
43 |
Copyright (c) 2018 Aravind Hebbali
44 |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
45 |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
46 |
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
47 |
48 |
49 |
50 |
51 |
52 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/docs/articles/index.html:
--------------------------------------------------------------------------------
1 |
2 | Articles • vistributions
3 | Skip to contents
4 |
5 |
6 |
7 |
8 |
vistributions
9 |
10 |
0.2.0.9000
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Home
19 |
20 | Guides
21 |
23 |
24 | Reference
25 |
28 |
30 |
31 |
32 |
33 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/binom_per1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/binom_per1-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/binom_per2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/binom_per2-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/binom_plot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/binom_plot-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/binom_prob1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/binom_prob1-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/binom_prob2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/binom_prob2-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/binom_prob3-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/binom_prob3-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/binom_prob4-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/binom_prob4-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/chi_per1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/chi_per1-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/chi_per2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/chi_per2-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/chi_plot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/chi_plot-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/chi_plot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/chi_plot-2.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/chi_prob1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/chi_prob1-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/chi_prob2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/chi_prob2-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/f_per1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/f_per1-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/f_per2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/f_per2-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/f_plot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/f_plot-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/f_plot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/f_plot-2.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/f_prob1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/f_prob1-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/f_prob2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/f_prob2-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/norm_per1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/norm_per1-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/norm_per2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/norm_per2-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/norm_per3-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/norm_per3-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/norm_plot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/norm_plot-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/norm_prob1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/norm_prob1-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/norm_prob2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/norm_prob2-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/norm_prob3-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/norm_prob3-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/t_per1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/t_per1-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/t_per2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/t_per2-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/t_per3-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/t_per3-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/t_plot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/t_plot-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/t_prob1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/t_prob1-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/t_prob2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/t_prob2-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/t_prob3-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/t_prob3-1.png
--------------------------------------------------------------------------------
/docs/articles/introduction-to-vistributions_files/figure-html/t_prob4-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/articles/introduction-to-vistributions_files/figure-html/t_prob4-1.png
--------------------------------------------------------------------------------
/docs/authors.html:
--------------------------------------------------------------------------------
1 |
2 | Authors and Citation • vistributions
3 | Skip to contents
4 |
5 |
6 |
7 |
8 |
vistributions
9 |
10 |
0.2.0.9000
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Home
19 |
20 | Guides
21 |
23 |
24 | Reference
25 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
39 |
40 |
48 |
49 |
50 |
Citation
51 |
Source: DESCRIPTION
52 |
53 |
Hebbali A (2024).
54 | vistributions: Visualize Probability Distributions .
55 | R package version 0.2.0.9000, https://vistributions.rsquaredacademy.com, https://github.com/rsquaredacademy/vistributions .
56 |
57 |
@Manual{,
58 | title = {vistributions: Visualize Probability Distributions},
59 | author = {Aravind Hebbali},
60 | year = {2024},
61 | note = {R package version 0.2.0.9000, https://vistributions.rsquaredacademy.com},
62 | url = {https://github.com/rsquaredacademy/vistributions},
63 | }
64 |
65 |
66 |
68 |
69 |
70 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/docs/bootstrap-toc.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/)
3 | * Copyright 2015 Aidan Feldman
4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */
5 |
6 | /* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */
7 |
8 | /* All levels of nav */
9 | nav[data-toggle='toc'] .nav > li > a {
10 | display: block;
11 | padding: 4px 20px;
12 | font-size: 13px;
13 | font-weight: 500;
14 | color: #767676;
15 | }
16 | nav[data-toggle='toc'] .nav > li > a:hover,
17 | nav[data-toggle='toc'] .nav > li > a:focus {
18 | padding-left: 19px;
19 | color: #563d7c;
20 | text-decoration: none;
21 | background-color: transparent;
22 | border-left: 1px solid #563d7c;
23 | }
24 | nav[data-toggle='toc'] .nav > .active > a,
25 | nav[data-toggle='toc'] .nav > .active:hover > a,
26 | nav[data-toggle='toc'] .nav > .active:focus > a {
27 | padding-left: 18px;
28 | font-weight: bold;
29 | color: #563d7c;
30 | background-color: transparent;
31 | border-left: 2px solid #563d7c;
32 | }
33 |
34 | /* Nav: second level (shown on .active) */
35 | nav[data-toggle='toc'] .nav .nav {
36 | display: none; /* Hide by default, but at >768px, show it */
37 | padding-bottom: 10px;
38 | }
39 | nav[data-toggle='toc'] .nav .nav > li > a {
40 | padding-top: 1px;
41 | padding-bottom: 1px;
42 | padding-left: 30px;
43 | font-size: 12px;
44 | font-weight: normal;
45 | }
46 | nav[data-toggle='toc'] .nav .nav > li > a:hover,
47 | nav[data-toggle='toc'] .nav .nav > li > a:focus {
48 | padding-left: 29px;
49 | }
50 | nav[data-toggle='toc'] .nav .nav > .active > a,
51 | nav[data-toggle='toc'] .nav .nav > .active:hover > a,
52 | nav[data-toggle='toc'] .nav .nav > .active:focus > a {
53 | padding-left: 28px;
54 | font-weight: 500;
55 | }
56 |
57 | /* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */
58 | nav[data-toggle='toc'] .nav > .active > ul {
59 | display: block;
60 | }
61 |
--------------------------------------------------------------------------------
/docs/bootstrap-toc.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/)
3 | * Copyright 2015 Aidan Feldman
4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */
5 | (function() {
6 | 'use strict';
7 |
8 | window.Toc = {
9 | helpers: {
10 | // return all matching elements in the set, or their descendants
11 | findOrFilter: function($el, selector) {
12 | // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/
13 | // http://stackoverflow.com/a/12731439/358804
14 | var $descendants = $el.find(selector);
15 | return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])');
16 | },
17 |
18 | generateUniqueIdBase: function(el) {
19 | var text = $(el).text();
20 | var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-');
21 | return anchor || el.tagName.toLowerCase();
22 | },
23 |
24 | generateUniqueId: function(el) {
25 | var anchorBase = this.generateUniqueIdBase(el);
26 | for (var i = 0; ; i++) {
27 | var anchor = anchorBase;
28 | if (i > 0) {
29 | // add suffix
30 | anchor += '-' + i;
31 | }
32 | // check if ID already exists
33 | if (!document.getElementById(anchor)) {
34 | return anchor;
35 | }
36 | }
37 | },
38 |
39 | generateAnchor: function(el) {
40 | if (el.id) {
41 | return el.id;
42 | } else {
43 | var anchor = this.generateUniqueId(el);
44 | el.id = anchor;
45 | return anchor;
46 | }
47 | },
48 |
49 | createNavList: function() {
50 | return $('');
51 | },
52 |
53 | createChildNavList: function($parent) {
54 | var $childList = this.createNavList();
55 | $parent.append($childList);
56 | return $childList;
57 | },
58 |
59 | generateNavEl: function(anchor, text) {
60 | var $a = $(' ');
61 | $a.attr('href', '#' + anchor);
62 | $a.text(text);
63 | var $li = $(' ');
64 | $li.append($a);
65 | return $li;
66 | },
67 |
68 | generateNavItem: function(headingEl) {
69 | var anchor = this.generateAnchor(headingEl);
70 | var $heading = $(headingEl);
71 | var text = $heading.data('toc-text') || $heading.text();
72 | return this.generateNavEl(anchor, text);
73 | },
74 |
75 | // Find the first heading level (``, then ``, etc.) that has more than one element. Defaults to 1 (for ``).
76 | getTopLevel: function($scope) {
77 | for (var i = 1; i <= 6; i++) {
78 | var $headings = this.findOrFilter($scope, 'h' + i);
79 | if ($headings.length > 1) {
80 | return i;
81 | }
82 | }
83 |
84 | return 1;
85 | },
86 |
87 | // returns the elements for the top level, and the next below it
88 | getHeadings: function($scope, topLevel) {
89 | var topSelector = 'h' + topLevel;
90 |
91 | var secondaryLevel = topLevel + 1;
92 | var secondarySelector = 'h' + secondaryLevel;
93 |
94 | return this.findOrFilter($scope, topSelector + ',' + secondarySelector);
95 | },
96 |
97 | getNavLevel: function(el) {
98 | return parseInt(el.tagName.charAt(1), 10);
99 | },
100 |
101 | populateNav: function($topContext, topLevel, $headings) {
102 | var $context = $topContext;
103 | var $prevNav;
104 |
105 | var helpers = this;
106 | $headings.each(function(i, el) {
107 | var $newNav = helpers.generateNavItem(el);
108 | var navLevel = helpers.getNavLevel(el);
109 |
110 | // determine the proper $context
111 | if (navLevel === topLevel) {
112 | // use top level
113 | $context = $topContext;
114 | } else if ($prevNav && $context === $topContext) {
115 | // create a new level of the tree and switch to it
116 | $context = helpers.createChildNavList($prevNav);
117 | } // else use the current $context
118 |
119 | $context.append($newNav);
120 |
121 | $prevNav = $newNav;
122 | });
123 | },
124 |
125 | parseOps: function(arg) {
126 | var opts;
127 | if (arg.jquery) {
128 | opts = {
129 | $nav: arg
130 | };
131 | } else {
132 | opts = arg;
133 | }
134 | opts.$scope = opts.$scope || $(document.body);
135 | return opts;
136 | }
137 | },
138 |
139 | // accepts a jQuery object, or an options object
140 | init: function(opts) {
141 | opts = this.helpers.parseOps(opts);
142 |
143 | // ensure that the data attribute is in place for styling
144 | opts.$nav.attr('data-toggle', 'toc');
145 |
146 | var $topContext = this.helpers.createChildNavList(opts.$nav);
147 | var topLevel = this.helpers.getTopLevel(opts.$scope);
148 | var $headings = this.helpers.getHeadings(opts.$scope, topLevel);
149 | this.helpers.populateNav($topContext, topLevel, $headings);
150 | }
151 | };
152 |
153 | $(function() {
154 | $('nav[data-toggle="toc"]').each(function(i, el) {
155 | var $nav = $(el);
156 | Toc.init($nav);
157 | });
158 | });
159 | })();
160 |
--------------------------------------------------------------------------------
/docs/deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Table of Contents v1.0.1 (http://afeld.github.io/bootstrap-toc/)
3 | * Copyright 2015 Aidan Feldman
4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */
5 | !function(a){"use strict";window.Toc={helpers:{findOrFilter:function(e,t){var n=e.find(t);return e.filter(t).add(n).filter(":not([data-toc-skip])")},generateUniqueIdBase:function(e){return a(e).text().trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,64).replace(/^-+|-+$/gm,"").toLowerCase()||e.tagName.toLowerCase()},generateUniqueId:function(e){for(var t=this.generateUniqueIdBase(e),n=0;;n++){var r=t;if(0')},createChildNavList:function(e){var t=this.createNavList();return e.append(t),t},generateNavEl:function(e,t){var n=a(' ');n.attr("href","#"+e),n.text(t);var r=a(" ");return r.append(n),r},generateNavItem:function(e){var t=this.generateAnchor(e),n=a(e),r=n.data("toc-text")||n.text();return this.generateNavEl(t,r)},getTopLevel:function(e){for(var t=1;t<=6;t++){if(1
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/deps/font-awesome-6.4.2/webfonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/deps/font-awesome-6.4.2/webfonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/docs/deps/font-awesome-6.4.2/webfonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/deps/font-awesome-6.4.2/webfonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/docs/deps/font-awesome-6.4.2/webfonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/deps/font-awesome-6.4.2/webfonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/docs/deps/font-awesome-6.4.2/webfonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/deps/font-awesome-6.4.2/webfonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/docs/deps/font-awesome-6.4.2/webfonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/deps/font-awesome-6.4.2/webfonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/docs/deps/font-awesome-6.4.2/webfonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/deps/font-awesome-6.4.2/webfonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/docs/deps/font-awesome-6.4.2/webfonts/fa-v4compatibility.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/deps/font-awesome-6.4.2/webfonts/fa-v4compatibility.ttf
--------------------------------------------------------------------------------
/docs/deps/font-awesome-6.4.2/webfonts/fa-v4compatibility.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/deps/font-awesome-6.4.2/webfonts/fa-v4compatibility.woff2
--------------------------------------------------------------------------------
/docs/deps/headroom-0.11.0/headroom.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * headroom.js v0.11.0 - Give your page some headroom. Hide your header until you need it
3 | * Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js
4 | * License: MIT
5 | */
6 |
7 | !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).Headroom=n()}(this,function(){"use strict";function t(){return"undefined"!=typeof window}function d(t){return function(t){return t&&t.document&&function(t){return 9===t.nodeType}(t.document)}(t)?function(t){var n=t.document,o=n.body,s=n.documentElement;return{scrollHeight:function(){return Math.max(o.scrollHeight,s.scrollHeight,o.offsetHeight,s.offsetHeight,o.clientHeight,s.clientHeight)},height:function(){return t.innerHeight||s.clientHeight||o.clientHeight},scrollY:function(){return void 0!==t.pageYOffset?t.pageYOffset:(s||o.parentNode||o).scrollTop}}}(t):function(t){return{scrollHeight:function(){return Math.max(t.scrollHeight,t.offsetHeight,t.clientHeight)},height:function(){return Math.max(t.offsetHeight,t.clientHeight)},scrollY:function(){return t.scrollTop}}}(t)}function n(t,s,e){var n,o=function(){var n=!1;try{var t={get passive(){n=!0}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){n=!1}return n}(),i=!1,r=d(t),l=r.scrollY(),a={};function c(){var t=Math.round(r.scrollY()),n=r.height(),o=r.scrollHeight();a.scrollY=t,a.lastScrollY=l,a.direction=ls.tolerance[a.direction],e(a),l=t,i=!1}function h(){i||(i=!0,n=requestAnimationFrame(c))}var u=!!o&&{passive:!0,capture:!1};return t.addEventListener("scroll",h,u),c(),{destroy:function(){cancelAnimationFrame(n),t.removeEventListener("scroll",h,u)}}}function o(t,n){n=n||{},Object.assign(this,o.options,n),this.classes=Object.assign({},o.options.classes,n.classes),this.elem=t,this.tolerance=function(t){return t===Object(t)?t:{down:t,up:t}}(this.tolerance),this.initialised=!1,this.frozen=!1}return o.prototype={constructor:o,init:function(){return o.cutsTheMustard&&!this.initialised&&(this.addClass("initial"),this.initialised=!0,setTimeout(function(t){t.scrollTracker=n(t.scroller,{offset:t.offset,tolerance:t.tolerance},t.update.bind(t))},100,this)),this},destroy:function(){this.initialised=!1,Object.keys(this.classes).forEach(this.removeClass,this),this.scrollTracker.destroy()},unpin:function(){!this.hasClass("pinned")&&this.hasClass("unpinned")||(this.addClass("unpinned"),this.removeClass("pinned"),this.onUnpin&&this.onUnpin.call(this))},pin:function(){this.hasClass("unpinned")&&(this.addClass("pinned"),this.removeClass("unpinned"),this.onPin&&this.onPin.call(this))},freeze:function(){this.frozen=!0,this.addClass("frozen")},unfreeze:function(){this.frozen=!1,this.removeClass("frozen")},top:function(){this.hasClass("top")||(this.addClass("top"),this.removeClass("notTop"),this.onTop&&this.onTop.call(this))},notTop:function(){this.hasClass("notTop")||(this.addClass("notTop"),this.removeClass("top"),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){this.hasClass("bottom")||(this.addClass("bottom"),this.removeClass("notBottom"),this.onBottom&&this.onBottom.call(this))},notBottom:function(){this.hasClass("notBottom")||(this.addClass("notBottom"),this.removeClass("bottom"),this.onNotBottom&&this.onNotBottom.call(this))},shouldUnpin:function(t){return"down"===t.direction&&!t.top&&t.toleranceExceeded},shouldPin:function(t){return"up"===t.direction&&t.toleranceExceeded||t.top},addClass:function(t){this.elem.classList.add.apply(this.elem.classList,this.classes[t].split(" "))},removeClass:function(t){this.elem.classList.remove.apply(this.elem.classList,this.classes[t].split(" "))},hasClass:function(t){return this.classes[t].split(" ").every(function(t){return this.classList.contains(t)},this.elem)},update:function(t){t.isOutOfBounds||!0!==this.frozen&&(t.top?this.top():this.notTop(),t.bottom?this.bottom():this.notBottom(),this.shouldUnpin(t)?this.unpin():this.shouldPin(t)&&this.pin())}},o.options={tolerance:{up:0,down:0},offset:0,scroller:t()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},o.cutsTheMustard=!!(t()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame),o});
--------------------------------------------------------------------------------
/docs/deps/headroom-0.11.0/jQuery.headroom.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * headroom.js v0.9.4 - Give your page some headroom. Hide your header until you need it
3 | * Copyright (c) 2017 Nick Williams - http://wicky.nillia.ms/headroom.js
4 | * License: MIT
5 | */
6 |
7 | !function(a){a&&(a.fn.headroom=function(b){return this.each(function(){var c=a(this),d=c.data("headroom"),e="object"==typeof b&&b;e=a.extend(!0,{},Headroom.options,e),d||(d=new Headroom(this,e),d.init(),c.data("headroom",d)),"string"==typeof b&&(d[b](),"destroy"===b&&c.removeData("headroom"))})},a("[data-headroom]").each(function(){var b=a(this);b.headroom(b.data())}))}(window.Zepto||window.jQuery);
--------------------------------------------------------------------------------
/docs/docsearch.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 |
3 | // register a handler to move the focus to the search bar
4 | // upon pressing shift + "/" (i.e. "?")
5 | $(document).on('keydown', function(e) {
6 | if (e.shiftKey && e.keyCode == 191) {
7 | e.preventDefault();
8 | $("#search-input").focus();
9 | }
10 | });
11 |
12 | $(document).ready(function() {
13 | // do keyword highlighting
14 | /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */
15 | var mark = function() {
16 |
17 | var referrer = document.URL ;
18 | var paramKey = "q" ;
19 |
20 | if (referrer.indexOf("?") !== -1) {
21 | var qs = referrer.substr(referrer.indexOf('?') + 1);
22 | var qs_noanchor = qs.split('#')[0];
23 | var qsa = qs_noanchor.split('&');
24 | var keyword = "";
25 |
26 | for (var i = 0; i < qsa.length; i++) {
27 | var currentParam = qsa[i].split('=');
28 |
29 | if (currentParam.length !== 2) {
30 | continue;
31 | }
32 |
33 | if (currentParam[0] == paramKey) {
34 | keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20"));
35 | }
36 | }
37 |
38 | if (keyword !== "") {
39 | $(".contents").unmark({
40 | done: function() {
41 | $(".contents").mark(keyword);
42 | }
43 | });
44 | }
45 | }
46 | };
47 |
48 | mark();
49 | });
50 | });
51 |
52 | /* Search term highlighting ------------------------------*/
53 |
54 | function matchedWords(hit) {
55 | var words = [];
56 |
57 | var hierarchy = hit._highlightResult.hierarchy;
58 | // loop to fetch from lvl0, lvl1, etc.
59 | for (var idx in hierarchy) {
60 | words = words.concat(hierarchy[idx].matchedWords);
61 | }
62 |
63 | var content = hit._highlightResult.content;
64 | if (content) {
65 | words = words.concat(content.matchedWords);
66 | }
67 |
68 | // return unique words
69 | var words_uniq = [...new Set(words)];
70 | return words_uniq;
71 | }
72 |
73 | function updateHitURL(hit) {
74 |
75 | var words = matchedWords(hit);
76 | var url = "";
77 |
78 | if (hit.anchor) {
79 | url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor;
80 | } else {
81 | url = hit.url + '?q=' + escape(words.join(" "));
82 | }
83 |
84 | return url;
85 | }
86 |
--------------------------------------------------------------------------------
/docs/docsearch.json:
--------------------------------------------------------------------------------
1 | {
2 | "index_name": "vistributions",
3 | "start_urls": [
4 | {
5 | "url": "https://vistributions.rsquaredacademy.com/index.html",
6 | "selectors_key": "homepage",
7 | "tags": [
8 | "homepage"
9 | ]
10 | },
11 | {
12 | "url": "https://vistributions.rsquaredacademy.com/reference",
13 | "selectors_key": "reference",
14 | "tags": [
15 | "reference"
16 | ]
17 | },
18 | {
19 | "url": "https://vistributions.rsquaredacademy.com/articles",
20 | "selectors_key": "articles",
21 | "tags": [
22 | "articles"
23 | ]
24 | }
25 | ],
26 | "stop_urls": [
27 | "/reference/$",
28 | "/reference/index.html",
29 | "/articles/$",
30 | "/articles/index.html"
31 | ],
32 | "sitemap_urls": [
33 | "https://vistributions.rsquaredacademy.com/sitemap.xml"
34 | ],
35 | "selectors": {
36 | "homepage": {
37 | "lvl0": {
38 | "selector": ".contents h1",
39 | "default_value": "vistributions Home page"
40 | },
41 | "lvl1": {
42 | "selector": ".contents h2"
43 | },
44 | "lvl2": {
45 | "selector": ".contents h3",
46 | "default_value": "Context"
47 | },
48 | "lvl3": ".ref-arguments td, .ref-description",
49 | "text": ".contents p, .contents li, .contents .pre"
50 | },
51 | "reference": {
52 | "lvl0": {
53 | "selector": ".contents h1"
54 | },
55 | "lvl1": {
56 | "selector": ".contents .name",
57 | "default_value": "Argument"
58 | },
59 | "lvl2": {
60 | "selector": ".ref-arguments th",
61 | "default_value": "Description"
62 | },
63 | "lvl3": ".ref-arguments td, .ref-description",
64 | "text": ".contents p, .contents li"
65 | },
66 | "articles": {
67 | "lvl0": {
68 | "selector": ".contents h1"
69 | },
70 | "lvl1": {
71 | "selector": ".contents .name"
72 | },
73 | "lvl2": {
74 | "selector": ".contents h2, .contents h3",
75 | "default_value": "Context"
76 | },
77 | "text": ".contents p, .contents li"
78 | }
79 | },
80 | "selectors_exclude": [
81 | ".dont-index"
82 | ],
83 | "min_indexed_level": 2,
84 | "custom_settings": {
85 | "separatorsToIndex": "_",
86 | "attributesToRetrieve": [
87 | "hierarchy",
88 | "content",
89 | "anchor",
90 | "url",
91 | "url_without_anchor"
92 | ]
93 | }
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/docs/google02e424888b5e2def.html:
--------------------------------------------------------------------------------
1 | google-site-verification: google02e424888b5e2def.html
--------------------------------------------------------------------------------
/docs/hex_vistributions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/hex_vistributions.png
--------------------------------------------------------------------------------
/docs/katex-auto.js:
--------------------------------------------------------------------------------
1 | // https://github.com/jgm/pandoc/blob/29fa97ab96b8e2d62d48326e1b949a71dc41f47a/src/Text/Pandoc/Writers/HTML.hs#L332-L345
2 | document.addEventListener("DOMContentLoaded", function () {
3 | var mathElements = document.getElementsByClassName("math");
4 | var macros = [];
5 | for (var i = 0; i < mathElements.length; i++) {
6 | var texText = mathElements[i].firstChild;
7 | if (mathElements[i].tagName == "SPAN") {
8 | katex.render(texText.data, mathElements[i], {
9 | displayMode: mathElements[i].classList.contains("display"),
10 | throwOnError: false,
11 | macros: macros,
12 | fleqn: false
13 | });
14 | }}});
15 |
--------------------------------------------------------------------------------
/docs/lightswitch.js:
--------------------------------------------------------------------------------
1 |
2 | /*!
3 | * Color mode toggler for Bootstrap's docs (https://getbootstrap.com/)
4 | * Copyright 2011-2023 The Bootstrap Authors
5 | * Licensed under the Creative Commons Attribution 3.0 Unported License.
6 | * Updates for {pkgdown} by the {bslib} authors, also licensed under CC-BY-3.0.
7 | */
8 |
9 | const getStoredTheme = () => localStorage.getItem('theme')
10 | const setStoredTheme = theme => localStorage.setItem('theme', theme)
11 |
12 | const getPreferredTheme = () => {
13 | const storedTheme = getStoredTheme()
14 | if (storedTheme) {
15 | return storedTheme
16 | }
17 |
18 | return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
19 | }
20 |
21 | const setTheme = theme => {
22 | if (theme === 'auto') {
23 | document.documentElement.setAttribute('data-bs-theme', (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'))
24 | } else {
25 | document.documentElement.setAttribute('data-bs-theme', theme)
26 | }
27 | }
28 |
29 | function bsSetupThemeToggle () {
30 | 'use strict'
31 |
32 | const showActiveTheme = (theme, focus = false) => {
33 | var activeLabel, activeIcon;
34 |
35 | document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
36 | const buttonTheme = element.getAttribute('data-bs-theme-value')
37 | const isActive = buttonTheme == theme
38 |
39 | element.classList.toggle('active', isActive)
40 | element.setAttribute('aria-pressed', isActive)
41 |
42 | if (isActive) {
43 | activeLabel = element.textContent;
44 | activeIcon = element.querySelector('span').classList.value;
45 | }
46 | })
47 |
48 | const themeSwitcher = document.querySelector('#dropdown-lightswitch')
49 | if (!themeSwitcher) {
50 | return
51 | }
52 |
53 | themeSwitcher.setAttribute('aria-label', activeLabel)
54 | themeSwitcher.querySelector('span').classList.value = activeIcon;
55 |
56 | if (focus) {
57 | themeSwitcher.focus()
58 | }
59 | }
60 |
61 | window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
62 | const storedTheme = getStoredTheme()
63 | if (storedTheme !== 'light' && storedTheme !== 'dark') {
64 | setTheme(getPreferredTheme())
65 | }
66 | })
67 |
68 | window.addEventListener('DOMContentLoaded', () => {
69 | showActiveTheme(getPreferredTheme())
70 |
71 | document
72 | .querySelectorAll('[data-bs-theme-value]')
73 | .forEach(toggle => {
74 | toggle.addEventListener('click', () => {
75 | const theme = toggle.getAttribute('data-bs-theme-value')
76 | setTheme(theme)
77 | setStoredTheme(theme)
78 | showActiveTheme(theme, true)
79 | })
80 | })
81 | })
82 | }
83 |
84 | setTheme(getPreferredTheme());
85 | bsSetupThemeToggle();
86 |
--------------------------------------------------------------------------------
/docs/link.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/news/index.html:
--------------------------------------------------------------------------------
1 |
2 | Changelog • vistributions
3 | Skip to contents
4 |
5 |
6 |
7 |
8 |
vistributions
9 |
10 |
0.2.0.9000
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Home
19 |
20 | Guides
21 |
23 |
24 | Reference
25 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
vistributions 0.2.0.9000
43 |
44 |
45 |
vistributions 0.2.0
46 |
This is a minor release for bug fixes.
47 |
48 |
49 |
vistributions 0.1.2 CRAN release: 2021-05-20
50 |
This is a patch release to fix CRAN note about lazy data.
51 |
52 |
53 |
vistributions 0.1.1 CRAN release: 2019-03-07
54 |
This is a patch release to fix bugs in the app.
55 |
56 |
57 |
vistributions 0.1.0 CRAN release: 2018-11-30
58 |
Added a NEWS.md
file to track changes to the package.
59 |
60 |
62 |
63 |
64 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/docs/pkgdown.css:
--------------------------------------------------------------------------------
1 | /* Sticky footer */
2 |
3 | /**
4 | * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
5 | * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css
6 | *
7 | * .Site -> body > .container
8 | * .Site-content -> body > .container .row
9 | * .footer -> footer
10 | *
11 | * Key idea seems to be to ensure that .container and __all its parents__
12 | * have height set to 100%
13 | *
14 | */
15 |
16 | html, body {
17 | height: 100%;
18 | }
19 |
20 | body {
21 | position: relative;
22 | }
23 |
24 | body > .container {
25 | display: flex;
26 | height: 100%;
27 | flex-direction: column;
28 | }
29 |
30 | body > .container .row {
31 | flex: 1 0 auto;
32 | }
33 |
34 | footer {
35 | margin-top: 45px;
36 | padding: 35px 0 36px;
37 | border-top: 1px solid #e5e5e5;
38 | color: #666;
39 | display: flex;
40 | flex-shrink: 0;
41 | }
42 | footer p {
43 | margin-bottom: 0;
44 | }
45 | footer div {
46 | flex: 1;
47 | }
48 | footer .pkgdown {
49 | text-align: right;
50 | }
51 | footer p {
52 | margin-bottom: 0;
53 | }
54 |
55 | img.icon {
56 | float: right;
57 | }
58 |
59 | /* Ensure in-page images don't run outside their container */
60 | .contents img {
61 | max-width: 100%;
62 | height: auto;
63 | }
64 |
65 | /* Fix bug in bootstrap (only seen in firefox) */
66 | summary {
67 | display: list-item;
68 | }
69 |
70 | /* Typographic tweaking ---------------------------------*/
71 |
72 | .contents .page-header {
73 | margin-top: calc(-60px + 1em);
74 | }
75 |
76 | dd {
77 | margin-left: 3em;
78 | }
79 |
80 | /* Section anchors ---------------------------------*/
81 |
82 | a.anchor {
83 | display: none;
84 | margin-left: 5px;
85 | width: 20px;
86 | height: 20px;
87 |
88 | background-image: url(./link.svg);
89 | background-repeat: no-repeat;
90 | background-size: 20px 20px;
91 | background-position: center center;
92 | }
93 |
94 | h1:hover .anchor,
95 | h2:hover .anchor,
96 | h3:hover .anchor,
97 | h4:hover .anchor,
98 | h5:hover .anchor,
99 | h6:hover .anchor {
100 | display: inline-block;
101 | }
102 |
103 | /* Fixes for fixed navbar --------------------------*/
104 |
105 | .contents h1, .contents h2, .contents h3, .contents h4 {
106 | padding-top: 60px;
107 | margin-top: -40px;
108 | }
109 |
110 | /* Navbar submenu --------------------------*/
111 |
112 | .dropdown-submenu {
113 | position: relative;
114 | }
115 |
116 | .dropdown-submenu>.dropdown-menu {
117 | top: 0;
118 | left: 100%;
119 | margin-top: -6px;
120 | margin-left: -1px;
121 | border-radius: 0 6px 6px 6px;
122 | }
123 |
124 | .dropdown-submenu:hover>.dropdown-menu {
125 | display: block;
126 | }
127 |
128 | .dropdown-submenu>a:after {
129 | display: block;
130 | content: " ";
131 | float: right;
132 | width: 0;
133 | height: 0;
134 | border-color: transparent;
135 | border-style: solid;
136 | border-width: 5px 0 5px 5px;
137 | border-left-color: #cccccc;
138 | margin-top: 5px;
139 | margin-right: -10px;
140 | }
141 |
142 | .dropdown-submenu:hover>a:after {
143 | border-left-color: #ffffff;
144 | }
145 |
146 | .dropdown-submenu.pull-left {
147 | float: none;
148 | }
149 |
150 | .dropdown-submenu.pull-left>.dropdown-menu {
151 | left: -100%;
152 | margin-left: 10px;
153 | border-radius: 6px 0 6px 6px;
154 | }
155 |
156 | /* Sidebar --------------------------*/
157 |
158 | #pkgdown-sidebar {
159 | margin-top: 30px;
160 | position: -webkit-sticky;
161 | position: sticky;
162 | top: 70px;
163 | }
164 |
165 | #pkgdown-sidebar h2 {
166 | font-size: 1.5em;
167 | margin-top: 1em;
168 | }
169 |
170 | #pkgdown-sidebar h2:first-child {
171 | margin-top: 0;
172 | }
173 |
174 | #pkgdown-sidebar .list-unstyled li {
175 | margin-bottom: 0.5em;
176 | }
177 |
178 | /* bootstrap-toc tweaks ------------------------------------------------------*/
179 |
180 | /* All levels of nav */
181 |
182 | nav[data-toggle='toc'] .nav > li > a {
183 | padding: 4px 20px 4px 6px;
184 | font-size: 1.5rem;
185 | font-weight: 400;
186 | color: inherit;
187 | }
188 |
189 | nav[data-toggle='toc'] .nav > li > a:hover,
190 | nav[data-toggle='toc'] .nav > li > a:focus {
191 | padding-left: 5px;
192 | color: inherit;
193 | border-left: 1px solid #878787;
194 | }
195 |
196 | nav[data-toggle='toc'] .nav > .active > a,
197 | nav[data-toggle='toc'] .nav > .active:hover > a,
198 | nav[data-toggle='toc'] .nav > .active:focus > a {
199 | padding-left: 5px;
200 | font-size: 1.5rem;
201 | font-weight: 400;
202 | color: inherit;
203 | border-left: 2px solid #878787;
204 | }
205 |
206 | /* Nav: second level (shown on .active) */
207 |
208 | nav[data-toggle='toc'] .nav .nav {
209 | display: none; /* Hide by default, but at >768px, show it */
210 | padding-bottom: 10px;
211 | }
212 |
213 | nav[data-toggle='toc'] .nav .nav > li > a {
214 | padding-left: 16px;
215 | font-size: 1.35rem;
216 | }
217 |
218 | nav[data-toggle='toc'] .nav .nav > li > a:hover,
219 | nav[data-toggle='toc'] .nav .nav > li > a:focus {
220 | padding-left: 15px;
221 | }
222 |
223 | nav[data-toggle='toc'] .nav .nav > .active > a,
224 | nav[data-toggle='toc'] .nav .nav > .active:hover > a,
225 | nav[data-toggle='toc'] .nav .nav > .active:focus > a {
226 | padding-left: 15px;
227 | font-weight: 500;
228 | font-size: 1.35rem;
229 | }
230 |
231 | /* orcid ------------------------------------------------------------------- */
232 |
233 | .orcid {
234 | font-size: 16px;
235 | color: #A6CE39;
236 | /* margins are required by official ORCID trademark and display guidelines */
237 | margin-left:4px;
238 | margin-right:4px;
239 | vertical-align: middle;
240 | }
241 |
242 | /* Reference index & topics ----------------------------------------------- */
243 |
244 | .ref-index th {font-weight: normal;}
245 |
246 | .ref-index td {vertical-align: top; min-width: 100px}
247 | .ref-index .icon {width: 40px;}
248 | .ref-index .alias {width: 40%;}
249 | .ref-index-icons .alias {width: calc(40% - 40px);}
250 | .ref-index .title {width: 60%;}
251 |
252 | .ref-arguments th {text-align: right; padding-right: 10px;}
253 | .ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px}
254 | .ref-arguments .name {width: 20%;}
255 | .ref-arguments .desc {width: 80%;}
256 |
257 | /* Nice scrolling for wide elements --------------------------------------- */
258 |
259 | table {
260 | display: block;
261 | overflow: auto;
262 | }
263 |
264 | /* Syntax highlighting ---------------------------------------------------- */
265 |
266 | pre, code, pre code {
267 | background-color: #f8f8f8;
268 | color: #333;
269 | }
270 | pre, pre code {
271 | white-space: pre-wrap;
272 | word-break: break-all;
273 | overflow-wrap: break-word;
274 | }
275 |
276 | pre {
277 | border: 1px solid #eee;
278 | }
279 |
280 | pre .img, pre .r-plt {
281 | margin: 5px 0;
282 | }
283 |
284 | pre .img img, pre .r-plt img {
285 | background-color: #fff;
286 | }
287 |
288 | code a, pre a {
289 | color: #375f84;
290 | }
291 |
292 | a.sourceLine:hover {
293 | text-decoration: none;
294 | }
295 |
296 | .fl {color: #1514b5;}
297 | .fu {color: #000000;} /* function */
298 | .ch,.st {color: #036a07;} /* string */
299 | .kw {color: #264D66;} /* keyword */
300 | .co {color: #888888;} /* comment */
301 |
302 | .error {font-weight: bolder;}
303 | .warning {font-weight: bolder;}
304 |
305 | /* Clipboard --------------------------*/
306 |
307 | .hasCopyButton {
308 | position: relative;
309 | }
310 |
311 | .btn-copy-ex {
312 | position: absolute;
313 | right: 0;
314 | top: 0;
315 | visibility: hidden;
316 | }
317 |
318 | .hasCopyButton:hover button.btn-copy-ex {
319 | visibility: visible;
320 | }
321 |
322 | /* headroom.js ------------------------ */
323 |
324 | .headroom {
325 | will-change: transform;
326 | transition: transform 200ms linear;
327 | }
328 | .headroom--pinned {
329 | transform: translateY(0%);
330 | }
331 | .headroom--unpinned {
332 | transform: translateY(-100%);
333 | }
334 |
335 | /* mark.js ----------------------------*/
336 |
337 | mark {
338 | background-color: rgba(255, 255, 51, 0.5);
339 | border-bottom: 2px solid rgba(255, 153, 51, 0.3);
340 | padding: 1px;
341 | }
342 |
343 | /* vertical spacing after htmlwidgets */
344 | .html-widget {
345 | margin-bottom: 10px;
346 | }
347 |
348 | /* fontawesome ------------------------ */
349 |
350 | .fab {
351 | font-family: "Font Awesome 5 Brands" !important;
352 | }
353 |
354 | /* don't display links in code chunks when printing */
355 | /* source: https://stackoverflow.com/a/10781533 */
356 | @media print {
357 | code a:link:after, code a:visited:after {
358 | content: "";
359 | }
360 | }
361 |
362 | /* Section anchors ---------------------------------
363 | Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71
364 | */
365 |
366 | div.csl-bib-body { }
367 | div.csl-entry {
368 | clear: both;
369 | }
370 | .hanging-indent div.csl-entry {
371 | margin-left:2em;
372 | text-indent:-2em;
373 | }
374 | div.csl-left-margin {
375 | min-width:2em;
376 | float:left;
377 | }
378 | div.csl-right-inline {
379 | margin-left:2em;
380 | padding-left:1em;
381 | }
382 | div.csl-indent {
383 | margin-left: 2em;
384 | }
385 |
--------------------------------------------------------------------------------
/docs/pkgdown.js:
--------------------------------------------------------------------------------
1 | /* http://gregfranko.com/blog/jquery-best-practices/ */
2 | (function($) {
3 | $(function() {
4 |
5 | $('nav.navbar').headroom();
6 |
7 | Toc.init({
8 | $nav: $("#toc"),
9 | $scope: $("main h2, main h3, main h4, main h5, main h6")
10 | });
11 |
12 | if ($('#toc').length) {
13 | $('body').scrollspy({
14 | target: '#toc',
15 | offset: $("nav.navbar").outerHeight() + 1
16 | });
17 | }
18 |
19 | // Activate popovers
20 | $('[data-bs-toggle="popover"]').popover({
21 | container: 'body',
22 | html: true,
23 | trigger: 'focus',
24 | placement: "top",
25 | sanitize: false,
26 | });
27 |
28 | $('[data-bs-toggle="tooltip"]').tooltip();
29 |
30 | /* Clipboard --------------------------*/
31 |
32 | function changeTooltipMessage(element, msg) {
33 | var tooltipOriginalTitle=element.getAttribute('data-bs-original-title');
34 | element.setAttribute('data-bs-original-title', msg);
35 | $(element).tooltip('show');
36 | element.setAttribute('data-bs-original-title', tooltipOriginalTitle);
37 | }
38 |
39 | if(ClipboardJS.isSupported()) {
40 | $(document).ready(function() {
41 | var copyButton = " ";
42 |
43 | $("div.sourceCode").addClass("hasCopyButton");
44 |
45 | // Insert copy buttons:
46 | $(copyButton).prependTo(".hasCopyButton");
47 |
48 | // Initialize tooltips:
49 | $('.btn-copy-ex').tooltip({container: 'body'});
50 |
51 | // Initialize clipboard:
52 | var clipboard = new ClipboardJS('[data-clipboard-copy]', {
53 | text: function(trigger) {
54 | return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, "");
55 | }
56 | });
57 |
58 | clipboard.on('success', function(e) {
59 | changeTooltipMessage(e.trigger, 'Copied!');
60 | e.clearSelection();
61 | });
62 |
63 | clipboard.on('error', function(e) {
64 | changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy');
65 | });
66 |
67 | });
68 | }
69 |
70 | /* Search marking --------------------------*/
71 | var url = new URL(window.location.href);
72 | var toMark = url.searchParams.get("q");
73 | var mark = new Mark("main#main");
74 | if (toMark) {
75 | mark.mark(toMark, {
76 | accuracy: {
77 | value: "complementary",
78 | limiters: [",", ".", ":", "/"],
79 | }
80 | });
81 | }
82 |
83 | /* Search --------------------------*/
84 | /* Adapted from https://github.com/rstudio/bookdown/blob/2d692ba4b61f1e466c92e78fd712b0ab08c11d31/inst/resources/bs4_book/bs4_book.js#L25 */
85 | // Initialise search index on focus
86 | var fuse;
87 | $("#search-input").focus(async function(e) {
88 | if (fuse) {
89 | return;
90 | }
91 |
92 | $(e.target).addClass("loading");
93 | var response = await fetch($("#search-input").data("search-index"));
94 | var data = await response.json();
95 |
96 | var options = {
97 | keys: ["what", "text", "code"],
98 | ignoreLocation: true,
99 | threshold: 0.1,
100 | includeMatches: true,
101 | includeScore: true,
102 | };
103 | fuse = new Fuse(data, options);
104 |
105 | $(e.target).removeClass("loading");
106 | });
107 |
108 | // Use algolia autocomplete
109 | var options = {
110 | autoselect: true,
111 | debug: true,
112 | hint: false,
113 | minLength: 2,
114 | };
115 | var q;
116 | async function searchFuse(query, callback) {
117 | await fuse;
118 |
119 | var items;
120 | if (!fuse) {
121 | items = [];
122 | } else {
123 | q = query;
124 | var results = fuse.search(query, { limit: 20 });
125 | items = results
126 | .filter((x) => x.score <= 0.75)
127 | .map((x) => x.item);
128 | if (items.length === 0) {
129 | items = [{dir:"Sorry 😿",previous_headings:"",title:"No results found.",what:"No results found.",path:window.location.href}];
130 | }
131 | }
132 | callback(items);
133 | }
134 | $("#search-input").autocomplete(options, [
135 | {
136 | name: "content",
137 | source: searchFuse,
138 | templates: {
139 | suggestion: (s) => {
140 | if (s.title == s.what) {
141 | return `${s.dir} > ${s.title}
`;
142 | } else if (s.previous_headings == "") {
143 | return `${s.dir} > ${s.title}
> ${s.what}`;
144 | } else {
145 | return `${s.dir} > ${s.title}
> ${s.previous_headings} > ${s.what}`;
146 | }
147 | },
148 | },
149 | },
150 | ]).on('autocomplete:selected', function(event, s) {
151 | window.location.href = s.path + "?q=" + q + "#" + s.id;
152 | });
153 | });
154 | })(window.jQuery || window.$)
155 |
--------------------------------------------------------------------------------
/docs/pkgdown.yml:
--------------------------------------------------------------------------------
1 | pandoc: '3.2'
2 | pkgdown: 2.1.0
3 | pkgdown_sha: ~
4 | articles:
5 | introduction-to-vistributions: introduction-to-vistributions.html
6 | last_built: 2024-11-07T11:30Z
7 | urls:
8 | reference: https://vistributions.rsquaredacademy.com/reference
9 | article: https://vistributions.rsquaredacademy.com/articles
10 |
--------------------------------------------------------------------------------
/docs/reference/Rplot001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/Rplot001.png
--------------------------------------------------------------------------------
/docs/reference/Rplot002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/Rplot002.png
--------------------------------------------------------------------------------
/docs/reference/Rplot003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/Rplot003.png
--------------------------------------------------------------------------------
/docs/reference/Rplot004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/Rplot004.png
--------------------------------------------------------------------------------
/docs/reference/Rplot005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/Rplot005.png
--------------------------------------------------------------------------------
/docs/reference/Rplot006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/Rplot006.png
--------------------------------------------------------------------------------
/docs/reference/Rplot007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/Rplot007.png
--------------------------------------------------------------------------------
/docs/reference/Rplot008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/Rplot008.png
--------------------------------------------------------------------------------
/docs/reference/Rplot009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/Rplot009.png
--------------------------------------------------------------------------------
/docs/reference/Rplot010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/Rplot010.png
--------------------------------------------------------------------------------
/docs/reference/figures/README-binom-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/figures/README-binom-1.png
--------------------------------------------------------------------------------
/docs/reference/figures/README-normal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/figures/README-normal-1.png
--------------------------------------------------------------------------------
/docs/reference/figures/README-normal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/figures/README-normal-2.png
--------------------------------------------------------------------------------
/docs/reference/figures/README-normal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/figures/README-normal-3.png
--------------------------------------------------------------------------------
/docs/reference/index.html:
--------------------------------------------------------------------------------
1 |
2 | Package index • vistributions
3 | Skip to contents
4 |
5 |
6 |
7 |
8 |
vistributions
9 |
10 |
0.2.0.9000
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Home
19 |
20 | Guides
21 |
23 |
24 | Reference
25 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
39 |
40 |
41 |
Shiny App
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | vdist_launch_app()
54 |
55 |
56 | Launch shiny app
57 |
58 |
Binomial
59 |
60 |
61 |
62 |
63 |
75 |
Chi Square
76 |
77 |
78 |
79 |
80 |
92 |
Normal
93 |
94 |
95 |
96 |
97 |
109 |
f
110 |
111 |
112 |
113 |
114 |
126 |
t
127 |
128 |
129 |
130 |
131 |
143 |
145 |
146 |
147 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
--------------------------------------------------------------------------------
/docs/reference/vdist_binom_perc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vdist_binom_plot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_binom_plot-1.png
--------------------------------------------------------------------------------
/docs/reference/vdist_binom_plot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_binom_plot-2.png
--------------------------------------------------------------------------------
/docs/reference/vdist_binom_plot-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_binom_plot-3.png
--------------------------------------------------------------------------------
/docs/reference/vdist_binom_plot-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_binom_plot-4.png
--------------------------------------------------------------------------------
/docs/reference/vdist_binom_plot-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_binom_plot-5.png
--------------------------------------------------------------------------------
/docs/reference/vdist_binom_plot-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_binom_plot-6.png
--------------------------------------------------------------------------------
/docs/reference/vdist_binom_plot-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_binom_plot-7.png
--------------------------------------------------------------------------------
/docs/reference/vdist_binom_prob.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vdist_chisquare_perc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vdist_chisquare_plot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_chisquare_plot-1.png
--------------------------------------------------------------------------------
/docs/reference/vdist_chisquare_plot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_chisquare_plot-2.png
--------------------------------------------------------------------------------
/docs/reference/vdist_chisquare_plot-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_chisquare_plot-3.png
--------------------------------------------------------------------------------
/docs/reference/vdist_chisquare_plot-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_chisquare_plot-4.png
--------------------------------------------------------------------------------
/docs/reference/vdist_chisquare_plot-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_chisquare_plot-5.png
--------------------------------------------------------------------------------
/docs/reference/vdist_chisquare_plot-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_chisquare_plot-6.png
--------------------------------------------------------------------------------
/docs/reference/vdist_chisquare_plot-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_chisquare_plot-7.png
--------------------------------------------------------------------------------
/docs/reference/vdist_chisquare_prob.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vdist_f_perc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vdist_f_plot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_f_plot-1.png
--------------------------------------------------------------------------------
/docs/reference/vdist_f_plot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_f_plot-2.png
--------------------------------------------------------------------------------
/docs/reference/vdist_f_plot-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_f_plot-3.png
--------------------------------------------------------------------------------
/docs/reference/vdist_f_plot-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_f_plot-4.png
--------------------------------------------------------------------------------
/docs/reference/vdist_f_plot-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_f_plot-5.png
--------------------------------------------------------------------------------
/docs/reference/vdist_f_plot-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_f_plot-6.png
--------------------------------------------------------------------------------
/docs/reference/vdist_f_prob.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vdist_launch_app.html:
--------------------------------------------------------------------------------
1 |
2 | Launch shiny app — vdist_launch_app • vistributions
3 | Skip to contents
4 |
5 |
6 |
7 |
8 |
vistributions
9 |
10 |
0.2.0.9000
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Home
19 |
20 | Guides
21 |
23 |
24 | Reference
25 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
41 |
42 |
43 |
Launches shiny app for visualizing distributions.
44 |
45 |
46 |
50 |
51 |
52 |
53 |
Examples
54 |
if ( FALSE ) { # \dontrun{
55 | vdist_launch_app ( )
56 | } # }
57 |
58 |
59 |
61 |
62 |
63 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/docs/reference/vdist_norm_plot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_norm_plot-1.png
--------------------------------------------------------------------------------
/docs/reference/vdist_norm_plot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_norm_plot-2.png
--------------------------------------------------------------------------------
/docs/reference/vdist_norm_plot.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Visualize normal distribution — vdist_norm_plot • vistributions
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 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
69 |
70 |
71 |
91 |
92 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
115 |
116 |
117 |
118 |
Visualize how changes in mean and standard deviation affect the
119 | shape of the normal distribution. Compute & visualize quantiles out of given
120 | probability and probability from a given quantile.
121 |
122 |
123 |
124 |
vdist_norm_plot (mean = 0 , sd = 1 )
125 |
126 |
Arguments
127 |
128 |
129 |
130 | mean
131 | Mean of the normal distribution.
132 |
133 |
134 | sd
135 | Standard deviation of the normal distribution.
136 |
137 |
138 |
139 |
See also
140 |
141 |
142 |
143 |
144 |
Examples
145 |
# visualize normal distribution
146 | vdist_norm_plot ()
vdist_norm_plot (mean = 2 , sd = 0.6 )
147 |
148 |
149 |
160 |
161 |
162 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
--------------------------------------------------------------------------------
/docs/reference/vdist_normal_perc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vdist_normal_plot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_normal_plot-1.png
--------------------------------------------------------------------------------
/docs/reference/vdist_normal_plot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_normal_plot-2.png
--------------------------------------------------------------------------------
/docs/reference/vdist_normal_plot-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_normal_plot-3.png
--------------------------------------------------------------------------------
/docs/reference/vdist_normal_plot-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_normal_plot-4.png
--------------------------------------------------------------------------------
/docs/reference/vdist_normal_plot-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_normal_plot-5.png
--------------------------------------------------------------------------------
/docs/reference/vdist_normal_plot-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_normal_plot-6.png
--------------------------------------------------------------------------------
/docs/reference/vdist_normal_plot-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_normal_plot-7.png
--------------------------------------------------------------------------------
/docs/reference/vdist_normal_plot-8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_normal_plot-8.png
--------------------------------------------------------------------------------
/docs/reference/vdist_normal_prob.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vdist_t-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_t-1.png
--------------------------------------------------------------------------------
/docs/reference/vdist_t-10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_t-10.png
--------------------------------------------------------------------------------
/docs/reference/vdist_t-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_t-2.png
--------------------------------------------------------------------------------
/docs/reference/vdist_t-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_t-3.png
--------------------------------------------------------------------------------
/docs/reference/vdist_t-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_t-4.png
--------------------------------------------------------------------------------
/docs/reference/vdist_t-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_t-5.png
--------------------------------------------------------------------------------
/docs/reference/vdist_t-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_t-6.png
--------------------------------------------------------------------------------
/docs/reference/vdist_t-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_t-7.png
--------------------------------------------------------------------------------
/docs/reference/vdist_t-8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_t-8.png
--------------------------------------------------------------------------------
/docs/reference/vdist_t-9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/docs/reference/vdist_t-9.png
--------------------------------------------------------------------------------
/docs/reference/vdist_t_perc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vdist_t_plot.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vdist_t_prob.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vistributions-package.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/reference/vistributions.html:
--------------------------------------------------------------------------------
1 |
2 | vistributions package — vistributions • vistributions
3 | Skip to contents
4 |
5 |
6 |
7 |
8 |
vistributions
9 |
10 |
0.2.0.9000
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Home
19 |
20 | Guides
21 |
23 |
24 | Reference
25 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
41 |
42 |
43 |
Visualize probability distributions.
44 |
45 |
46 |
47 |
54 |
58 |
59 |
61 |
62 |
63 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/docs/sitemap.xml:
--------------------------------------------------------------------------------
1 |
2 | https://vistributions.rsquaredacademy.com/404.html
3 | https://vistributions.rsquaredacademy.com/articles/index.html
4 | https://vistributions.rsquaredacademy.com/articles/introduction-to-vistributions.html
5 | https://vistributions.rsquaredacademy.com/authors.html
6 | https://vistributions.rsquaredacademy.com/CODE_OF_CONDUCT.html
7 | https://vistributions.rsquaredacademy.com/google02e424888b5e2def.html
8 | https://vistributions.rsquaredacademy.com/index.html
9 | https://vistributions.rsquaredacademy.com/LICENSE-text.html
10 | https://vistributions.rsquaredacademy.com/LICENSE.html
11 | https://vistributions.rsquaredacademy.com/news/index.html
12 | https://vistributions.rsquaredacademy.com/reference/index.html
13 | https://vistributions.rsquaredacademy.com/reference/vdist_binom_plot.html
14 | https://vistributions.rsquaredacademy.com/reference/vdist_chisquare_plot.html
15 | https://vistributions.rsquaredacademy.com/reference/vdist_f_plot.html
16 | https://vistributions.rsquaredacademy.com/reference/vdist_launch_app.html
17 | https://vistributions.rsquaredacademy.com/reference/vdist_normal_plot.html
18 | https://vistributions.rsquaredacademy.com/reference/vdist_norm_plot.html
19 | https://vistributions.rsquaredacademy.com/reference/vdist_t.html
20 | https://vistributions.rsquaredacademy.com/reference/vistributions.html
21 |
22 |
23 |
--------------------------------------------------------------------------------
/man/figures/README-binom-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/man/figures/README-binom-1.png
--------------------------------------------------------------------------------
/man/figures/README-normal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/man/figures/README-normal-1.png
--------------------------------------------------------------------------------
/man/figures/README-normal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/man/figures/README-normal-2.png
--------------------------------------------------------------------------------
/man/figures/README-normal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsquaredacademy/vistributions/90edff6cfabfe545933334bc1fd1e9d24f394587/man/figures/README-normal-3.png
--------------------------------------------------------------------------------
/man/vdist_binom_plot.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/vdist-binomial.R
3 | \name{vdist_binom_plot}
4 | \alias{vdist_binom_plot}
5 | \alias{vdist_binom_prob}
6 | \alias{vdist_binom_perc}
7 | \title{Visualize binomial distribution}
8 | \usage{
9 | vdist_binom_plot(n = 10, p = 0.3, print_plot = TRUE)
10 |
11 | vdist_binom_prob(
12 | n = 10,
13 | p = 0.3,
14 | s = 4,
15 | type = c("lower", "upper", "exact", "interval"),
16 | print_plot = TRUE
17 | )
18 |
19 | vdist_binom_perc(
20 | n = 10,
21 | p = 0.5,
22 | tp = 0.05,
23 | type = c("lower", "upper"),
24 | print_plot = TRUE
25 | )
26 | }
27 | \arguments{
28 | \item{n}{Number of trials.}
29 |
30 | \item{p}{Aggregate probability.}
31 |
32 | \item{print_plot}{logical; if \code{TRUE}, prints the plot else returns a plot object.}
33 |
34 | \item{s}{Number of success.}
35 |
36 | \item{type}{Lower/upper/exact/interval.}
37 |
38 | \item{tp}{Probability of success in a trial.}
39 | }
40 | \description{
41 | Visualize how changes in number of trials and the probability of
42 | success affect the shape of the binomial distribution. Compute & visualize
43 | probability from a given quantile and quantiles out of given probability.
44 | }
45 | \examples{
46 | # visualize binomial distribution
47 | vdist_binom_plot(10, 0.3)
48 |
49 | # visualize probability from a given quantile
50 | vdist_binom_prob(10, 0.3, 4, type = 'exact')
51 | vdist_binom_prob(10, 0.3, 4, type = 'lower')
52 | vdist_binom_prob(10, 0.3, 4, type = 'upper')
53 | vdist_binom_prob(10, 0.3, c(4, 6), type = 'interval')
54 |
55 |
56 | # visualize quantiles out of given probability
57 | vdist_binom_perc(10, 0.5, 0.05)
58 | vdist_binom_perc(10, 0.5, 0.05, "upper")
59 |
60 | }
61 | \seealso{
62 | \code{\link[stats]{Binomial}}
63 | }
64 |
--------------------------------------------------------------------------------
/man/vdist_chisquare_plot.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/vdist-chisquare.R
3 | \name{vdist_chisquare_plot}
4 | \alias{vdist_chisquare_plot}
5 | \alias{vdist_chisquare_perc}
6 | \alias{vdist_chisquare_prob}
7 | \title{Visualize chi square distribution}
8 | \usage{
9 | vdist_chisquare_plot(
10 | df = 3,
11 | normal = FALSE,
12 | xaxis_range = 25,
13 | print_plot = TRUE
14 | )
15 |
16 | vdist_chisquare_perc(
17 | probs = 0.95,
18 | df = 3,
19 | type = c("lower", "upper"),
20 | print_plot = TRUE
21 | )
22 |
23 | vdist_chisquare_prob(
24 | perc = 13,
25 | df = 11,
26 | type = c("lower", "upper"),
27 | print_plot = TRUE
28 | )
29 | }
30 | \arguments{
31 | \item{df}{Degrees of freedom.}
32 |
33 | \item{normal}{If \code{TRUE}, normal curve with same \code{mean} and
34 | \code{sd} as the chi square distribution is drawn.}
35 |
36 | \item{xaxis_range}{The upper range of the X axis.}
37 |
38 | \item{print_plot}{logical; if \code{TRUE}, prints the plot else returns a plot object.}
39 |
40 | \item{probs}{Probability value.}
41 |
42 | \item{type}{Lower tail or upper tail.}
43 |
44 | \item{perc}{Quantile value.}
45 | }
46 | \description{
47 | Visualize how changes in degrees of freedom affect the shape of
48 | the chi square distribution. Compute & visualize quantiles out of given
49 | probability and probability from a given quantile.
50 | }
51 | \examples{
52 | # visualize chi square distribution
53 | vdist_chisquare_plot()
54 | vdist_chisquare_plot(df = 5)
55 | vdist_chisquare_plot(df = 5, normal = TRUE)
56 |
57 | # visualize quantiles out of given probability
58 | vdist_chisquare_perc(0.165, 8, 'lower')
59 | vdist_chisquare_perc(0.22, 13, 'upper')
60 |
61 | # visualize probability from a given quantile.
62 | vdist_chisquare_prob(13.58, 11, 'lower')
63 | vdist_chisquare_prob(15.72, 13, 'upper')
64 |
65 | }
66 | \seealso{
67 | \code{\link[stats]{Chisquare}}
68 | }
69 |
--------------------------------------------------------------------------------
/man/vdist_f_plot.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/vdist-f.R
3 | \name{vdist_f_plot}
4 | \alias{vdist_f_plot}
5 | \alias{vdist_f_perc}
6 | \alias{vdist_f_prob}
7 | \title{Visualize f distribution}
8 | \usage{
9 | vdist_f_plot(num_df = 4, den_df = 30, normal = FALSE, print_plot = TRUE)
10 |
11 | vdist_f_perc(
12 | probs = 0.95,
13 | num_df = 3,
14 | den_df = 30,
15 | type = c("lower", "upper"),
16 | print_plot = TRUE
17 | )
18 |
19 | vdist_f_prob(
20 | perc = 2.35,
21 | num_df = 5,
22 | den_df = 32,
23 | type = c("lower", "upper"),
24 | print_plot = TRUE
25 | )
26 | }
27 | \arguments{
28 | \item{num_df}{Degrees of freedom associated with the numerator of f statistic.}
29 |
30 | \item{den_df}{Degrees of freedom associated with the denominator of f statistic.}
31 |
32 | \item{normal}{If \code{TRUE}, normal curve with same \code{mean} and
33 | \code{sd} as the F distribution is drawn.}
34 |
35 | \item{print_plot}{logical; if \code{TRUE}, prints the plot else returns a plot object.}
36 |
37 | \item{probs}{Probability value.}
38 |
39 | \item{type}{Lower tail or upper tail.}
40 |
41 | \item{perc}{Quantile value.}
42 | }
43 | \description{
44 | Visualize how changes in degrees of freedom affect the
45 | shape of the F distribution. Compute & visualize quantiles out of given
46 | probability and probability from a given quantile.
47 | }
48 | \examples{
49 | # visualize F distribution
50 | vdist_f_plot()
51 | vdist_f_plot(6, 10, normal = TRUE)
52 |
53 | # visualize probability from a given quantile
54 | vdist_f_perc(0.95, 3, 30, 'lower')
55 | vdist_f_perc(0.125, 9, 35, 'upper')
56 |
57 | # visualize quantiles out of given probability
58 | vdist_f_prob(2.35, 5, 32)
59 | vdist_f_prob(1.5222, 9, 35, type = "upper")
60 |
61 | }
62 | \seealso{
63 | \code{\link[stats]{FDist}}
64 | }
65 |
--------------------------------------------------------------------------------
/man/vdist_launch_app.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/vdist-app.R
3 | \name{vdist_launch_app}
4 | \alias{vdist_launch_app}
5 | \title{Launch shiny app}
6 | \usage{
7 | vdist_launch_app()
8 | }
9 | \description{
10 | Launches shiny app for visualizing distributions.
11 | }
12 | \examples{
13 | \dontrun{
14 | vdist_launch_app ()
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/man/vdist_normal_plot.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/vdist-normal.R
3 | \name{vdist_normal_plot}
4 | \alias{vdist_normal_plot}
5 | \alias{vdist_normal_perc}
6 | \alias{vdist_normal_prob}
7 | \title{Visualize normal distribution}
8 | \usage{
9 | vdist_normal_plot(mean = 0, sd = 1, print_plot = TRUE)
10 |
11 | vdist_normal_perc(
12 | probs = 0.95,
13 | mean = 0,
14 | sd = 1,
15 | type = c("lower", "upper", "both"),
16 | print_plot = TRUE
17 | )
18 |
19 | vdist_normal_prob(
20 | perc = 3,
21 | mean = 0,
22 | sd = 1,
23 | type = c("lower", "upper", "both"),
24 | print_plot = TRUE
25 | )
26 | }
27 | \arguments{
28 | \item{mean}{Mean of the normal distribution.}
29 |
30 | \item{sd}{Standard deviation of the normal distribution.}
31 |
32 | \item{print_plot}{logical; if \code{TRUE}, prints the plot else returns a plot object.}
33 |
34 | \item{probs}{Probability value.}
35 |
36 | \item{type}{Lower tail, upper tail or both.}
37 |
38 | \item{perc}{Quantile value.}
39 | }
40 | \description{
41 | Visualize how changes in mean and standard deviation affect the
42 | shape of the normal distribution. Compute & visualize quantiles out of given
43 | probability and probability from a given quantile.
44 | }
45 | \examples{
46 | # visualize normal distribution
47 | vdist_normal_plot()
48 | vdist_normal_plot(mean = 2, sd = 0.6)
49 |
50 | # visualize quantiles out of given probability
51 | vdist_normal_perc(0.95, mean = 2, sd = 1.36)
52 | vdist_normal_perc(0.3, mean = 2, sd = 1.36, type = 'upper')
53 | vdist_normal_perc(0.95, mean = 2, sd = 1.36, type = 'both')
54 |
55 | # visualize probability from a given quantile
56 | vdist_normal_prob(3.78, mean = 2, sd = 1.36)
57 | vdist_normal_prob(3.43, mean = 2, sd = 1.36, type = 'upper')
58 | vdist_normal_prob(c(-1.74, 1.83), type = 'both')
59 |
60 | }
61 | \seealso{
62 | \code{\link[stats]{Normal}}
63 | }
64 |
--------------------------------------------------------------------------------
/man/vdist_t.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/vdist-t.R
3 | \name{vdist_t}
4 | \alias{vdist_t}
5 | \alias{vdist_t_plot}
6 | \alias{vdist_t_perc}
7 | \alias{vdist_t_prob}
8 | \title{Visualize t distribution}
9 | \usage{
10 | vdist_t_plot(df = 3, print_plot = TRUE)
11 |
12 | vdist_t_perc(
13 | probs = 0.95,
14 | df = 4,
15 | type = c("lower", "upper", "both"),
16 | print_plot = TRUE
17 | )
18 |
19 | vdist_t_prob(
20 | perc = 1.6,
21 | df = 7,
22 | type = c("lower", "upper", "interval", "both"),
23 | print_plot = TRUE
24 | )
25 | }
26 | \arguments{
27 | \item{df}{Degrees of freedom.}
28 |
29 | \item{print_plot}{logical; if \code{TRUE}, prints the plot else returns a plot object.}
30 |
31 | \item{probs}{Probability value.}
32 |
33 | \item{type}{Lower tail, upper tail, interval or both.}
34 |
35 | \item{perc}{Quantile value.}
36 | }
37 | \description{
38 | Visualize how degrees of freedom affect the shape of t
39 | distribution, visualize quantiles out of given probability and
40 | probability from a given quantile.
41 | }
42 | \examples{
43 | # visualize t distribution
44 | vdist_t_plot()
45 | vdist_t_plot(6)
46 | vdist_t_plot(df = 8)
47 |
48 | # visualize quantiles out of given probability
49 | vdist_t_perc(probs = 0.95, df = 4, type = 'lower')
50 | vdist_t_perc(probs = 0.35, df = 4, type = 'upper')
51 | vdist_t_perc(probs = 0.69, df = 7, type = 'both')
52 |
53 | # visualize probability from a given quantile
54 | vdist_t_prob(2.045, 7, 'lower')
55 | vdist_t_prob(0.945, 7, 'upper')
56 | vdist_t_prob(1.445, 7, 'interval')
57 | vdist_t_prob(1.6, 7, 'both')
58 |
59 | }
60 | \seealso{
61 | \code{\link[stats]{TDist}}
62 | }
63 |
--------------------------------------------------------------------------------
/man/vistributions.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/vistributions.R
3 | \docType{package}
4 | \name{vistributions}
5 | \alias{vistributions}
6 | \alias{vistributions-package}
7 | \title{\code{vistributions} package}
8 | \description{
9 | Visualize probability distributions.
10 | }
11 | \seealso{
12 | Useful links:
13 | \itemize{
14 | \item \url{https://github.com/rsquaredacademy/vistributions}
15 | \item \url{https://vistributions.rsquaredacademy.com}
16 | \item Report bugs at \url{https://github.com/rsquaredacademy/vistributions/issues}
17 | }
18 |
19 | }
20 | \author{
21 | \strong{Maintainer}: Aravind Hebbali \email{hebbali.aravind@gmail.com}
22 |
23 | }
24 | \keyword{internal}
25 |
--------------------------------------------------------------------------------
/tests/figs/deps.txt:
--------------------------------------------------------------------------------
1 | - vdiffr-svg-engine: 1.0
2 | - vdiffr: 0.3.1
3 | - freetypeharfbuzz: 0.2.5
4 |
--------------------------------------------------------------------------------
/tests/testthat.R:
--------------------------------------------------------------------------------
1 | library(testthat)
2 | library(vistributions)
3 |
4 | test_check("vistributions")
5 |
--------------------------------------------------------------------------------
/tests/testthat/test-binomial.R:
--------------------------------------------------------------------------------
1 | context("test-binomial")
2 |
3 | test_that("vdist_binom_plot throws the appropriate errors", {
4 | expect_error(vdist_binom_plot(10, -0.5), "p must be between 0 and 1 only.")
5 | expect_error(vdist_binom_plot(10, 1.5), "p must be between 0 and 1 only.")
6 | expect_error(vdist_binom_plot("10", 0.5), "n must be numeric.")
7 | expect_error(vdist_binom_plot(as.factor(10), 0.5), "n must be numeric.")
8 | expect_error(vdist_binom_plot(10, "0.5"), "p must be numeric.")
9 | expect_error(vdist_binom_plot(10, as.factor(0.5)), "p must be numeric.")
10 | })
11 |
12 | test_that("vdist_binom_prob throws the appropriate errors", {
13 | expect_error(vdist_binom_prob(10, -0.5, 4), "p must be between 0 and 1 only.")
14 | expect_error(vdist_binom_prob(10, 1.5, 4), "p must be between 0 and 1 only.")
15 | expect_error(vdist_binom_prob(10, "0.5", 4), "p must be numeric.")
16 | expect_error(vdist_binom_prob("10", 0.5, 4), "n must be numeric.")
17 | expect_error(vdist_binom_prob(as.factor(10), 0.5, 4), "n must be numeric.")
18 | expect_error(vdist_binom_prob(10, 0.5, "4"), "s must be numeric.")
19 | expect_error(vdist_binom_prob(10, 0.5, as.factor(4)), "s must be numeric.")
20 | expect_error(vdist_binom_prob(10, 0.3, 4, type = 'interval'), "Please specify an interval for s.")
21 | expect_error(vdist_binom_prob(3, 0.3, 4), "s must be less than or equal to n.")
22 | })
23 |
24 | test_that("vdist_binom_perc throws the appropriate errors", {
25 | expect_error(vdist_binom_perc(10, -0.5, 0.05), "p must be between 0 and 1 only.")
26 | expect_error(vdist_binom_perc(10, 1.5, 0.05), "p must be between 0 and 1 only.")
27 | expect_error(vdist_binom_perc(10, 0.5, -0.05), "tp must be between 0 and 0.5 only.")
28 | expect_error(vdist_binom_perc(10, 0.5, 0.51), "tp must be between 0 and 0.5 only.")
29 | expect_error(vdist_binom_perc("10", 0.5, 0.05), "n must be numeric.")
30 | expect_error(vdist_binom_perc(as.factor(10), 0.5, 0.05), "n must be numeric.")
31 | expect_error(vdist_binom_perc(10, "0.5", 0.05), "p must be numeric.")
32 | expect_error(vdist_binom_perc(10, as.factor(0.5), 0.05), "p must be numeric.")
33 | expect_error(vdist_binom_perc(10, 0.5, "0.05"), "tp must be numeric.")
34 | expect_error(vdist_binom_perc(10, 0.5, as.factor(0.05)), "tp must be numeric.")
35 | })
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/tests/testthat/test-chisquare.R:
--------------------------------------------------------------------------------
1 | context("test-chisquare")
2 |
3 | test_that("vdist_chi_plot returns appropriate error messages", {
4 | expect_error(vdist_chisquare_plot("3"), "df must be numeric.")
5 |
6 | expect_error(vdist_chisquare_plot(as.factor(3)), "df must be numeric.")
7 |
8 | expect_error(vdist_chisquare_plot(normal = 3), "normal must be a logical value.")
9 |
10 | expect_error(vdist_chisquare_plot(normal = "3"), "normal must be a logical value.")
11 | })
12 |
13 | test_that("vdist_chisquare_perc returns appropriate error messages", {
14 | expect_error(vdist_chisquare_perc("0.95"), "probs must be numeric.")
15 |
16 | expect_error(vdist_chisquare_perc(as.factor(1)), "probs must be numeric.")
17 |
18 | expect_error(vdist_chisquare_perc(df = "3"), "df must be numeric.")
19 |
20 | expect_error(vdist_chisquare_perc(df = as.factor(3)), "df must be numeric.")
21 | })
22 |
23 | test_that("vdist_chisquare_prob returns appropriate error messages", {
24 | expect_error(vdist_chisquare_prob("0.95", df = 3), "perc must be numeric.")
25 |
26 | expect_error(vdist_chisquare_prob(as.factor(1), df = 3), "perc must be numeric.")
27 |
28 | expect_error(vdist_chisquare_prob(df = "3"), "df must be numeric.")
29 |
30 | expect_error(vdist_chisquare_prob(df = as.factor(3)), "df must be numeric.")
31 | })
32 |
--------------------------------------------------------------------------------
/tests/testthat/test-f.R:
--------------------------------------------------------------------------------
1 | context("test-f")
2 |
3 | test_that("vdist_f_plot returns appropriate error messages", {
4 | expect_error(vdist_f_plot("3"), "num_df must be numeric.")
5 |
6 | expect_error(vdist_f_plot(as.factor(3)), "num_df must be numeric.")
7 |
8 | expect_error(vdist_f_plot(den_df = "3"), "den_df must be numeric.")
9 |
10 | expect_error(vdist_f_plot(den_df = as.factor(3)), "den_df must be numeric.")
11 |
12 | expect_error(vdist_f_plot(normal = 3), "normal must be a logical value.")
13 |
14 | expect_error(vdist_f_plot(normal = "3"), "normal must be a logical value.")
15 | })
16 |
17 | test_that("vdist_f_perc returns appropriate error messages", {
18 | expect_error(vdist_f_perc("0.95"), "probs must be numeric.")
19 |
20 | expect_error(vdist_f_perc(as.factor(1)), "probs must be numeric.")
21 |
22 | expect_error(vdist_f_perc(num_df = "3"), "num_df must be numeric.")
23 |
24 | expect_error(vdist_f_perc(num_df = as.factor(3)), "num_df must be numeric.")
25 |
26 | expect_error(vdist_f_perc(den_df = "3"), "den_df must be numeric.")
27 |
28 | expect_error(vdist_f_perc(den_df = as.factor(3)), "den_df must be numeric.")
29 |
30 | expect_error(vdist_f_perc(1.02), "probs must be between 0 and 1 only.")
31 |
32 | })
33 |
34 | test_that("vdist_f_prob returns appropriate error messages", {
35 | expect_error(vdist_f_prob("0.95", 3, 30), "perc must be numeric.")
36 |
37 | expect_error(vdist_f_prob(as.factor(1), 3, 30), "perc must be numeric.")
38 |
39 | expect_error(vdist_f_prob(0.95, num_df = "3", den_df = 30), "num_df must be numeric.")
40 |
41 | expect_error(vdist_f_prob(0.95, num_df = as.factor(3), den_df = 30), "num_df must be numeric.")
42 |
43 | expect_error(vdist_f_prob(0.95, 3, den_df = "3"), "den_df must be numeric.")
44 |
45 | expect_error(vdist_f_prob(0.95, 3, den_df = as.factor(3)), "den_df must be numeric.")
46 | })
47 |
--------------------------------------------------------------------------------
/tests/testthat/test-normal.R:
--------------------------------------------------------------------------------
1 | context("test-normal")
2 |
3 | test_that("vdist_normal_plot throws the appropriate errors", {
4 | expect_error(vdist_normal_plot("10", 0.5), "mean must be numeric.")
5 | expect_error(vdist_normal_plot(as.factor(10), 0.5), "mean must be numeric.")
6 | expect_error(vdist_normal_plot(10, "0.5"), "sd must be numeric.")
7 | expect_error(vdist_normal_plot(10, as.factor(0.5)), "sd must be numeric.")
8 | expect_error(vdist_normal_plot(10, -2), "sd must be a positive value.")
9 | })
10 |
11 | test_that("vdist_normal_prob throws the appropriate errors", {
12 | expect_error(vdist_normal_prob("0.95"), "perc must be numeric.")
13 | expect_error(vdist_normal_prob(TRUE), "perc must be numeric.")
14 | expect_error(vdist_normal_prob(0.95, "10", 0.5), "mean must be numeric.")
15 | expect_error(vdist_normal_prob(0.95, as.factor(10), 0.5), "mean must be numeric.")
16 | expect_error(vdist_normal_prob(0.95, 10, "0.5"), "sd must be numeric.")
17 | expect_error(vdist_normal_prob(0.95, 10, as.factor(0.5)), "sd must be numeric.")
18 | expect_error(vdist_normal_prob(0.95, 10, -2), "sd must be a positive value.")
19 | expect_error(vdist_normal_prob(c(-1.74, 1.83, 0.6)), "Please do not specify more than 2 percentile values.")
20 | expect_error(vdist_normal_prob(c(-1.74), type = 'both'), "Specify two percentile values.")
21 | })
22 |
23 | test_that("vdist_normal_perc throws the appropriate errors", {
24 | expect_error(vdist_normal_perc(1.5), "probs must be between 0 and 1 only.")
25 | expect_error(vdist_normal_perc("0.95"), "probs must be numeric.")
26 | expect_error(vdist_normal_perc(TRUE), "probs must be numeric.")
27 | expect_error(vdist_normal_perc(0.95, "10", 0.5), "mean must be numeric.")
28 | expect_error(vdist_normal_perc(0.95, as.factor(10), 0.5), "mean must be numeric.")
29 | expect_error(vdist_normal_perc(0.95, 10, "0.5"), "sd must be numeric.")
30 | expect_error(vdist_normal_perc(0.95, 10, as.factor(0.5)), "sd must be numeric.")
31 | expect_error(vdist_normal_perc(0.95, 10, -2), "sd must be a positive value.")
32 | })
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/tests/testthat/test-t.R:
--------------------------------------------------------------------------------
1 | context("test-t")
2 |
3 | test_that("vdist_t_plot throws the appropriate errors", {
4 | expect_error(vdist_t_plot("10"), "df must be numeric.")
5 | expect_error(vdist_t_plot(TRUE), "df must be numeric.")
6 | })
7 |
8 | test_that("vdist_t_prob throws the appropriate errors", {
9 | expect_error(vdist_t_prob("0.95", df = 10), "perc must be numeric.")
10 | expect_error(vdist_t_prob(TRUE, df = 10), "perc must be numeric.")
11 | expect_error(vdist_t_prob(0.95, "10"), "df must be numeric.")
12 | expect_error(vdist_t_prob(0.95, TRUE), "df must be numeric.")
13 | })
14 |
15 | test_that("vdist_t_perc throws the appropriate errors", {
16 | expect_error(vdist_t_perc(1.5), "probs must be between 0 and 1 only.")
17 | expect_error(vdist_t_perc("0.95"), "probs must be numeric.")
18 | expect_error(vdist_t_perc(TRUE), "probs must be numeric.")
19 | expect_error(vdist_t_perc(0.95, "10"), "df must be numeric.")
20 | expect_error(vdist_t_perc(0.95, TRUE), "df must be numeric.")
21 | })
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/tests/testthat/test-visual.R:
--------------------------------------------------------------------------------
1 | context("test-visual")
2 |
3 | test_that("output from vdist_binom_plot is as expected", {
4 | skip_on_cran()
5 | p <- vdist_binom_plot(10, 0.3)
6 | vdiffr::expect_doppelganger("binomial plot", p)
7 | })
8 |
9 | test_that("output from vdist_binom_prob is as expected", {
10 | skip_on_cran()
11 |
12 | p1 <- vdist_binom_prob(10, 0.3, 4, type = 'exact')
13 | vdiffr::expect_doppelganger("binomial prob exact", p1)
14 |
15 | p2 <- vdist_binom_prob(10, 0.3, 4, type = 'lower')
16 | vdiffr::expect_doppelganger("binomial prob lower", p2)
17 |
18 | p3 <- vdist_binom_prob(10, 0.3, 4, type = 'upper')
19 | vdiffr::expect_doppelganger("binomial prob upper", p3)
20 |
21 | p4 <- vdist_binom_prob(10, 0.3, c(4, 6), type = 'interval')
22 | vdiffr::expect_doppelganger("binomial prob interval", p4)
23 | })
24 |
25 | test_that("output from vdist_binom_perc is as expected", {
26 | skip_on_cran()
27 |
28 | p5 <- vdist_binom_perc(10, 0.5, 0.05)
29 | vdiffr::expect_doppelganger("binomial perc lower", p5)
30 |
31 | p6 <- vdist_binom_perc(10, 0.5, 0.05, "upper")
32 | vdiffr::expect_doppelganger("binomial perc upper", p6)
33 | })
34 |
35 | test_that("output from vdist_chisquare_plot is as expected", {
36 | skip_on_cran()
37 |
38 | p7 <- vdist_chisquare_plot()
39 | vdiffr::expect_doppelganger("chisquare plot 1", p7)
40 |
41 | p7a <- vdist_chisquare_plot(xaxis_range = 35)
42 | vdiffr::expect_doppelganger("chisquare plot 1a", p7a)
43 |
44 | p8 <- vdist_chisquare_plot(df = 5)
45 | vdiffr::expect_doppelganger("chisquare plot 2", p8)
46 |
47 | p9 <- vdist_chisquare_plot(df = 5, normal = TRUE)
48 | vdiffr::expect_doppelganger("chisquare plot 3", p9)
49 | })
50 |
51 | test_that("output from vdist_chisquare_perc is as expected", {
52 | skip_on_cran()
53 |
54 | p10 <- vdist_chisquare_perc(0.165, 8, 'lower')
55 | vdiffr::expect_doppelganger("chisquare perc lower", p10)
56 |
57 | p11 <- vdist_chisquare_perc(0.22, 13, 'upper')
58 | vdiffr::expect_doppelganger("chisquare perc upper", p11)
59 | })
60 |
61 | test_that("output from vdist_chisquare_prob is as expected", {
62 | skip_on_cran()
63 |
64 | p12 <- vdist_chisquare_prob(13.58, 11, 'lower')
65 | vdiffr::expect_doppelganger("chisquare prob lower", p12)
66 |
67 | p13 <- vdist_chisquare_prob(15.72, 13, 'upper')
68 | vdiffr::expect_doppelganger("chisquare prob upper", p13)
69 | })
70 |
71 | test_that("output from vdist_f_plot is as expected", {
72 | skip_on_cran()
73 |
74 | p14 <- vdist_f_plot()
75 | vdiffr::expect_doppelganger("f plot 1", p14)
76 |
77 | p15 <- vdist_f_plot(6, 10, normal = TRUE)
78 | vdiffr::expect_doppelganger("f plot 2", p15)
79 | })
80 |
81 | test_that("output from vdist_f_perc is as expected", {
82 | skip_on_cran()
83 |
84 | p16 <- vdist_f_perc(0.95, 3, 30, 'lower')
85 | vdiffr::expect_doppelganger("f perc lower", p16)
86 |
87 | p17 <- vdist_f_perc(0.125, 9, 35, 'upper')
88 | vdiffr::expect_doppelganger("f perc upper", p17)
89 | })
90 |
91 | test_that("output from vdist_f_prob is as expected", {
92 | skip_on_cran()
93 |
94 | p18 <- vdist_f_prob(2.35, 5, 32)
95 | vdiffr::expect_doppelganger("f prob lower", p18)
96 |
97 | p19 <- vdist_f_prob(1.5222, 9, 35, type = "upper")
98 | vdiffr::expect_doppelganger("f prob upper", p19)
99 | })
100 |
101 | test_that("output from vdist_normal_plot is as expected", {
102 | skip_on_cran()
103 |
104 | p20 <- vdist_normal_plot()
105 | vdiffr::expect_doppelganger("normal plot 1", p20)
106 |
107 | p21 <- vdist_normal_plot(mean = 2, sd = 0.6)
108 | vdiffr::expect_doppelganger("normal plot 2", p21)
109 | })
110 |
111 | test_that("output from vdist_normal_perc is as expected", {
112 | skip_on_cran()
113 |
114 | p22 <- vdist_normal_perc(0.95, mean = 2, sd = 1.36)
115 | vdiffr::expect_doppelganger("normal perc lower", p22)
116 |
117 | p23 <- vdist_normal_perc(0.95, mean = 2, sd = 1.36, type = 'both')
118 | vdiffr::expect_doppelganger("normal perc both", p23)
119 |
120 | p24 <- vdist_normal_perc(0.3, mean = 2, sd = 1.36, type = 'upper')
121 | vdiffr::expect_doppelganger("normal perc upper", p24)
122 |
123 | })
124 |
125 | test_that("output from vdist_normal_prob is as expected", {
126 | skip_on_cran()
127 |
128 | p25 <- vdist_normal_prob(3.78, mean = 2, sd = 1.36)
129 | vdiffr::expect_doppelganger("normal prob lower", p25)
130 |
131 | p26 <- vdist_normal_prob(3.43, mean = 2, sd = 1.36, type = 'upper')
132 | vdiffr::expect_doppelganger("normal prob upper", p26)
133 |
134 | p27 <- vdist_normal_prob(c(-1.74, 1.83), type = 'both')
135 | vdiffr::expect_doppelganger("normal prob both", p27)
136 | })
137 |
138 | test_that("output from vdist_t_plot is as expected", {
139 | skip_on_cran()
140 |
141 | p28 <- vdist_t_plot()
142 | vdiffr::expect_doppelganger("t plot 1", p28)
143 |
144 | p29 <- vdist_t_plot(6)
145 | vdiffr::expect_doppelganger("t plot 2", p29)
146 |
147 | p30 <- vdist_t_plot(df = 8)
148 | vdiffr::expect_doppelganger("t plot 3", p30)
149 | })
150 |
151 | test_that("output from vdist_t_perc is as expected", {
152 | skip_on_cran()
153 |
154 | p31 <- vdist_t_perc(probs = 0.95, df = 4, type = 'lower')
155 | vdiffr::expect_doppelganger("t perc lower", p31)
156 |
157 | p32 <- vdist_t_perc(probs = 0.35, df = 4, type = 'upper')
158 | vdiffr::expect_doppelganger("t perc upper", p32)
159 |
160 | p33 <- vdist_t_perc(probs = 0.69, df = 7, type = 'both')
161 | vdiffr::expect_doppelganger("t perc both", p33)
162 | })
163 |
164 | test_that("output from vdist_t_prob is as expected", {
165 | skip_on_cran()
166 |
167 | p34 <- vdist_t_prob(2.045, 7, 'lower')
168 | vdiffr::expect_doppelganger("t prob lower", p34)
169 |
170 | p35 <- vdist_t_prob(0.945, 7, 'upper')
171 | vdiffr::expect_doppelganger("t prob upper", p35)
172 |
173 | p36 <- vdist_t_prob(1.445, 7, 'interval')
174 | vdiffr::expect_doppelganger("t prob both", p36)
175 |
176 | p37 <- vdist_t_prob(1.6, 7, 'both')
177 | vdiffr::expect_doppelganger("t prob interval", p37)
178 | })
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
--------------------------------------------------------------------------------
/vignettes/.gitignore:
--------------------------------------------------------------------------------
1 | *.html
2 | *.R
3 |
--------------------------------------------------------------------------------
/vignettes/introduction-to-vistributions.Rmd:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Exploring Distributions"
3 | output: rmarkdown::html_vignette
4 | vignette: >
5 | %\VignetteIndexEntry{Exploring Distributions}
6 | %\VignetteEngine{knitr::rmarkdown}
7 | %\VignetteEncoding{UTF-8}
8 | ---
9 |
10 | ```{r, echo=FALSE, message=FALSE}
11 | library(vistributions)
12 | ```
13 |
14 | In exploring statistical distributions, we focus on the following:
15 |
16 | - what influences the shape of a distribution
17 | - calculate probability from a given quantile
18 | - calculate quantiles out of given probability
19 |
20 | To explore the above 3 concepts, we have defined functions for the following
21 | distributions:
22 |
23 | - Normal
24 | - Binomial
25 | - Chi Square
26 | - F
27 | - t
28 |
29 | ## Normal Distribution
30 |
31 | ### Distribution Shape
32 |
33 | Visualize how changes in mean and standard deviation affect the shape of the
34 | normal distribution.
35 |
36 | ##### Input
37 | - mean: mean of the normal distribution
38 | - sd: standard deviation of the normal distribution
39 |
40 | ##### Output
41 | - Normal distribution plot
42 |
43 | ```{r norm_plot, fig.width=7, fig.height=7, fig.align='centre'}
44 | vdist_normal_plot(mean = 2, sd = 0.6)
45 | ```
46 |
47 | ### Percentiles
48 |
49 | #### Calculate and visualize quantiles out of given probability.
50 |
51 | ##### Input
52 | - probs: a probability value
53 | - mean: mean of the normal distribution
54 | - sd: standard deviation of the normal distribution
55 | - type: lower/upper tail
56 |
57 | Suppose X, the grade on a exam, is normally distributed with mean 60
58 | and standard deviation 3. The teacher wants to give 10% of the class an A.
59 | What should be the cutoff to determine who gets an A?
60 |
61 | ```{r norm_per1, fig.width=7, fig.height=7, fig.align='centre'}
62 | vdist_normal_perc(0.10, 60, 3, 'upper')
63 | ```
64 |
65 | The teacher wants to give lower 15% of the class a D. What cutoff should the
66 | teacher use to determine who gets an D?
67 |
68 | ```{r norm_per2, fig.width=7, fig.height=7, fig.align='centre'}
69 | vdist_normal_perc(0.85, 60, 3, 'lower')
70 | ```
71 |
72 | The teacher wants to give middle 50% of the class a B. What cutoff should the
73 | teacher use to determine who gets an B?
74 |
75 | ```{r norm_per3, fig.width=7, fig.height=7, fig.align='centre'}
76 | vdist_normal_perc(0.5, 60, 3, 'both')
77 | ```
78 |
79 | ### Probabilities
80 |
81 | #### Calculate and visualize probability from a given quantile
82 |
83 | ##### Input
84 | - perc: a quantile value
85 | - mean: mean of the normal distribution
86 | - sd: standard deviation of the normal distribution
87 | - type: lower/upper/both tail
88 |
89 | Let X be the IQ of a randomly selected student of a school. Assume X ~ N(90, 4).
90 | What is the probability that a randomly selected student has an IQ below 80?
91 |
92 | ```{r norm_prob1, fig.width=7, fig.height=7, fig.align='centre'}
93 | vdist_normal_prob(80, mean = 90, sd = 4)
94 | ```
95 |
96 | What is the probability that a randomly selected student has an IQ above 100?
97 |
98 | ```{r norm_prob2, fig.width=7, fig.height=7, fig.align='centre'}
99 | vdist_normal_prob(100, mean = 90, sd = 4, type = 'upper')
100 | ```
101 |
102 | What is the probability that a randomly selected student has an IQ
103 | between 85 and 100?
104 |
105 | ```{r norm_prob3, fig.width=7, fig.height=7, fig.align='centre'}
106 | vdist_normal_prob(c(85, 100), mean = 90, sd = 4, type = 'both')
107 | ```
108 |
109 | ## Binomial Distribution
110 |
111 | ### Distribution Shape
112 |
113 | Visualize how changes in number of trials and the probability of success affect
114 | the shape of the binomial distribution.
115 |
116 | ```{r binom_plot, fig.width=7, fig.height=7, fig.align='centre'}
117 | vdist_binom_plot(10, 0.3)
118 | ```
119 |
120 | ### Percentiles
121 |
122 | #### Calculate and visualize quantiles out of given probability
123 |
124 | ##### Input
125 | - p: a single aggregated probability of multiple trials
126 | - n: the number of trials
127 | - tp: the probability of success in a trial
128 | - type: lower/upper tail
129 |
130 |
131 | ```{r binom_per1, fig.width=7, fig.height=7, fig.align='centre'}
132 | vdist_binom_perc(10, 0.5, 0.05)
133 | ```
134 |
135 | ```{r binom_per2, fig.width=7, fig.height=7, fig.align='centre'}
136 | vdist_binom_perc(10, 0.5, 0.05, 'upper')
137 | ```
138 |
139 | ### Probabilities
140 |
141 | #### Calculate and visualize probability from a given quantile
142 |
143 | ##### Input
144 | - p: probability of success
145 | - n: the number of trials
146 | - s: number of success in a trial
147 | - type: lower/upper/interval/exact tail
148 |
149 |
150 | Assume twenty-percent (20%) of Magemill have no health insurance. Randomly
151 | sample n = 12 Magemillians. Let X denote the number in the sample with no
152 | health insurance. What is the probability that exactly 4 of the 15 sampled
153 | have no health insurance?
154 |
155 | ```{r binom_prob1, fig.width=7, fig.height=7, fig.align='centre'}
156 | vdist_binom_prob(12, 0.2, 4, type = 'exact')
157 | ```
158 |
159 | What is the probability that at most one of those sampled has no health
160 | insurance?
161 |
162 | ```{r binom_prob2, fig.width=7, fig.height=7, fig.align='centre'}
163 | vdist_binom_prob(12, 0.2, 1, 'lower')
164 | ```
165 |
166 | What is the probability that more than seven have no health insurance?
167 |
168 | ```{r binom_prob3, fig.width=7, fig.height=7, fig.align='centre'}
169 | vdist_binom_prob(12, 0.2, 8, 'upper')
170 | ```
171 |
172 | What is the probability that fewer than 5 have no health insurance?
173 |
174 | ```{r binom_prob4, fig.width=7, fig.height=7, fig.align='centre'}
175 | vdist_binom_prob(12, 0.2, c(0, 4), 'interval')
176 | ```
177 |
178 |
179 | ## Chi Square Distribution
180 |
181 | ### Distribution Shape
182 |
183 | Visualize how changes in degrees of freedom affect the shape of the chi square
184 | distribution.
185 |
186 | ```{r chi_plot, fig.width=7, fig.height=7, fig.align='centre'}
187 | vdist_chisquare_plot(df = 5)
188 | vdist_chisquare_plot(df = 5, normal = TRUE)
189 | ```
190 |
191 | ### Percentiles
192 |
193 | #### Calculate quantiles out of given probability
194 |
195 | ##### Input
196 | - probs: a probability value
197 | - df: degrees of freedom
198 | - type: lower/upper tail
199 |
200 | Let X be a chi-square random variable with 8 degrees of freedom. What is the
201 | upper fifth percentile?
202 |
203 | ```{r chi_per1, fig.width=7, fig.height=7, fig.align='centre'}
204 | vdist_chisquare_perc(0.05, 8, 'upper')
205 | ```
206 |
207 | What is the tenth percentile?
208 |
209 | ```{r chi_per2, fig.width=7, fig.height=7, fig.align='centre'}
210 | vdist_chisquare_perc(0.10, 8, 'lower')
211 | ```
212 |
213 | ### Probability
214 |
215 | #### Calculate probability from a given quantile.
216 |
217 | ##### Input
218 | - perc: a quantile value
219 | - df: degrees of freedom
220 | - type: lower/upper tail
221 |
222 |
223 | What is the probability that a chi-square random variable with 12 degrees of
224 | freedom is greater than 8.79?
225 |
226 | ```{r chi_prob1, fig.width=7, fig.height=7, fig.align='centre'}
227 | vdist_chisquare_prob(8.79, 12, 'upper')
228 | ```
229 |
230 | What is the probability that a chi-square random variable with 12 degrees of
231 | freedom is greater than 8.62?
232 |
233 | ```{r chi_prob2, fig.width=7, fig.height=7, fig.align='centre'}
234 | vdist_chisquare_prob(8.62, 12, 'lower')
235 | ```
236 |
237 | ## F Distribution
238 |
239 | ### Distribution Shape
240 |
241 | Visualize how changes in degrees of freedom affect the shape of the F
242 | distribution.
243 |
244 | ```{r f_plot, fig.width=7, fig.height=7, fig.align='centre'}
245 | vdist_f_plot()
246 | vdist_f_plot(6, 10, normal = TRUE)
247 | ```
248 |
249 | ### Percentiles
250 |
251 | #### Calculate quantiles out of given probability
252 |
253 | ##### Input
254 | - probs: a probability value
255 | - num_df: nmerator degrees of freedom
256 | - den_df: denominator degrees of freedom
257 | - type: lower/upper tail
258 |
259 |
260 | Let X be an F random variable with 4 numerator degrees of freedom and 5
261 | denominator degrees of freedom. What is the upper twenth percentile?
262 |
263 | ```{r f_per1, fig.width=7, fig.height=7, fig.align='centre'}
264 | vdist_f_perc(0.20, 4, 5, 'upper')
265 | ```
266 |
267 | What is the 35th percentile?
268 |
269 | ```{r f_per2, fig.width=7, fig.height=7, fig.align='centre'}
270 | vdist_f_perc(0.35, 4, 5, 'lower')
271 | ```
272 |
273 | ### Probabilities
274 |
275 | #### Calculate probability from a given quantile.
276 |
277 | ##### Input
278 | - perc: a quantile value
279 | - num_df: nmerator degrees of freedom
280 | - den_df: denominator degrees of freedom
281 | - type: lower/upper tail
282 |
283 |
284 | What is the probability that an F random variable with 4 numerator degrees of
285 | freedom and 5 denominator degrees of freedom is greater than 3.89?
286 |
287 | ```{r f_prob1, fig.width=7, fig.height=7, fig.align='centre'}
288 | vdist_f_prob(3.89, 4, 5, 'upper')
289 | ```
290 |
291 | What is the probability that an F random variable with 4 numerator degrees of
292 | freedom and 5 denominator degrees of freedom is less than 2.63?
293 |
294 | ```{r f_prob2, fig.width=7, fig.height=7, fig.align='centre'}
295 | vdist_f_prob(2.63, 4, 5, 'lower')
296 | ```
297 |
298 |
299 | ## t Distribution
300 |
301 | ### Distribution Shape
302 |
303 | Visualize how degrees of freedom affect the shape of t distribution.
304 |
305 | ```{r t_plot, fig.width=7, fig.height=7, fig.align='centre'}
306 | vdist_t_plot(df = 8)
307 | ```
308 |
309 | ### Percentiles
310 |
311 | #### Calculate quantiles out of given probability
312 |
313 | ##### Input
314 | - probs: a probability value
315 | - df: degrees of freedom
316 | - type: lower/upper/both tail
317 |
318 |
319 | What is the upper fifteenth percentile?
320 |
321 | ```{r t_per1, fig.width=7, fig.height=7, fig.align='centre'}
322 | vdist_t_perc(0.15, 8, 'upper')
323 | ```
324 |
325 | What is the eleventh percentile?
326 |
327 | ```{r t_per2, fig.width=7, fig.height=7, fig.align='centre'}
328 | vdist_t_perc(0.11, 8, 'lower')
329 | ```
330 |
331 | What is the area of the curve that has 95% of the t values?
332 |
333 | ```{r t_per3, fig.width=7, fig.height=7, fig.align='centre'}
334 | vdist_t_perc(0.8, 8, 'both')
335 | ```
336 |
337 |
338 | ### Probabilities
339 |
340 | #### Calculate probability from a given quantile.
341 |
342 | ##### Input
343 | - perc: a quantile value
344 | - df: degrees of freedom
345 | - type: lower/upper/interval/both tail
346 |
347 |
348 | Let T follow a t-distribution with r = 6 df.
349 |
350 | What is the probability that the value of T is less than 2?
351 |
352 | ```{r t_prob1, fig.width=7, fig.height=7, fig.align='centre'}
353 | vdist_t_prob(2, 6, 'lower')
354 | ```
355 |
356 | What is the probability that the value of T is greater than 2?
357 |
358 | ```{r t_prob2, fig.width=7, fig.height=7, fig.align='centre'}
359 | vdist_t_prob(2, 6, 'upper')
360 | ```
361 |
362 | What is the probability that the value of T is between -2 and 2?
363 |
364 | ```{r t_prob3, fig.width=7, fig.height=7, fig.align='centre'}
365 | vdist_t_prob(2, 6, 'both')
366 | ```
367 |
368 | What is the probability that the absolute value of T is greater than 2?
369 |
370 | ```{r t_prob4, fig.width=7, fig.height=7, fig.align='centre'}
371 | vdist_t_prob(2, 6, 'interval')
372 | ```
373 |
--------------------------------------------------------------------------------
/vistributions.Rproj:
--------------------------------------------------------------------------------
1 | Version: 1.0
2 |
3 | RestoreWorkspace: Default
4 | SaveWorkspace: Default
5 | AlwaysSaveHistory: Default
6 |
7 | EnableCodeIndexing: Yes
8 | UseSpacesForTab: Yes
9 | NumSpacesForTab: 2
10 | Encoding: UTF-8
11 |
12 | RnwWeave: Sweave
13 | LaTeX: pdfLaTeX
14 |
15 | AutoAppendNewline: Yes
16 | StripTrailingWhitespace: Yes
17 |
18 | BuildType: Package
19 | PackageUseDevtools: Yes
20 | PackageInstallArgs: --no-multiarch --with-keep.source
21 |
--------------------------------------------------------------------------------