diff --git a/.Rbuildignore b/.Rbuildignore index adb0224..f9ce042 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,3 +6,7 @@ ^cran-comments\.md$ ^\.travis\.yml$ ^CRAN-RELEASE$ +^\.github$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..a3ac618 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,49 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..ed7650c --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,48 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: + +name: pkgdown + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.4.1 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index 8a9e9c0..5192a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ *-Ex.R .Rproj.user CRAN-RELEASE +docs diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index eba8c65..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r - -language: R -cache: packages diff --git a/DESCRIPTION b/DESCRIPTION index aba8663..f1b83e9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: visualize Type: Package Title: Graph Probability Distributions with User Supplied Parameters and Statistics -Version: 4.4.0 -Depends: R (>= 3.0.0) +Version: 4.5.0 +Depends: R (>= 4.0.0) Authors@R: c( person("James", "Balamuta", role = c("aut", "cph", "cre"), @@ -16,8 +16,8 @@ Description: Graphs the pdf or pmf and highlights what area or probability is to inequalities. Also provided on the graph is the mean and variance of the distribution. License: MIT + file LICENSE -URL: https://github.com/coatless/visualize, http://thecoatlessprofessor.com/projects/visualize/ -BugReports: https://github.com/coatless/visualize/issues +URL: https://github.com/coatless-rpkg/visualize, https://thecoatlessprofessor.com/projects/visualize/, https://r-pkg.thecoatlessprofessor.com/visualize/ +BugReports: https://github.com/coatless-rpkg/visualize/issues Encoding: UTF-8 -RoxygenNote: 6.1.1 +RoxygenNote: 7.2.3 Roxygen: list(markdown = TRUE) diff --git a/NEWS.md b/NEWS.md index b9587ec..a87fde1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,12 @@ +# visualize 4.5.0 - Hotfix - "Seeing is Greek" + +## CHANGES + +- Removed unicode to display variables and inequalities per CRAN request. +- Increased the required R version to v4.0.0. +- Switched deployment from Travis to GitHub Actions +- Added a pkgdown website. + # visualize 4.4.0 - Hotfix - "Seeing is Refreshing" ## CHANGES diff --git a/R/sysdata.rda b/R/sysdata.rda index cbbe66d..157e272 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/R/visualize-distributions.R b/R/visualize-distributions.R index b223c5e..befd8ee 100644 --- a/R/visualize-distributions.R +++ b/R/visualize-distributions.R @@ -4,7 +4,6 @@ #' and quantile functions. In addition, mean and variance functions are #' present. Other descriptors also exist and are documented below. #' -#' #' @format #' Distributions are loaded with the following format: #' \tabular{ll}{ @@ -57,7 +56,6 @@ #' @author James Balamuta #' @keywords datasets internal #' @examples -#' #' visualize.distributions = list( #' 'beta' = list( #' type = "continuous", diff --git a/R/visualize.continuous.R b/R/visualize.continuous.R index 55cd107..b62b01b 100644 --- a/R/visualize.continuous.R +++ b/R/visualize.continuous.R @@ -1,36 +1,30 @@ #' Graphing function for Continuous Distributions. #' #' Handles how continuous distributions are graphed. Users should not use this -#' function. Instead, users should use [visualize.it()]. +#' function. Instead, users should use [`visualize.it()`]. #' -#' -#' @param dist contains the distribution from -#' [visualize.distributions()]. -#' @param stat a statistic to obtain the probability from. When using the -#' "bounded" condition, you must supply the parameter as `stat = -#' c(lower_bound, upper_bound)`. Otherwise, a simple `stat = -#' desired_point` will suffice. +#' @param dist contains a supported continuos distribution shortname. +#' @param stat a statistic to obtain the probability from. When using the +#' "bounded" condition, you must supply the parameter as +#' `stat = c(lower_bound, upper_bound)`. Otherwise, a simple +#' `stat = desired_point` will suffice. #' @param params A list that must contain the necessary parameters for each -#' distribution. For example, `params = list(mu = 1, sd = 1)` would be for -#' a normal distribution with mean 1 and standard deviation 1. If you are not -#' aware of the parameters for the distribution, consider using the -#' `visualize.`*dist_name* functions listed under the "See Also" -#' section. +#' distribution. For example, `params = list(mu = 1, sd = 1)` +#' would be for a normal distribution with mean 1 and standard +#' deviation 1. If you are not aware of the parameters for the +#' distribution, consider using the `visualize.`*dist_name* +#' functions listed under the "See Also" section. #' @param section Select how you want the statistic(s) evaluated via -#' `section=` either `"lower"`,`"bounded"`, `"upper"`, -#' or`"tails"`. -#' @author James Balamuta -#' @seealso [visualize.it()], [visualize.beta()], -#' [visualize.chisq()], [visualize.exp()], -#' [visualize.gamma()], [visualize.norm()], -#' [visualize.unif()], [visualize.cauchy()]\*, -#' [visualize.f()]\*, [visualize.lnorm()]\*, -#' [visualize.t()]\*, [visualize.wilcox()]\*, -#' [visualize.logis()]\*. \cr \* = added in v2.0. +#' `section=` either `"lower"`,`"bounded"`, `"upper"`, or`"tails"` +#' @author +#' James Balamuta +#' @seealso +#' [visualize.it()], [visualize.beta()], [visualize.chisq()], [visualize.exp()], +#' [visualize.gamma()], [visualize.norm()], [visualize.unif()], [visualize.cauchy()], +#' [visualize.f()], [visualize.lnorm()], [visualize.t()], [visualize.wilcox()], +#' [visualize.logis()]. #' @export -#' @keywords visualize #' @examples -#' #' # Function does not have dist look up, must go through visualize.it #' visualize.it(dist='norm', stat = c(0,1), params = list(mu = 1, sd = 1), section = "bounded") #' @@ -79,7 +73,7 @@ function(dist, stat = c(0,1), params, section = "lower"){ #Creates the center title by concatenating various bits of information. #This may need to be optimized at a later time. graphmain = paste(dist$name," \n") - for(i in 1:length(params)){ + for(i in seq_along(params)){ graphmain = paste(graphmain, dist$varsymbols[i]," = ",params[[i]], " ") } @@ -100,7 +94,7 @@ function(dist, stat = c(0,1), params, section = "lower"){ c(0,dist$density(path,params),0), col="Blue", lty=line_style, lwd=line_width, border="Orange") prob = dist$probability(stat,params) - subheader = paste("P( ",dist$variable," \u2264 ",stat, ") = ", signif(prob, digits=3)) + subheader = paste("P( ",dist$variable," <= ",stat, ") = ", signif(prob, digits=3)) } else if(section == "bounded"){ start = stat[[1]]; end = stat[[2]]; @@ -109,7 +103,7 @@ function(dist, stat = c(0,1), params, section = "lower"){ c(0,dist$density(path,params),0), col="Blue", lty=line_style, lwd=line_width, border="Orange"); prob = dist$probability(end,params) - dist$probability(start,params) - subheader = paste("P(",start," \u2264 ",dist$variable," \u2264 ",end,") =", signif(prob, digits=3)) + subheader = paste("P(",start," <= ",dist$variable," <= ",end,") =", signif(prob, digits=3)) } else if(section == "upper"){ if(ub < stat){ @@ -120,7 +114,7 @@ function(dist, stat = c(0,1), params, section = "lower"){ c(0,dist$density(path,params),0), col="Blue", lty=line_style, lwd=line_width, border="Orange") prob = 1-dist$probability(stat,params) - subheader = paste("P( ",dist$variable," \u2265 ", stat, " ) =", signif(prob, digits=3)) + subheader = paste("P( ",dist$variable," >= ", stat, " ) =", signif(prob, digits=3)) } else if(section == "tails"){ lower_stat = stat[[1]];upper_stat=stat[[2]]; @@ -166,5 +160,5 @@ function(dist, stat = c(0,1), params, section = "lower"){ axis(1,at=stat[[2]],labels=bquote(eta[.(stat[[2]])]), line=.69) } mtext(subheader,3) - title(sub = paste("\u03BC = ", mean,", \u03C3\u00B2 = ", var)) + title(sub = bquote(mu ~ "=" ~ .(mean) ~ ", " ~ sigma^2 ~ "=" ~ .(var))) } diff --git a/R/visualize.discrete.R b/R/visualize.discrete.R index 627ceb2..5868918 100644 --- a/R/visualize.discrete.R +++ b/R/visualize.discrete.R @@ -53,7 +53,7 @@ function(dist, stat = c(0,1), params, section = "lower", strict){ #Creates Graph Title graphmain = paste(dist$name," \n") - for(i in 1:length(params)){ + for(i in seq_along(params)){ graphmain = paste(graphmain, dist$varsymbols[i]," = ",params[[i]], " ") } @@ -70,7 +70,7 @@ function(dist, stat = c(0,1), params, section = "lower", strict){ barplot(y, ylim = c(0, ymax), xlab = "Values", ylab = "Probability", names.arg = x, main=graphmain, col=c(rep("orange",i),rep("white",j)), density=c(rep(3,i),rep(0,j)), add = TRUE) prob = dist$probability(stat-1*(strict[[1]] == 1),params) - ineqsym = if(strict[[1]]==0){" \u2264 "}else{" < "} + ineqsym = if(strict[[1]]==0){" <= "}else{" < "} subheader = paste("P( ",dist$variable, ineqsym ,stat, ") = ", signif(prob, digits=3)) } else if(section == "bounded"){ @@ -105,8 +105,8 @@ function(dist, stat = c(0,1), params, section = "lower", strict){ #Generate subtitle prob = dist$probability(disupper-1*(strict[[2]]==1),params) - dist$probability(dislower-1*(strict[[1]]==0),params) if(prob < 0) {prob = 0} - low_ineq = if(strict[[1]]==0){" \u2264 "}else{" < "} - upper_ineq = if(strict[[2]]==0){" \u2264 "}else{" < "} + low_ineq = if(strict[[1]]==0){" <= "}else{" < "} + upper_ineq = if(strict[[2]]==0){" <= "}else{" < "} subheader = paste("P(",dislower,low_ineq,dist$variable,upper_ineq,disupper,") =", signif(prob, digits=3)) } else if(section == "upper"){ @@ -160,8 +160,8 @@ function(dist, stat = c(0,1), params, section = "lower", strict){ #handle legend information prob = 1-dist$probability(upper_stat-1*(!upper_strict),params)+dist$probability(lower_stat-1*(lower_strict),params) - upper_ineqsym = if(!upper_strict){" \u2265 "}else{" > "} - lower_ineqsym = if(!lower_strict){" \u2264 "}else{" < "} + upper_ineqsym = if(!upper_strict){" >= "}else{" > "} + lower_ineqsym = if(!lower_strict){" <= "}else{" < "} subheader = paste("P( ",dist$variable, lower_ineqsym ,lower_stat, " ) + P( ",dist$variable, upper_ineqsym, upper_stat, " ) =", signif(prob, digits=3)) } else{ stop("Section not specified. Please choose either lower, bounded, tails, or upper.") } @@ -175,5 +175,5 @@ function(dist, stat = c(0,1), params, section = "lower", strict){ } mtext(subheader,3) - title(sub = paste("\u03BC = ", signif(mean, digits=3),", \u03C3\u00B2 = ",signif(var, digits=3))) + title(sub = bquote(mu ~ "=" ~ .(signif(mean, digits=3)) ~ ", " ~ sigma^2 ~ "=" ~ .(signif(var, digits=3))) ) } diff --git a/README.Rmd b/README.Rmd index f294296..da944d6 100644 --- a/README.Rmd +++ b/README.Rmd @@ -16,7 +16,7 @@ knitr::opts_chunk$set( # visualize -[![Travis-CI Build Status](https://travis-ci.org/coatless/visualize.svg?branch=master)](https://travis-ci.org/coatless/visualize) +[![R-CMD-check](https://github.com/coatless-rpkg/visualize/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/coatless-rpkg/visualize/actions/workflows/R-CMD-check.yaml) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/visualize)](http://www.r-pkg.org/pkg/visualize) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/visualize)](https://cran.r-project.org/package=visualize) diff --git a/README.md b/README.md index 0023964..dc02810 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,10 @@ -[![Travis-CI Build -Status](https://travis-ci.org/coatless/visualize.svg?branch=master)](https://travis-ci.org/coatless/visualize) +[![R-CMD-check](https://github.com/coatless-rpkg/visualize/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/coatless-rpkg/visualize/actions/workflows/R-CMD-check.yaml) [![CRAN RStudio mirror -downloads](http://cranlogs.r-pkg.org/badges/visualize)](http://www.r-pkg.org/pkg/visualize)[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/visualize)](https://cran.r-project.org/package=visualize) +downloads](http://cranlogs.r-pkg.org/badges/visualize)](http://www.r-pkg.org/pkg/visualize) +[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/visualize)](https://cran.r-project.org/package=visualize) The goal of visualize is to graph the pdf or pmf and highlight what area diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..7411573 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: http://r-pkg.thecoatlessprofessor.com/visualize/ +template: + bootstrap: 5 + diff --git a/data-raw/visualize.distributions.R b/data-raw/visualize.distributions.R index b94294f..1bee73f 100644 --- a/data-raw/visualize.distributions.R +++ b/data-raw/visualize.distributions.R @@ -7,7 +7,7 @@ visualize.distributions = list( type = "continuous", name = "Beta Distribution", variable = "b", - varsymbols = c("\u03B1","\u03B2"), + varsymbols = c("alpha","beta"), params = 2, init = function(params, ...) { shape1 = params[[1]]; shape2 = params[[2]] @@ -32,7 +32,7 @@ visualize.distributions = list( chisq = list( type = "continuous", name = "Chi-square Distribution", - variable = "\u03A7\u00B2", + variable = "chi^2", varsymbols = c("r"), params = 1, init = function(params, ...) { @@ -60,7 +60,7 @@ visualize.distributions = list( type = "continuous", name = "Exponential Distribution", variable = "e", - varsymbols = c("\u03B8"), + varsymbols = c("theta"), params = 1, init = function(params, ...) { theta = params[[1]] @@ -87,7 +87,7 @@ visualize.distributions = list( type = "continuous", name = "Gamma Distribution", variable = "g", - varsymbols = c("\u03B1","\u03B8"), + varsymbols = c("alpha","theta"), params = 2, init = function(params, ...) { alpha = params[[1]]; theta = params[[2]] @@ -114,7 +114,7 @@ visualize.distributions = list( type = "continuous", name = "Normal Distribution", variable = "z", - varsymbols = c("\u03BC","\u03C3"), + varsymbols = c("mu","sigma"), params = 2, init = function(params, ...) { if(params[[2]] < 0) stop("Error: Need standard deviation >= 0") @@ -190,7 +190,7 @@ visualize.distributions = list( type = "continuous", name = "Log Normal Distribution", variable = "log(z)", - varsymbols = c("\u03BC","\u03C3"), + varsymbols = c("mu","sigma"), params = 2, init = function(params, ...) { if(params[[2]]<0) stop("Error: Standard Deviation is < 0!") @@ -433,7 +433,7 @@ visualize.distributions = list( type = "discrete", name = "Poisson Distribution", variable = "p", - varsymbols = c("\u03BB"), + varsymbols = c("lambda"), params = 1, init = function(params, ...) { lambda = params[[1]] @@ -463,4 +463,4 @@ class(visualize.distributions) = "distributions" # use sysdata -devtools::use_data(visualize.distributions, internal = TRUE, overwrite = TRUE) +usethis::use_data(visualize.distributions, internal = TRUE, overwrite = TRUE) diff --git a/man/visualize-package.Rd b/man/visualize-package.Rd index 1eec404..e7da309 100644 --- a/man/visualize-package.Rd +++ b/man/visualize-package.Rd @@ -6,11 +6,7 @@ \alias{visualize-package} \title{visualize: Graph Probability Distributions with User Supplied Parameters and Statistics} \description{ -Graphs the pdf or pmf and highlights what area or probability is - present in user defined locations. Visualize is able to provide lower tail, - bounded, upper tail, and two tail calculations. Supports strict and equal - to inequalities. Also provided on the graph is the mean and variance of - the distribution. +Graphs the pdf or pmf and highlights what area or probability is present in user defined locations. Visualize is able to provide lower tail, bounded, upper tail, and two tail calculations. Supports strict and equal to inequalities. Also provided on the graph is the mean and variance of the distribution. } \examples{ @@ -34,13 +30,14 @@ visualize.gamma(stat = 2, alpha = 2, theta = 1, section="upper") \seealso{ Useful links: \itemize{ - \item \url{https://github.com/coatless/visualize} - \item \url{http://thecoatlessprofessor.com/projects/visualize/} - \item Report bugs at \url{https://github.com/coatless/visualize/issues} + \item \url{https://github.com/coatless-rpkg/visualize} + \item \url{https://thecoatlessprofessor.com/projects/visualize/} + \item \url{https://r-pkg.thecoatlessprofessor.com/visualize/} + \item Report bugs at \url{https://github.com/coatless-rpkg/visualize/issues} } } \author{ -\strong{Maintainer}: James Balamuta \email{james.balamuta@gmail.com} (0000-0003-2826-8458) [copyright holder] +\strong{Maintainer}: James Balamuta \email{james.balamuta@gmail.com} (\href{https://orcid.org/0000-0003-2826-8458}{ORCID}) [copyright holder] } diff --git a/man/visualize.beta.Rd b/man/visualize.beta.Rd index cc57ff8..4a97d6c 100644 --- a/man/visualize.beta.Rd +++ b/man/visualize.beta.Rd @@ -18,7 +18,7 @@ implementation of the beta distribution. \code{alpha} must be greater than implementation of the beta distribution. \code{beta} must be greater than 0.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \value{ diff --git a/man/visualize.binom.Rd b/man/visualize.binom.Rd index 7f25082..6dc05d9 100644 --- a/man/visualize.binom.Rd +++ b/man/visualize.binom.Rd @@ -4,8 +4,13 @@ \alias{visualize.binom} \title{Visualize Binomial Distribution} \usage{ -visualize.binom(stat = 1, size = 3, prob = 0.5, section = "lower", - strict = FALSE) +visualize.binom( + stat = 1, + size = 3, + prob = 0.5, + section = "lower", + strict = FALSE +) } \arguments{ \item{stat}{a statistic to obtain the probability from. When using the @@ -16,11 +21,11 @@ visualize.binom(stat = 1, size = 3, prob = 0.5, section = "lower", \item{prob}{probability of picking object.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} \item{strict}{Determines whether the probability will be generated as a -strict (<, >) or equal to (<=, >=) inequality. \code{strict=} requires +strict (<, >) or equal to (<=, >=) inequality. \verb{strict=} requires either values = 0 or =FALSE for equal to OR values =1 or =TRUE for strict. For bounded condition use: \code{strict=c(0,1)} or \code{strict=c(FALSE,TRUE)}.} diff --git a/man/visualize.cauchy.Rd b/man/visualize.cauchy.Rd index 0d965de..2a6d375 100644 --- a/man/visualize.cauchy.Rd +++ b/man/visualize.cauchy.Rd @@ -4,8 +4,7 @@ \alias{visualize.cauchy} \title{Visualize Cauchy Distribution} \usage{ -visualize.cauchy(stat = 1, location = 2, scale = 1, - section = "lower") +visualize.cauchy(stat = 1, location = 2, scale = 1, section = "lower") } \arguments{ \item{stat}{a statistic to obtain the probability from. When using the @@ -16,7 +15,7 @@ visualize.cauchy(stat = 1, location = 2, scale = 1, \item{scale}{scale parameter} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \value{ diff --git a/man/visualize.chisq.Rd b/man/visualize.chisq.Rd index cb8b678..e3f8bad 100644 --- a/man/visualize.chisq.Rd +++ b/man/visualize.chisq.Rd @@ -13,7 +13,7 @@ visualize.chisq(stat = 1, df = 3, section = "lower") \item{df}{degrees of freedom of Chi-squared distribution.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \value{ diff --git a/man/visualize.continuous.Rd b/man/visualize.continuous.Rd index c073925..b4d6e26 100644 --- a/man/visualize.continuous.Rd +++ b/man/visualize.continuous.Rd @@ -7,43 +7,38 @@ visualize.continuous(dist, stat = c(0, 1), params, section = "lower") } \arguments{ -\item{dist}{contains the distribution from -\code{\link[=visualize.distributions]{visualize.distributions()}}.} +\item{dist}{contains a supported continuos distribution shortname.} \item{stat}{a statistic to obtain the probability from. When using the -"bounded" condition, you must supply the parameter as \code{stat = c(lower_bound, upper_bound)}. Otherwise, a simple \code{stat = desired_point} will suffice.} +"bounded" condition, you must supply the parameter as +\code{stat = c(lower_bound, upper_bound)}. Otherwise, a simple +\code{stat = desired_point} will suffice.} \item{params}{A list that must contain the necessary parameters for each -distribution. For example, \code{params = list(mu = 1, sd = 1)} would be for -a normal distribution with mean 1 and standard deviation 1. If you are not -aware of the parameters for the distribution, consider using the -\code{visualize.}\emph{dist_name} functions listed under the "See Also" -section.} +distribution. For example, \code{params = list(mu = 1, sd = 1)} +would be for a normal distribution with mean 1 and standard +deviation 1. If you are not aware of the parameters for the +distribution, consider using the \code{visualize.}\emph{dist_name} +functions listed under the "See Also" section.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, -or\code{"tails"}.} +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}} } \description{ Handles how continuous distributions are graphed. Users should not use this function. Instead, users should use \code{\link[=visualize.it]{visualize.it()}}. } \examples{ - # Function does not have dist look up, must go through visualize.it visualize.it(dist='norm', stat = c(0,1), params = list(mu = 1, sd = 1), section = "bounded") } \seealso{ -\code{\link[=visualize.it]{visualize.it()}}, \code{\link[=visualize.beta]{visualize.beta()}}, -\code{\link[=visualize.chisq]{visualize.chisq()}}, \code{\link[=visualize.exp]{visualize.exp()}}, -\code{\link[=visualize.gamma]{visualize.gamma()}}, \code{\link[=visualize.norm]{visualize.norm()}}, -\code{\link[=visualize.unif]{visualize.unif()}}, \code{\link[=visualize.cauchy]{visualize.cauchy()}}*, -\code{\link[=visualize.f]{visualize.f()}}*, \code{\link[=visualize.lnorm]{visualize.lnorm()}}*, -\code{\link[=visualize.t]{visualize.t()}}*, \code{\link[=visualize.wilcox]{visualize.wilcox()}}*, -\code{\link[=visualize.logis]{visualize.logis()}}*. \cr * = added in v2.0. +\code{\link[=visualize.it]{visualize.it()}}, \code{\link[=visualize.beta]{visualize.beta()}}, \code{\link[=visualize.chisq]{visualize.chisq()}}, \code{\link[=visualize.exp]{visualize.exp()}}, +\code{\link[=visualize.gamma]{visualize.gamma()}}, \code{\link[=visualize.norm]{visualize.norm()}}, \code{\link[=visualize.unif]{visualize.unif()}}, \code{\link[=visualize.cauchy]{visualize.cauchy()}}, +\code{\link[=visualize.f]{visualize.f()}}, \code{\link[=visualize.lnorm]{visualize.lnorm()}}, \code{\link[=visualize.t]{visualize.t()}}, \code{\link[=visualize.wilcox]{visualize.wilcox()}}, +\code{\link[=visualize.logis]{visualize.logis()}}. } \author{ James Balamuta } -\keyword{visualize} diff --git a/man/visualize.discrete.Rd b/man/visualize.discrete.Rd index d207d4c..9d2a2e0 100644 --- a/man/visualize.discrete.Rd +++ b/man/visualize.discrete.Rd @@ -4,8 +4,7 @@ \alias{visualize.discrete} \title{Graphing function for Discrete Distributions.} \usage{ -visualize.discrete(dist, stat = c(0, 1), params, section = "lower", - strict) +visualize.discrete(dist, stat = c(0, 1), params, section = "lower", strict) } \arguments{ \item{dist}{contains the distribution from @@ -22,11 +21,11 @@ aware of the parameters for the distribution, consider using the section.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} \item{strict}{Determines whether the probability will be generated as a -strict (<, >) or equal to (<=, >=) inequality. \code{strict=} requires +strict (<, >) or equal to (<=, >=) inequality. \verb{strict=} requires either values = 0 or =FALSE for equal to OR values =1 or =TRUE for strict. For bounded condition use: \code{strict=c(0,1)} or \code{strict=c(FALSE,TRUE)}.} diff --git a/man/visualize.exp.Rd b/man/visualize.exp.Rd index 8bfd5bf..043cf74 100644 --- a/man/visualize.exp.Rd +++ b/man/visualize.exp.Rd @@ -13,7 +13,7 @@ visualize.exp(stat = 1, theta = 1, section = "lower") \item{theta}{vector of rates} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \value{ diff --git a/man/visualize.f.Rd b/man/visualize.f.Rd index 0c7c753..2bed727 100644 --- a/man/visualize.f.Rd +++ b/man/visualize.f.Rd @@ -15,7 +15,7 @@ visualize.f(stat = 1, df1 = 5, df2 = 4, section = "lower") \item{df2}{Second Degrees of Freedom} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \value{ diff --git a/man/visualize.gamma.Rd b/man/visualize.gamma.Rd index 0d40f0f..072f7d6 100644 --- a/man/visualize.gamma.Rd +++ b/man/visualize.gamma.Rd @@ -19,7 +19,7 @@ implementation of the gamma distribution. \code{theta} must be greater than 0.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \description{ diff --git a/man/visualize.geom.Rd b/man/visualize.geom.Rd index 1cd3971..79ef9a5 100644 --- a/man/visualize.geom.Rd +++ b/man/visualize.geom.Rd @@ -4,8 +4,7 @@ \alias{visualize.geom} \title{Visualize Geometric Distribution} \usage{ -visualize.geom(stat = 1, prob = 0.3, section = "lower", - strict = FALSE) +visualize.geom(stat = 1, prob = 0.3, section = "lower", strict = FALSE) } \arguments{ \item{stat}{a statistic to obtain the probability from. When using the @@ -14,11 +13,11 @@ visualize.geom(stat = 1, prob = 0.3, section = "lower", \item{prob}{probability of picking object.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} \item{strict}{Determines whether the probability will be generated as a -strict (<, >) or equal to (<=, >=) inequality. \code{strict=} requires +strict (<, >) or equal to (<=, >=) inequality. \verb{strict=} requires either values = 0 or =FALSE for equal to OR values =1 or =TRUE for strict. For bounded condition use: \code{strict=c(0,1)} or \code{strict=c(FALSE,TRUE)}.} diff --git a/man/visualize.hyper.Rd b/man/visualize.hyper.Rd index 12fcb9d..3064ff6 100644 --- a/man/visualize.hyper.Rd +++ b/man/visualize.hyper.Rd @@ -4,8 +4,14 @@ \alias{visualize.hyper} \title{Visualize Hypergeometric Distribution} \usage{ -visualize.hyper(stat = 1, m = 5, n = 4, k = 2, section = "lower", - strict = FALSE) +visualize.hyper( + stat = 1, + m = 5, + n = 4, + k = 2, + section = "lower", + strict = FALSE +) } \arguments{ \item{stat}{a statistic to obtain the probability from. When using the @@ -18,11 +24,11 @@ visualize.hyper(stat = 1, m = 5, n = 4, k = 2, section = "lower", \item{k}{draw \code{k} balls without replacement.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} \item{strict}{Determines whether the probability will be generated as a -strict (<, >) or equal to (<=, >=) inequality. \code{strict=} requires +strict (<, >) or equal to (<=, >=) inequality. \verb{strict=} requires either values = 0 or =FALSE for equal to OR values =1 or =TRUE for strict. For bounded condition use: \code{strict=c(0,1)} or \code{strict=c(FALSE,TRUE)}.} diff --git a/man/visualize.it.Rd b/man/visualize.it.Rd index 0436966..b1d5bdd 100644 --- a/man/visualize.it.Rd +++ b/man/visualize.it.Rd @@ -4,8 +4,13 @@ \alias{visualize.it} \title{Visualize's Processing Function} \usage{ -visualize.it(dist = "norm", stat = c(0, 1), params = list(mu = 0, sd - = 1), section = "lower", strict = c(0, 1)) +visualize.it( + dist = "norm", + stat = c(0, 1), + params = list(mu = 0, sd = 1), + section = "lower", + strict = c(0, 1) +) } \arguments{ \item{dist}{a string that should be contain a supported probability @@ -24,11 +29,11 @@ aware of the parameters for the distribution, consider using the \code{visualize.dist} functions listed under the "See Also" section.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} \item{strict}{Determines whether the probability will be generated as a -strict (<, >) or equal to (<=, >=) inequality. \code{strict=} requires +strict (<, >) or equal to (<=, >=) inequality. \verb{strict=} requires either values = 0 or =FALSE for strict OR values =1 or =TRUE for equal to. For bounded condition use: \code{strict=c(0,1)} or \code{strict=c(FALSE,TRUE)}.} diff --git a/man/visualize.lnorm.Rd b/man/visualize.lnorm.Rd index 6970f25..3541b01 100644 --- a/man/visualize.lnorm.Rd +++ b/man/visualize.lnorm.Rd @@ -4,8 +4,7 @@ \alias{visualize.lnorm} \title{Visualize Log Normal Distribution} \usage{ -visualize.lnorm(stat = 1, meanlog = 3, sdlog = 1, - section = "lower") +visualize.lnorm(stat = 1, meanlog = 3, sdlog = 1, section = "lower") } \arguments{ \item{stat}{a statistic to obtain the probability from. When using the @@ -16,7 +15,7 @@ visualize.lnorm(stat = 1, meanlog = 3, sdlog = 1, \item{sdlog}{Standard deviation of the distribution} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \value{ diff --git a/man/visualize.logis.Rd b/man/visualize.logis.Rd index 4bbbdb8..7cd1344 100644 --- a/man/visualize.logis.Rd +++ b/man/visualize.logis.Rd @@ -4,8 +4,7 @@ \alias{visualize.logis} \title{Visualize Logistic distribution} \usage{ -visualize.logis(stat = 1, location = 3, scale = 1, - section = "lower") +visualize.logis(stat = 1, location = 3, scale = 1, section = "lower") } \arguments{ \item{stat}{a statistic to obtain the probability from. When using the @@ -16,7 +15,7 @@ visualize.logis(stat = 1, location = 3, scale = 1, \item{scale}{Scale of the distribution.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \value{ diff --git a/man/visualize.nbinom.Rd b/man/visualize.nbinom.Rd index 67be540..236a9dc 100644 --- a/man/visualize.nbinom.Rd +++ b/man/visualize.nbinom.Rd @@ -4,8 +4,13 @@ \alias{visualize.nbinom} \title{Visualize Negative Binomial Distribution} \usage{ -visualize.nbinom(stat = 1, size = 6, prob = 0.5, section = "lower", - strict = FALSE) +visualize.nbinom( + stat = 1, + size = 6, + prob = 0.5, + section = "lower", + strict = FALSE +) } \arguments{ \item{stat}{a statistic to obtain the probability from. When using the @@ -16,11 +21,11 @@ visualize.nbinom(stat = 1, size = 6, prob = 0.5, section = "lower", \item{prob}{probability of picking object.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} \item{strict}{Determines whether the probability will be generated as a -strict (<, >) or equal to (<=, >=) inequality. \code{strict=} requires +strict (<, >) or equal to (<=, >=) inequality. \verb{strict=} requires either values = 0 or = FALSE for equal to OR values =1 or =TRUE for strict. For bounded condition use: \code{strict=c(0,1)} or \code{strict=c(FALSE,TRUE)}.} diff --git a/man/visualize.norm.Rd b/man/visualize.norm.Rd index f399720..5b07169 100644 --- a/man/visualize.norm.Rd +++ b/man/visualize.norm.Rd @@ -15,7 +15,7 @@ visualize.norm(stat = 1, mu = 0, sd = 1, section = "lower") \item{sd}{standard deviation of the Normal Distribution.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \description{ diff --git a/man/visualize.pois.Rd b/man/visualize.pois.Rd index f11298f..9739db5 100644 --- a/man/visualize.pois.Rd +++ b/man/visualize.pois.Rd @@ -4,8 +4,7 @@ \alias{visualize.pois} \title{Visualize Poisson Distribution} \usage{ -visualize.pois(stat = 1, lambda = 3.5, section = "lower", - strict = FALSE) +visualize.pois(stat = 1, lambda = 3.5, section = "lower", strict = FALSE) } \arguments{ \item{stat}{a statistic to obtain the probability from. When using the @@ -14,11 +13,11 @@ visualize.pois(stat = 1, lambda = 3.5, section = "lower", \item{lambda}{lambda value of the Poisson Distribution.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} \item{strict}{Determines whether the probability will be generated as a -strict (<, >) or equal to (<=, >=) inequality. \code{strict=} requires +strict (<, >) or equal to (<=, >=) inequality. \verb{strict=} requires either values = 0 or =FALSE for equal to OR values =1 or =TRUE for strict. For bounded condition use: \code{strict=c(0,1)} or \code{strict=c(FALSE,TRUE)}.} diff --git a/man/visualize.t.Rd b/man/visualize.t.Rd index e2bd508..24e9ab6 100644 --- a/man/visualize.t.Rd +++ b/man/visualize.t.Rd @@ -13,7 +13,7 @@ visualize.t(stat = 1, df = 3, section = "lower") \item{df}{Degrees of freedom} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \value{ diff --git a/man/visualize.unif.Rd b/man/visualize.unif.Rd index 497db03..fcf5c34 100644 --- a/man/visualize.unif.Rd +++ b/man/visualize.unif.Rd @@ -15,7 +15,7 @@ visualize.unif(stat = 1, a = 0, b = 1, section = "lower") \item{b}{end point. Note: \code{b} > \code{a}} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \description{ diff --git a/man/visualize.wilcox.Rd b/man/visualize.wilcox.Rd index 15eb823..e73f529 100644 --- a/man/visualize.wilcox.Rd +++ b/man/visualize.wilcox.Rd @@ -15,7 +15,7 @@ visualize.wilcox(stat = 1, m = 7, n = 3, section = "lower") \item{n}{Sample size from group 2.} \item{section}{Select how you want the statistic(s) evaluated via -\code{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, +\verb{section=} either \code{"lower"},\code{"bounded"}, \code{"upper"}, or\code{"tails"}.} } \value{