├── .quarto ├── preview │ └── lock ├── xref │ ├── f9bab537 │ ├── f84169d5 │ └── INDEX ├── _freeze │ ├── about │ │ └── execute-results │ │ │ └── html.json │ ├── index │ │ └── execute-results │ │ │ └── html.json │ └── site_libs │ │ └── clipboard │ │ └── clipboard.min.js └── idx │ ├── index.qmd.json │ └── about.qmd.json ├── .Rprofile ├── .Rinstignore ├── R ├── ipsur.R ├── misc.r └── plothtest.R ├── inst └── doc │ └── IPSUR.pdf ├── renv ├── .gitignore └── activate.R ├── NAMESPACE ├── .gitignore ├── .Rbuildignore ├── demo ├── 00Index ├── badgraph.R ├── clt1.R ├── clt2.R └── clt3.R ├── IPSUR.Rproj ├── man ├── IPSUR.Utilities.Rd ├── PP.Rd ├── donner.Rd ├── IPSUR-package.Rd ├── plot.htest.Rd ├── ED.Rd ├── RcmdrTestDrive.rd └── birthday.ipsur.Rd ├── data ├── donner.txt ├── PP.R ├── ED.R └── RcmdrTestDrive.txt ├── README ├── CITATION.cff ├── DESCRIPTION ├── README.md ├── vignettes └── IPSUR.bib ├── LICENSE.md └── COPYING /.quarto/preview/lock: -------------------------------------------------------------------------------- 1 | 25420 -------------------------------------------------------------------------------- /.Rprofile: -------------------------------------------------------------------------------- 1 | source("renv/activate.R") 2 | -------------------------------------------------------------------------------- /.quarto/xref/f9bab537: -------------------------------------------------------------------------------- 1 | {"entries":[],"headings":[]} -------------------------------------------------------------------------------- /.Rinstignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | inst/doc/tex -------------------------------------------------------------------------------- /.quarto/xref/f84169d5: -------------------------------------------------------------------------------- 1 | {"headings":["install","load","develop"],"entries":[]} -------------------------------------------------------------------------------- /R/ipsur.R: -------------------------------------------------------------------------------- 1 | #' @export 2 | read <- function(x) vignette(as.character(substitute(x))) 3 | -------------------------------------------------------------------------------- /inst/doc/IPSUR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gjkerns/IPSUR/HEAD/inst/doc/IPSUR.pdf -------------------------------------------------------------------------------- /renv/.gitignore: -------------------------------------------------------------------------------- 1 | library/ 2 | local/ 3 | cellar/ 4 | lock/ 5 | python/ 6 | sandbox/ 7 | staging/ 8 | -------------------------------------------------------------------------------- /.quarto/xref/INDEX: -------------------------------------------------------------------------------- 1 | { 2 | "index.qmd": { 3 | "index.html": "f84169d5" 4 | }, 5 | "about.qmd": { 6 | "about.html": "f9bab537" 7 | } 8 | } -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | S3method(plot,htest) 4 | export(pbirthday.ipsur) 5 | export(qbirthday.ipsur) 6 | export(read) 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | inst/doc/_book 2 | inst/doc/_bookdown_files 3 | inst/doc/.Rhistory 4 | /.quarto/ 5 | /.Rproj.user/ 6 | .Rhistory 7 | /renv/ 8 | vignettes/*.pdf 9 | vignettes/*.tex 10 | /doc/ 11 | /Meta/ 12 | -------------------------------------------------------------------------------- /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^renv$ 2 | ^renv\.lock$ 3 | ^.*\.Rproj$ 4 | ^\.Rproj\.user$ 5 | inst/doc/_book$ 6 | inst/doc/_bookdown_files 7 | inst/doc/_convert 8 | inst/doc/_main.R 9 | ^LICENSE\.md$ 10 | ^doc$ 11 | ^Meta$ 12 | -------------------------------------------------------------------------------- /demo/00Index: -------------------------------------------------------------------------------- 1 | badgraph A Bad Graph: Planned Parenthood 2 | clt1 Central Limit Theorem: Student's t population 3 | clt2 Central Limit Theorem: Uniform population 4 | clt3 Central Limit Theorem: Gamma population 5 | 6 | -------------------------------------------------------------------------------- /IPSUR.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: No 4 | SaveWorkspace: No 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 | BuildType: Package 16 | PackageUseDevtools: Yes 17 | PackageInstallArgs: --no-multiarch --with-keep.source 18 | PackageCheckArgs: --as-cran 19 | PackageRoxygenize: rd,collate,namespace 20 | -------------------------------------------------------------------------------- /.quarto/_freeze/about/execute-results/html.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "a754ce02c0472c0b163d8ffb898e69ac", 3 | "result": { 4 | "markdown": "---\ntitle: \"About\"\n---\n\n\nAbout this site\n\n\n::: {.cell}\n\n```{.r .cell-code}\n1 + 1\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n[1] 2\n```\n:::\n:::\n", 5 | "supporting": [], 6 | "filters": [ 7 | "rmarkdown/pagebreak.lua" 8 | ], 9 | "includes": {}, 10 | "engineDependencies": {}, 11 | "preserve": {}, 12 | "postProcess": true 13 | } 14 | } -------------------------------------------------------------------------------- /man/IPSUR.Utilities.Rd: -------------------------------------------------------------------------------- 1 | \name{IPSUR.Utilities} 2 | \alias{IPSUR.Utilities} 3 | \alias{read} 4 | 5 | \title{IPSUR Utility Functions} 6 | \description{ 7 | These functions support using the IPSUR package. 8 | } 9 | 10 | \usage{read(x)} 11 | 12 | \arguments{ 13 | \item{x}{the name of a PDF in the doc directory, quoted or not.} 14 | } 15 | 16 | \details{ 17 | These are convenience functions designed to make the use of IPSUR easier for novices. 18 | } 19 | 20 | \author{G. Jay Kerns \email{gkerns@ysu.edu}} 21 | 22 | \keyword{misc} 23 | -------------------------------------------------------------------------------- /data/donner.txt: -------------------------------------------------------------------------------- 1 | age male survival 2 | 23 1 0 3 | 40 0 1 4 | 40 1 1 5 | 30 1 0 6 | 28 1 0 7 | 40 1 0 8 | 45 0 0 9 | 62 1 0 10 | 65 1 0 11 | 45 0 0 12 | 25 0 0 13 | 28 1 1 14 | 28 1 0 15 | 23 1 0 16 | 22 0 1 17 | 23 0 1 18 | 28 1 1 19 | 15 0 1 20 | 47 0 0 21 | 57 1 0 22 | 20 0 1 23 | 18 1 1 24 | 25 1 0 25 | 60 1 0 26 | 25 1 1 27 | 20 1 1 28 | 32 1 1 29 | 32 0 1 30 | 24 0 1 31 | 30 1 1 32 | 15 1 0 33 | 50 0 0 34 | 21 0 1 35 | 25 1 0 36 | 46 1 1 37 | 32 0 1 38 | 30 1 0 39 | 25 1 0 40 | 25 1 0 41 | 25 1 0 42 | 30 1 0 43 | 35 1 0 44 | 23 1 1 45 | 24 1 0 46 | 25 0 1 47 | -------------------------------------------------------------------------------- /man/PP.Rd: -------------------------------------------------------------------------------- 1 | \name{PP} 2 | \alias{PP} 3 | \docType{data} 4 | \title{Planned Parenthood data} 5 | \description{ 6 | Data contains the services offered by the Planned Parenthood organization from the years 2006 to 2013. 7 | } 8 | \usage{data(PP)} 9 | \format{ 10 | A multiple time series with on the following 6 variables. 11 | \describe{ 12 | \item{Contraception}{contraceptive services} 13 | \item{STD.Test.Treat}{STD testing and treatment} 14 | \item{Cancer.Screen}{cancer screening services} 15 | \item{Preg.Prenat.Serv}{pregnancy and prenatal services} 16 | \item{Abortion.Serv}{abortion services} 17 | \item{Other.Serv}{other services} 18 | } 19 | } 20 | \source{Planned Parenthood annual reports, 2006-13.} 21 | \keyword{datasets} 22 | -------------------------------------------------------------------------------- /man/donner.Rd: -------------------------------------------------------------------------------- 1 | \name{donner} 2 | \alias{donner} 3 | \docType{data} 4 | \title{Donner survival study} 5 | \description{ 6 | Data contains the age, gender and survival status for 45 members of the Donner Party 7 | who experienced difficulties in crossing the Sierra Nevada mountains in California. 8 | } 9 | \usage{data(donner)} 10 | \format{ 11 | A data frame with 45 observations on the following 3 variables. 12 | \describe{ 13 | \item{age}{age of person} 14 | \item{male}{gender that is 1 (0) if person is male (female)} 15 | \item{survival}{survival status, 1 or 0 if person survived or died} 16 | } 17 | } 18 | \source{Grayson, D. (1960), Donner party deaths: a demographic 19 | assessment, Journal of Anthropological Assessment, 46, 223-242.} 20 | 21 | \keyword{datasets} 22 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | IPSUR: Introduction to Probability and Statistics Using R 2 | 3 | Copyright (C) 2014 G. Jay Kerns 4 | 5 | Version 2.0alpha 6 | 7 | This package is the source code to generate IPSUR, a free textbook on 8 | Probability and Statistics. 9 | 10 | See the INSTALL file for instructions on how to compile the document 11 | for personal use. 12 | 13 | The top-level directory contains IPSUR.org, the main file for the 14 | package. There is also a file init-ipsur.el which is used to 15 | initialize Emacs for publishing in a predictable manner. The include 16 | directory contains assorted LaTeX files for the preamble and 17 | frontmatter, plus an R file which sets up the R environment and loads 18 | the R contributed package dependencies. 19 | 20 | The source code for the IPSUR program is released under the GNU 21 | General Public License, version 3. See the file COPYING for details. -------------------------------------------------------------------------------- /man/IPSUR-package.Rd: -------------------------------------------------------------------------------- 1 | \name{IPSUR-package} 2 | \alias{IPSUR-package} 3 | \alias{IPSUR} 4 | \docType{package} 5 | \title{ 6 | Introduction to Probability and Statistics Using R 7 | } 8 | \description{ 9 | An introductory probability and statistics textbook, alongside other supplementary materials. The book is released under the GNU Free Documentation License. 10 | } 11 | \details{ 12 | \tabular{ll}{ 13 | Package: \tab IPSUR\cr 14 | Type: \tab Package\cr 15 | Version: \tab 4.0.1206\cr 16 | Date: \tab 2022-12-06\cr 17 | Depends: \tab R (>= 2.10)\cr 18 | Imports: \tab actuar, aplpack, binom, boot, coin, distrEx, e1071, HH (>= 2.1-32), Hmisc, lmtest, mvtnorm, prob, qcc, RcmdrPlugin.IPSUR (>= 0.1-6), reshape, scatterplot3d, TeachingDemos (>= 2.5), vcd\cr 19 | Suggests: \tab diagram, emdbook, ggplot2, lattice, RcmdrMisc\cr 20 | License: \tab GPL (>= 3)\cr 21 | LazyLoad: \tab yes\cr 22 | } 23 | } 24 | \author{ 25 | G. Jay Kerns 26 | Maintainer: G. Jay Kerns 27 | } 28 | \keyword{package} 29 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | # This CITATION.cff file was generated with cffinit. 2 | # Visit https://bit.ly/cffinit to generate yours today! 3 | 4 | cff-version: 1.2.0 5 | title: 'IPSUR: Introduction to Probability and Statistics Using R' 6 | message: >- 7 | If you use this software, please cite it using the 8 | metadata from this file. 9 | type: software 10 | authors: 11 | - given-names: G. Jay 12 | family-names: Kerns 13 | email: gkerns@ysu.edu 14 | affiliation: Youngstown State University 15 | orcid: 'https://orcid.org/0000-0001-9354-2842' 16 | repository-code: 'https://github.com/gjkerns/IPSUR' 17 | url: 'https://ipsur.org' 18 | abstract: >- 19 | An introductory probability and statistics textbook built 20 | with the R programming language, alongside other 21 | supplementary materials. The book is released under the 22 | GNU Free Documentation License. 23 | license: GPL-3.0 24 | commit: 7beaac1a530208db40de5e05f16660a6aa3b0a07 25 | version: 4.0.1206 26 | date-released: '2022-12-06' 27 | -------------------------------------------------------------------------------- /data/PP.R: -------------------------------------------------------------------------------- 1 | PP <- structure(c(3989474L, 3889980L, NA, 3868901L, 3685437L, 3436813L, 2 | 3724558L, 3577348L, 3018853L, 3363222L, NA, 4034264L, 4179053L, 3 | 4475013L, 4469308L, 4470597L, 2007371L, 1900850L, NA, 1830811L, 4 | 1596741L, 1307570L, 1121580L, 935573L, 1119977L, 1207340L, NA, 5 | 1070310L, 1144558L, 1179263L, 1167755L, 1147467L, 289750L, 305310L, 6 | NA, 331796L, 329445L, 333964L, 327116L, 327653L, 162935L, 255123L, 7 | NA, 102332L, 68132L, 132036L, 123308L, 131795L), .Dim = c(8L, 8 | 6L), .Dimnames = list(NULL, c("Contraception", "STD.Test.Treat", 9 | "Cancer.Screen", "Preg.Prenat.Serv", "Abortion.Serv", "Other.Serv" 10 | )), .Tsp = c(2006, 2013, 1), class = c("mts", "ts")) -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Type: Package 2 | Package: IPSUR 3 | Title: Introduction to Probability and Statistics Using R 4 | Version: 4.0.1206 5 | Author: G. Jay Kerns 6 | Maintainer: G. Jay Kerns 7 | Description: An introductory probability and statistics textbook, 8 | alongside other supplementary materials. The book is released under 9 | the GNU Free Documentation License. 10 | License: GPL (>= 3) 11 | URL: https://ipsur.org, https://github.com/gjkerns/IPSUR 12 | BugReports: https://github.com/gjkerns/IPSUR/issues 13 | Depends: 14 | R (>= 2.10) 15 | Imports: 16 | actuar, 17 | aplpack, 18 | binom, 19 | boot, 20 | coin, 21 | distrEx, 22 | e1071, 23 | HH (>= 2.1-32), 24 | Hmisc, 25 | lmtest, 26 | mvtnorm, 27 | prob, 28 | qcc, 29 | reshape, 30 | scatterplot3d, 31 | TeachingDemos (>= 2.5), 32 | vcd 33 | Suggests: 34 | diagram, 35 | emdbook, 36 | ggplot2, 37 | lattice, 38 | RcmdrMisc 39 | Encoding: UTF-8 40 | LazyLoad: yes 41 | RoxygenNote: 7.2.2 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IPSUR: Introduction to Probability and Statistics Using R 2 | 3 | Copyright (C) 2022 G. Jay Kerns 4 | 5 | Version 3.0 6 | 7 | This package is the source code to generate `IPSUR`, a free textbook on Probability and Statistics. 8 | 9 | ## Install 10 | 11 | This package is not distributed on CRAN. The easiest/quickest way to get `IPSUR` (which at the moment doesn't do what it is supposed to do) is to install the `devtools` package if you don't have it already and run 12 | 13 | ```{r, eval=FALSE} 14 | devtools::install_github("gjkerns/prob") 15 | devtools::install_github("gjkerns/IPSUR") 16 | ``` 17 | 18 | You will get lots of errs due to missing dependencies. See the file `renv.lock` to understand which packages you need to run `IPSUR`---there are quite a few. 19 | 20 | The source code for IPSUR is released under the GNU General Public License, version 3. See the file COPYING for details. 21 | 22 | 23 | # Load 24 | 25 | Once IPSUR is downloaded and installed, it must be loaded into R. Load the package with the library function: 26 | 27 | ```{r, eval=FALSE} 28 | library(IPSUR) 29 | ``` 30 | 31 | and finally launch your PDF viewer with 32 | 33 | ```{r, eval=FALSE} 34 | read(IPSUR) 35 | ``` 36 | 37 | -------------------------------------------------------------------------------- /man/plot.htest.Rd: -------------------------------------------------------------------------------- 1 | \name{plot} 2 | \alias{plot.htest} 3 | 4 | \title{Plotting Hypothesis Tests} 5 | \description{ 6 | Plot saved hypothesis test objects, including normal curves, critical values, shading, and p-values. It requires the HH package and the \code{normal.and.t.dist} function written by Dr. Richard Heiberger. 7 | } 8 | 9 | \usage{ 10 | \method{plot}{htest}(x, hypoth.or.conf = 'Hypoth', \ldots) 11 | } 12 | 13 | \arguments{ 14 | \item{x}{an \code{htest} object that is the result of a hypothesis test.} 15 | \item{hypoth.or.conf}{a switch to choose between plots for hypothesis tests or confidence intervals} 16 | \item{\ldots}{further arguments to be passed to or from other methods.} 17 | } 18 | 19 | \details{ 20 | This is a plot method for hypothesis tests or confidence intervals which uses the \code{normal.and.t.dist} function in the \code{HH} package. 21 | } 22 | 23 | \value{ 24 | A plot of the normal or Student's t distribution associated with the hypothesis test or confidence interval. Critical values and p-values are displayed. 25 | } 26 | 27 | \author{G. Jay Kerns \email{gkerns@ysu.edu}} 28 | 29 | \seealso{\code{\link[HH]{norm.curve}}} 30 | 31 | \examples{ 32 | \dontrun{plot(t.test(rnorm(10)))} 33 | } 34 | \keyword{misc} 35 | -------------------------------------------------------------------------------- /.quarto/_freeze/index/execute-results/html.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "fdc2c114dcfc88ec41bcd0d9839473ad", 3 | "result": { 4 | "markdown": "---\ntitle: \"IPSUR: Introduction to Probability and Statistics Using R\"\n---\n\n\nIntroduction to Probability and Statistics Using R is a textbook written for an undergraduate course in probability and statistics.\n\nIPSUR is FREE, in the GNU sense of the word.\n\n## Install \n\nLaunch R and type the following at the command prompt \">\":\n\n\n::: {.cell}\n\n```{.r .cell-code}\ninstall.packages(\"IPSUR\", dependencies = TRUE)\n```\n:::\n\n\n## Load\n\nOnce IPSUR is downloaded and installed, it must be loaded into R. Load the package with the library function:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nlibrary(IPSUR)\n```\n:::\n\n\nand finally launch your PDF viewer with\n\n\n::: {.cell}\n\n```{.r .cell-code}\nread(IPSUR)\n```\n:::\n\n\n## Develop\n\nIPSUR development is hosted on GitHub. See also the IPSUR Development Page on R-Forge. There still exists an IPSUR page on GNU Savannah, though development is primarily on GitHub these days. Go here to browse the recent commit history.\n\n\n", 5 | "supporting": [], 6 | "filters": [ 7 | "rmarkdown/pagebreak.lua" 8 | ], 9 | "includes": {}, 10 | "engineDependencies": {}, 11 | "preserve": {}, 12 | "postProcess": true 13 | } 14 | } -------------------------------------------------------------------------------- /man/ED.Rd: -------------------------------------------------------------------------------- 1 | \name{ED} 2 | \alias{ED} 3 | \docType{data} 4 | \title{Hospital Emergency Department Visits and Readmission Rates} 5 | \description{These data are related to a study comparison of two pharmacist-delivered transitions of care models for patients discharged home from a community teaching hospital.} 6 | 7 | \usage{data(ED)} 8 | \format{ 9 | A data frame with 164 observations of 8 variables. 10 | \describe{ 11 | \item{\code{ED}}{Emergency room discharge (Y or N)} 12 | \item{\code{model}}{Model of care (A, B, or C (usual care)} 13 | \item{\code{los}}{Length of stay in days} 14 | \item{\code{age}}{Age of patient in years} 15 | \item{\code{gender}}{Male or female} 16 | \item{\code{cci}}{Charelson Comorbidity Index} 17 | \item{\code{LACE}}{LACE index: predicts likelihood of readmission or death} 18 | \item{\code{readmit}}{Factor indicating whether patient was readmitted within 30 days post-discharge} 19 | \item{\code{visit}}{Factor indicating whether patient visited the Emergency Department within 30 days post-discharge} 20 | } 21 | } 22 | 23 | \source{ 24 | Mitchell, RD, Longstreth KL, Graham J, Kerns GJ. Comparison of two pharmacist-delivered transitions of care models for patients discharged home from a community teaching hospital. Used with permission. 25 | } 26 | 27 | \keyword{datasets} 28 | -------------------------------------------------------------------------------- /demo/badgraph.R: -------------------------------------------------------------------------------- 1 | # source: http://www.aul.org/2015/06/aul-releases-the-new-leviathan-the-mega-centers-report-how-planned-parenthood-has-become-abortion-inc/ 2 | plot(x = c(74, 74, 774, 774), 3 | y = c(-541, -213, -305, -572), 4 | main = "PLANNED PARENTHOOD FEDERATION OF AMERICA:", 5 | xlab = "", ylab = "", asp = 1, axes = FALSE, 6 | xlim = c(74, 774), ylim = c(-679, -150), 7 | type = "n") 8 | mtext("ABORTIONS UP - LIFE SAVING PROCEDURES DOWN", side = 3) 9 | arrows(x0 = 74, y0 = -541, x1 = 774, y1 = -305, 10 | lwd = 3, col = "red") 11 | arrows(x0 = 74, y0 = -213, x1 = 774, y1 = -572, 12 | lwd = 3, col = "purple") 13 | text(x = 176, y = -480, labels = "ABORTIONS", pos = 4, srt = 18, col = "red") 14 | text(x = 283, y = -259, col = "purple", 15 | labels = "CANCER SCREENING &\nPREVENTION SERVICES", pos = 1, srt = -27) 16 | axis(side = 1, 17 | at = 100*(0:7) + 74, 18 | labels = 2006:2013) 19 | segments(x0=74, y0=-150, x1=774, y1=-150) 20 | 21 | text(90, -250, labels = "2,007,371\nIN 2006", pos = 1, cex = 0.75) 22 | text(94, -557, labels = "289,750\nIN 2006", pos = 1, cex = 0.75) 23 | text(734, -292, labels = "327,653\nIN 2013", pos = 3, cex = 0.75) 24 | text(748, -594, labels = "935,573\nIN 2013", pos = 1, cex = 0.75) 25 | mtext("SOURCE: AMERICANS UNITED FOR LIFE", side = 1, line = 3, cex = 0.75, adj = 1) 26 | -------------------------------------------------------------------------------- /man/RcmdrTestDrive.rd: -------------------------------------------------------------------------------- 1 | \name{RcmdrTestDrive} 2 | \alias{RcmdrTestDrive} 3 | \docType{data} 4 | \title{ Test-driving the R Commander } 5 | \description{ 6 | These are simulated data specifically designed to allow the inexperienced user to browse the 7 | capabilities of the R Commander. 8 | } 9 | \usage{data(RcmdrTestDrive)} 10 | \format{ 11 | A data frame with 168 observations on the following 9 variables: 12 | 13 | 14 | \describe{ 15 | \item{order}{sequential order} 16 | \item{smoking}{smoking status} 17 | \item{gender}{gender of victim} 18 | \item{race}{race of victim} 19 | \item{before}{life expectancy before exposure} 20 | \item{after}{life expectancy after exposure} 21 | \item{salary}{salary at retirement} 22 | \item{reduction}{potential salary reduction} 23 | \item{parking}{number of unpaid parking tickets} 24 | } 25 | } 26 | \details{ 27 | The R Commander has extensive functionality, but many options are unavailable 28 | unless the correct types of data are loaded in the Active Data Set. This 29 | data set was randomly generated so that, when loaded, essentially all R Commander 30 | options would be available for the student to investigate. These data are 31 | entirely fictional. For an amusing contributed story tying these variables together, 32 | please visit \url{http://www.cc.ysu.edu/~gjkerns/IPSUR/package}. 33 | } 34 | 35 | \keyword{datasets} 36 | \source{ 37 | These data were randomly generated using the IPSUR probability menu for the 38 | R Commander. 39 | 40 | } 41 | 42 | 43 | -------------------------------------------------------------------------------- /R/misc.r: -------------------------------------------------------------------------------- 1 | # Last modified Mar 23, 2012 2 | 3 | #' @export 4 | `pbirthday.ipsur` <- 5 | function (n, classes = 365, coincident = 2) 6 | { 7 | k <- coincident 8 | c <- classes 9 | if (k < 2) 10 | return(1) 11 | if (k > n) 12 | return(0) 13 | if (k == 2) { 14 | return(1 - prod((c:(c - n + 1))/rep(c, n))) 15 | } 16 | if (n > c * (k - 1)) 17 | return(1) 18 | eps <- 1e-14 19 | if (qbirthday(1 - eps, c, k) <= n) 20 | return(1 - eps) 21 | f <- function(p) qbirthday(p, c, k) - n 22 | upper <- min(1, exp(k * log(n) - (k - 1) * log(c)), na.rm = TRUE) 23 | nmin <- uniroot(f, lower = 0, upper = upper, tol = eps) 24 | if (nmin$root == 0 && f(.Machine$double.xmin) < 0) { 25 | g <- function(ln.p) qbirthday(exp(ln.p), c, k) - n 26 | nmin <- uniroot(g, lower = floor(log(.Machine$double.xmin)), 27 | upper = -2, tol = eps) 28 | exp(nmin$root) 29 | } 30 | else nmin$root 31 | } 32 | 33 | #' @export 34 | `qbirthday.ipsur` <- 35 | function (prob = 0.5, classes = 365, coincident = 2) 36 | { 37 | k <- coincident 38 | c <- classes 39 | p <- prob 40 | if (p <= 0) 41 | return(1) 42 | if (p >= 1) 43 | return(c * (k - 1) + 1) 44 | if (k == 2) { 45 | x <- sapply(0:c, function(t) pbirthday(n = t, classes = c, 46 | coincident = 2)) 47 | return(min(which(x >= p)) - 1) 48 | } 49 | if ((k - 1) * log(c) > 8 || 1 - p < 1e-07) { 50 | lnN <- ((k - 1) * log(c) + lgamma(k + 1) + log(-log1p(-p)))/k 51 | N <- exp(lnN) 52 | } 53 | else { 54 | N <- (c^(k - 1) * gamma(k + 1) * log(1/(1 - p)))^(1/k) 55 | } 56 | round(N) 57 | } 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /man/birthday.ipsur.Rd: -------------------------------------------------------------------------------- 1 | \name{birthday.ipsur} 2 | \alias{qbirthday.ipsur} 3 | \alias{pbirthday.ipsur} 4 | \title{Probability of coincidences for the IPSUR package} 5 | \description{ 6 | This is a modified version of the \code{pbirthday} and \code{qbirthday} functions in the \code{stats} package. 7 | Computes approximate answers to a generalised \dQuote{birthday paradox} 8 | problem. \code{pbirthday.ipsur} computes the probability of a coincidence 9 | and \code{qbirthday.ipsur} computes the number of observations needed to 10 | have a specified probability of coincidence. 11 | The change is that precise answers are given (instead of asymptotics) 12 | in the case of exactly two coincidences. 13 | } 14 | \usage{ 15 | qbirthday.ipsur(prob = 0.5, classes = 365, coincident = 2) 16 | pbirthday.ipsur(n, classes = 365, coincident = 2) 17 | } 18 | \arguments{ 19 | \item{classes}{How many distinct categories the people could fall into} 20 | \item{prob}{The desired probability of coincidence} 21 | \item{n}{The number of people} 22 | \item{coincident}{The number of people to fall in the same category} 23 | } 24 | \value{ 25 | \item{qbirthday.ipsur}{ 26 | Number of people needed for a probability \code{prob} that \code{k} of 27 | them have the same one out of \code{classes} equiprobable labels. 28 | } 29 | 30 | \item{pbirthday.ipsur}{Probability of the specified coincidence.} 31 | } 32 | \details{ 33 | The birthday paradox is that a very small number of people, 23, 34 | suffices to have a 50-50 chance that two of them have the same 35 | birthday. This function generalises the calculation to probabilities 36 | other than 0.5, numbers of coincident events other than 2, and numbers 37 | of classes other than 365. 38 | 39 | The formula is approximate, except in the case \code{coincident=2}. 40 | } 41 | \references{ 42 | Diaconis P, Mosteller F., \dQuote{Methods for studying coincidences}. 43 | JASA 84:853-861} 44 | \examples{ 45 | ## the standard version 46 | qbirthday.ipsur() 47 | ## same 4-digit PIN number 48 | qbirthday.ipsur(classes=10^4) 49 | ## 0.9 probability of three coincident birthdays 50 | qbirthday.ipsur(coincident=3, prob=0.9) 51 | ## Chance of 4 coincident birthdays in 150 people 52 | pbirthday.ipsur(150,coincident=4) 53 | ## 100 coincident birthdays in 1000 people: *very* rare: 54 | pbirthday.ipsur(1000, coincident=100) 55 | 56 | } 57 | \keyword{distribution} 58 | -------------------------------------------------------------------------------- /.quarto/idx/index.qmd.json: -------------------------------------------------------------------------------- 1 | {"title":"IPSUR: Introduction to Probability and Statistics Using R","markdown":{"yaml":{"title":"IPSUR: Introduction to Probability and Statistics Using R"},"headingText":"Install","containsRefs":false,"markdown":"\n\nIntroduction to Probability and Statistics Using R is a textbook written for an undergraduate course in probability and statistics.\n\nIPSUR is FREE, in the GNU sense of the word.\n\n\nLaunch R and type the following at the command prompt \">\":\n\n```{r, eval=FALSE}\ninstall.packages(\"IPSUR\", dependencies = TRUE)\n```\n\n## Load\n\nOnce IPSUR is downloaded and installed, it must be loaded into R. Load the package with the library function:\n\n```{r, eval=FALSE}\nlibrary(IPSUR)\n```\n\nand finally launch your PDF viewer with\n\n```{r, eval=FALSE}\nread(IPSUR)\n```\n\n## Develop\n\nIPSUR development is hosted on GitHub. See also the IPSUR Development Page on R-Forge. There still exists an IPSUR page on GNU Savannah, though development is primarily on GitHub these days. Go here to browse the recent commit history.\n\n\n"},"formats":{"html":{"execute":{"fig-width":7,"fig-height":5,"fig-format":"retina","fig-dpi":96,"df-print":"default","error":false,"eval":true,"cache":null,"freeze":false,"echo":true,"output":true,"warning":true,"include":true,"keep-md":false,"keep-ipynb":false,"ipynb":null,"enabled":null,"daemon":null,"daemon-restart":false,"debug":false,"ipynb-filters":[],"engine":"knitr"},"render":{"keep-tex":false,"keep-yaml":false,"keep-source":false,"keep-hidden":false,"prefer-html":false,"output-divs":true,"output-ext":"html","fig-align":"default","fig-pos":null,"fig-env":null,"code-fold":"none","code-overflow":"scroll","code-link":false,"code-line-numbers":false,"code-tools":false,"tbl-colwidths":"auto","merge-includes":true,"latex-auto-mk":true,"latex-auto-install":true,"latex-clean":true,"latex-max-runs":10,"latex-makeindex":"makeindex","latex-makeindex-opts":[],"latex-tlmgr-opts":[],"latex-input-paths":[],"latex-output-dir":null,"link-external-icon":false,"link-external-newwindow":false,"self-contained-math":false,"format-resources":[]},"pandoc":{"standalone":true,"wrap":"none","default-image-extension":"png","to":"html","css":["styles.css"],"toc":true,"output-file":"index.html"},"language":{},"metadata":{"lang":"en","fig-responsive":true,"quarto-version":"1.1.189","editor":"visual","theme":"cosmo","title":"IPSUR: Introduction to Probability and Statistics Using R"},"extensions":{"book":{"multiFile":true}}}}} -------------------------------------------------------------------------------- /.quarto/idx/about.qmd.json: -------------------------------------------------------------------------------- 1 | {"title":"About","markdown":{"yaml":{"title":"About","image":"profile.png","about":{"template":"solana","links":[{"icon":"github","text":"GitHub","href":"https://github.com/gjkerns"},{"icon":"mastodon","text":"Mastodon","href":"https://mathstodon.xyz/@gjkerns"},{"icon":"linkedin","text":"LinkedIn","href":"https://www.linkedin.com/in/g-jay-kerns-9ab99111/"}]}},"containsRefs":false,"markdown":"\n\nIPSUR is a textbook written for an undergraduate course in probability and statistics. The approximate prerequisites are two or three semesters of calculus and some linear algebra in a few places. Attendees of the class typically include mathematics, engineering, and computer science majors.\n\nIPSUR is FREE, in the GNU sense of the word. Hard copies of the first edition are available for purchase here from Lulu. You may be able to get it cheaper by downloading an electronic copy and printing it out yourself. Hard copies of the third edition will be available in due course.\n\nIPSUR development has been happening on and off since 2006, yet there are many important topics, examples, and exercises still missing from the book. I will add them as time permits."},"formats":{"html":{"execute":{"fig-width":7,"fig-height":5,"fig-format":"retina","fig-dpi":96,"df-print":"default","error":false,"eval":true,"cache":null,"freeze":false,"echo":true,"output":true,"warning":true,"include":true,"keep-md":false,"keep-ipynb":false,"ipynb":null,"enabled":null,"daemon":null,"daemon-restart":false,"debug":false,"ipynb-filters":[],"engine":"markdown"},"render":{"keep-tex":false,"keep-yaml":false,"keep-source":false,"keep-hidden":false,"prefer-html":false,"output-divs":true,"output-ext":"html","fig-align":"default","fig-pos":null,"fig-env":null,"code-fold":"none","code-overflow":"scroll","code-link":false,"code-line-numbers":false,"code-tools":false,"tbl-colwidths":"auto","merge-includes":true,"latex-auto-mk":true,"latex-auto-install":true,"latex-clean":true,"latex-max-runs":10,"latex-makeindex":"makeindex","latex-makeindex-opts":[],"latex-tlmgr-opts":[],"latex-input-paths":[],"latex-output-dir":null,"link-external-icon":false,"link-external-newwindow":false,"self-contained-math":false,"format-resources":[]},"pandoc":{"standalone":true,"wrap":"none","default-image-extension":"png","to":"html","css":["styles.css"],"toc":true,"output-file":"about.html"},"language":{},"metadata":{"lang":"en","fig-responsive":true,"quarto-version":"1.1.189","editor":"visual","theme":"cosmo","title":"About","image":"profile.png","about":{"template":"solana","links":[{"icon":"github","text":"GitHub","href":"https://github.com/gjkerns"},{"icon":"mastodon","text":"Mastodon","href":"https://mathstodon.xyz/@gjkerns"},{"icon":"linkedin","text":"LinkedIn","href":"https://www.linkedin.com/in/g-jay-kerns-9ab99111/"}]}},"extensions":{"book":{"multiFile":true}}}}} -------------------------------------------------------------------------------- /demo/clt1.R: -------------------------------------------------------------------------------- 1 | ################################################## 2 | # The Central Limit Theorem 3 | 4 | 5 | clt1 <- function(population = "rt", 6 | r = 3, 7 | sample.size = 2, 8 | N.iter = 100000){ 9 | 10 | ################################################################# 11 | # initialize variables 12 | population <- get(population, mode = "function") 13 | xbar <- rep(0, N.iter) 14 | graphics.off() 15 | 16 | f <- function(x) dt(x, df = r ) 17 | curve( f, 18 | xlim = c(-5,5), 19 | xlab = "Support Set", 20 | ylab = "Density", 21 | lwd = 2, 22 | main = "The Population Distribution \n (while we're waiting)" ) 23 | abline( h = 0 , col = "grey" ) 24 | 25 | 26 | ######################################## 27 | # Label the plot with mu 28 | text( 5, 29 | dt(0, df = r )*0.9, 30 | bquote( mu ==.(0) ), 31 | cex = 1.5, 32 | pos = 2 ) 33 | 34 | # Label the plot with sigma^2 35 | text( 5, 36 | dt(0, df = r )*0.8, 37 | bquote( sigma^2 ==.(r/(r-2)) ), 38 | cex = 1.5, 39 | pos = 2 ) 40 | 41 | 42 | ################################################# 43 | # simulate xbar's 44 | 45 | xbar <- rowMeans( matrix(population(sample.size * N.iter, df = r), 46 | nrow = N.iter) 47 | ) 48 | 49 | # Find mean and variance of xbar 50 | xbar.mean <- round( mean( xbar ), 4) 51 | xbar.var <- round( var( xbar ), 4) 52 | 53 | # window for graph 54 | low <- xbar.mean - 3*sqrt(xbar.var) 55 | up <- xbar.mean + 3*sqrt(xbar.var) 56 | 57 | dev.new() 58 | dev.set(3) 59 | # Draw histogram of simulated x-bars 60 | hist( xbar, 61 | breaks = 280, 62 | xlim = c(low,up), 63 | xlab = "", 64 | prob = TRUE, 65 | main = "Sampling Distribution of X-bar", 66 | sub = "Click to see Limiting Normal Density (in red)") 67 | 68 | ######################################## 69 | # Label the histogram with mean(xbar) 70 | text( up, 71 | dnorm(xbar.mean, mean = xbar.mean, sd = sd(xbar)), 72 | bquote( mean(xbar)==.(xbar.mean) ), 73 | cex = 1, 74 | pos = 2 ) 75 | 76 | # Label the histogram with var(xbar) 77 | text( up, 78 | dnorm(xbar.mean, mean = xbar.mean, sd = sd(xbar))*0.9, 79 | bquote( var(xbar) ==.(xbar.var) ), 80 | cex = 1, 81 | pos = 2 ) 82 | 83 | # Label the histogram with n 84 | text( up, 85 | dnorm(xbar.mean, mean = xbar.mean, sd = sd(xbar))*0.8, 86 | bquote( n ==.(sample.size) ), 87 | cex = 1.85, 88 | pos = 2 ) 89 | 90 | ###################################### 91 | # Draw limiting Normal curve 92 | z <- locator( n = 1 ) 93 | g <- function(x) dnorm(x, mean = xbar.mean, sd = sd(xbar)) 94 | curve( g, 95 | lwd = 2, 96 | col = "red", 97 | add = TRUE ) 98 | } 99 | 100 | 101 | -------------------------------------------------------------------------------- /demo/clt2.R: -------------------------------------------------------------------------------- 1 | ################################################## 2 | # The Central Limit Theorem 3 | 4 | clt2 <- function(population = "runif", 5 | a = 0, 6 | b = 10, 7 | sample.size = 2, 8 | N.iter = 100000){ 9 | 10 | ################################################################# 11 | # initialize variables 12 | population <- get(population, mode = "function") 13 | xbar <- rep(0, N.iter) 14 | graphics.off() 15 | 16 | f <- function(x) dunif(x, min = a, max = b ) 17 | curve( f, 18 | xlim = c(a-1,b+1), ylim = c(0, 1.3/(b-a)), 19 | xlab = "Support Set", 20 | ylab = "Density", 21 | lwd = 2, 22 | main = "The Population Distribution \n (while we're waiting)" ) 23 | 24 | abline( h = 0 , col = "grey" ) 25 | 26 | 27 | ######################################## 28 | # Label the plot with mu 29 | text( (a+b)/2, 30 | 0.9/(b-a), 31 | bquote( mu ==.((a+b)/2) ), 32 | cex = 1.5, 33 | pos = 1 ) 34 | 35 | # Label the plot with sigma^2 36 | text( (a+b)/2, 37 | 0.8/(b-a), 38 | bquote( sigma^2 ==.( (b-a)^2/12 ) ), 39 | cex = 1.5, 40 | pos = 1 ) 41 | 42 | 43 | ############################################# 44 | # simulate xbar's 45 | xbar <-rowMeans(matrix(population(sample.size * N.iter, min = a, max = b), 46 | nrow = N.iter) 47 | ) 48 | 49 | # Find mean and variance of xbar 50 | xbar.mean <- round( mean( xbar ), 4) 51 | xbar.var <- round( var( xbar ), 4) 52 | 53 | # window for graph 54 | low <- xbar.mean - 3*sqrt(xbar.var) 55 | up <- xbar.mean + 3*sqrt(xbar.var) 56 | 57 | dev.new() 58 | dev.set(3) 59 | # Draw histogram of simulated x-bars 60 | hist( xbar, 61 | breaks = 80, 62 | xlim = c(low,up), 63 | xlab = "", 64 | prob = TRUE, 65 | main = "Sampling Distribution of X-bar", 66 | sub = "Click to see Limiting Normal Density (in red)") 67 | 68 | ######################################## 69 | # Label the histogram with mean(xbar) 70 | text( up, 71 | dnorm(xbar.mean, mean = xbar.mean, sd = sd(xbar)), 72 | bquote( mean(xbar)==.(xbar.mean) ), 73 | cex = 1, 74 | pos = 2 ) 75 | 76 | # Label the histogram with var(xbar) 77 | text( up, 78 | dnorm(xbar.mean, mean = xbar.mean, sd = sd(xbar))*0.9, 79 | bquote( var(xbar)==.(xbar.var) ), 80 | cex = 1, 81 | pos = 2 ) 82 | 83 | # Label the histogram with n 84 | text( up, 85 | dnorm(xbar.mean, mean = xbar.mean, sd = sd(xbar))*0.8, 86 | bquote( n ==.(sample.size) ), 87 | cex = 1.85, 88 | pos = 2 ) 89 | 90 | ###################################### 91 | # Draw limiting Normal curve 92 | z <- locator( n = 1 ) 93 | g <- function(x) dnorm(x, mean = xbar.mean, sd = sd(xbar)) 94 | curve( g, 95 | lwd = 2, 96 | col = "red", 97 | add = TRUE ) 98 | } 99 | 100 | -------------------------------------------------------------------------------- /demo/clt3.R: -------------------------------------------------------------------------------- 1 | ################################################## 2 | # The Central Limit Theorem 3 | 4 | 5 | clt3 <- function(population = "rgamma", 6 | alpha = 1.21, 7 | theta = 2.37, 8 | sample.size = 2, 9 | N.iter = 100000){ 10 | 11 | ################################################################# 12 | # initialize variables 13 | population <- get(population, mode = "function") 14 | xbar <- rep(0, N.iter) 15 | graphics.off() 16 | 17 | 18 | h <- function(x) dgamma(x, shape = alpha, scale = theta ) 19 | curve( h, 20 | xlim = c(0, alpha*theta*(1 + 3*theta)), 21 | xlab = "Support Set", 22 | ylab = "Density", 23 | lwd = 2, 24 | main = "The Population Distribution \n (while we're waiting)" ) 25 | abline( h = 0 , col = "grey" ) 26 | 27 | f <- function(x) dgamma(x, shape = alpha, scale = theta ) 28 | 29 | OPT <- optimize( f, 30 | interval = c(0, alpha*theta*(1 + 3*theta)), 31 | maximum = TRUE) 32 | 33 | ######################################## 34 | # Label the plot with mu 35 | text( alpha*theta*(1 + 2*theta), 36 | (OPT$objective)*0.9, 37 | bquote( mu ==.(alpha*theta )), 38 | cex = 1.5, 39 | pos = 1 ) 40 | 41 | # Label the plot with sigma^2 42 | text( alpha*theta*(1 + 2*theta), 43 | (OPT$objective)*0.8, 44 | bquote( sigma^2 ==.( alpha*theta^2 ) ), 45 | cex = 1.5, 46 | pos = 1 ) 47 | 48 | 49 | ############################################# 50 | # simulate xbar's 51 | xbar <- rowMeans(matrix(population(sample.size * N.iter, shape = alpha, scale = theta), 52 | nrow = N.iter) 53 | ) 54 | 55 | # Find mean and variance of xbar 56 | xbar.mean <- round( mean( xbar ), 4) 57 | xbar.var <- round( var( xbar ), 4) 58 | 59 | # window for graph 60 | low <- xbar.mean - 3*sqrt(xbar.var) 61 | up <- xbar.mean + 3*sqrt(xbar.var) 62 | 63 | dev.new() 64 | dev.set(3) 65 | # Draw histogram of simulated x-bars 66 | hist( xbar, 67 | breaks = 80, 68 | xlim = c(low,up), 69 | xlab = "", 70 | prob = TRUE, 71 | main = "Sampling Distribution of X-bar", 72 | sub = "Click to see Limiting Normal Density (in red)") 73 | 74 | ######################################## 75 | # Label the histogram with mean(xbar) 76 | text( up, 77 | dnorm(xbar.mean, mean = xbar.mean, sd = sd(xbar)), 78 | bquote( mean(xbar)==.(xbar.mean) ), 79 | cex = 1, 80 | pos = 2 ) 81 | 82 | # Label the histogram with var(xbar) 83 | text( up, 84 | dnorm(xbar.mean, mean = xbar.mean, sd = sd(xbar))*0.9, 85 | bquote( var(xbar)==.(xbar.var) ), 86 | cex = 1, 87 | pos = 2 ) 88 | 89 | # Label the histogram with n 90 | text( up, 91 | dnorm(xbar.mean, mean = xbar.mean, sd = sd(xbar))*0.8, 92 | bquote( n ==.(sample.size) ), 93 | cex = 1.85, 94 | pos = 2 ) 95 | 96 | ###################################### 97 | # Draw limiting Normal curve 98 | z = locator( n = 1 ) 99 | g <- function(x) dnorm(x, mean = xbar.mean, sd = sd(xbar)) 100 | curve( g, 101 | lwd = 2, 102 | col = "red", 103 | add = TRUE ) 104 | 105 | } 106 | -------------------------------------------------------------------------------- /R/plothtest.R: -------------------------------------------------------------------------------- 1 | # Last modified 2014-03-08 2 | # Original version in collaboration with Richard Heiberger 3 | 4 | #' @export 5 | plot.htest <- function (x, hypoth.or.conf = 'Hypoth',...) { 6 | if (x$method == "1-sample proportions test with continuity correction" || x$method == "1-sample proportions test without continuity correction"){ 7 | mu <- x$null.value 8 | obs.mean <- x$estimate 9 | n <- NA 10 | std.dev <- abs(obs.mean - mu)/sqrt(x$statistic) 11 | deg.freedom <- NA 12 | if(x$alternative == "two.sided") { 13 | alpha.right <- (1 - attr(x$conf.int, "conf.level"))/2 14 | Use.alpha.left <- TRUE 15 | Use.alpha.right <- TRUE 16 | } else if (x$alternative == "less") { 17 | alpha.right <- 1 - attr(x$conf.int, "conf.level") 18 | Use.alpha.left <- TRUE 19 | Use.alpha.right <- FALSE 20 | } else { 21 | alpha.right <- 1 - attr(x$conf.int, "conf.level") 22 | Use.alpha.left <- FALSE 23 | Use.alpha.right <- TRUE 24 | } 25 | } else if (x$method == "One Sample z-test") { 26 | mu <- x$null.value 27 | obs.mean <- x$estimate 28 | n <- x$parameter[1] 29 | std.dev <- x$parameter[2] 30 | deg.freedom <- NA 31 | if(x$alternative == "two.sided") { 32 | alpha.right <- (1 - attr(x$conf.int, "conf.level"))/2 33 | Use.alpha.left <- TRUE 34 | Use.alpha.right <- TRUE 35 | } else if (x$alternative == "less") { 36 | alpha.right <- 1 - attr(x$conf.int, "conf.level") 37 | Use.alpha.left <- TRUE 38 | Use.alpha.right <- FALSE 39 | } else { 40 | alpha.right <- 1 - attr(x$conf.int, "conf.level") 41 | Use.alpha.left <- FALSE 42 | Use.alpha.right <- TRUE 43 | } 44 | } else if (x$method == "One Sample t-test" || x$method == "Paired t-test"){ 45 | mu <- x$null.value 46 | obs.mean <- x$estimate 47 | n <- x$parameter + 1 48 | std.dev <- sqrt(n)*(x$estimate - mu)/x$statistic 49 | deg.freedom <- x$parameter 50 | if(x$alternative == "two.sided") { 51 | alpha.right <- (1 - attr(x$conf.int, "conf.level"))/2 52 | Use.alpha.left <- TRUE 53 | Use.alpha.right <- TRUE 54 | } else if (x$alternative == "less") { 55 | alpha.right <- 1 - attr(x$conf.int, "conf.level") 56 | Use.alpha.left <- TRUE 57 | Use.alpha.right <- FALSE 58 | } else { 59 | alpha.right <- 1 - attr(x$conf.int, "conf.level") 60 | Use.alpha.left <- FALSE 61 | Use.alpha.right <- TRUE 62 | } 63 | } else if (x$method == "Welch Two Sample t-test"){ 64 | mu <- x$null.value 65 | obs.mean <- -diff(x$estimate) 66 | n <- x$parameter + 2 67 | std.dev <- (obs.mean - mu)/x$statistic*sqrt(n) 68 | deg.freedom <- x$parameter 69 | if(x$alternative == "two.sided") { 70 | alpha.right <- (1 - attr(x$conf.int, "conf.level"))/2 71 | Use.alpha.left <- TRUE 72 | Use.alpha.right <- TRUE 73 | } else if (x$alternative == "less") { 74 | alpha.right <- 1 - attr(x$conf.int, "conf.level") 75 | Use.alpha.left <- TRUE 76 | Use.alpha.right <- FALSE 77 | } else { 78 | alpha.right <- 1 - attr(x$conf.int, "conf.level") 79 | Use.alpha.left <- FALSE 80 | Use.alpha.right <- TRUE 81 | } 82 | } else if (x$method == " Two Sample t-test") { 83 | mu <- x$null.value 84 | obs.mean <- -diff(x$estimate) 85 | n <- x$parameter + 2 86 | std.dev <- (obs.mean - mu)/x$statistic*sqrt(n) 87 | deg.freedom <- x$parameter 88 | if(x$alternative == "two.sided") { 89 | alpha.right <- (1 - attr(x$conf.int, "conf.level"))/2 90 | Use.alpha.left <- TRUE 91 | Use.alpha.right <- TRUE 92 | } else if (x$alternative == "less") { 93 | alpha.right <- 1 - attr(x$conf.int, "conf.level") 94 | Use.alpha.left <- TRUE 95 | Use.alpha.right <- FALSE 96 | } else { 97 | alpha.right <- 1 - attr(x$conf.int, "conf.level") 98 | Use.alpha.left <- FALSE 99 | Use.alpha.right <- TRUE 100 | } 101 | } 102 | 103 | HH::normal.and.t.dist(mu.H0 = mu, obs.mean = obs.mean, 104 | std.dev = std.dev, n = n, 105 | deg.freedom = deg.freedom, 106 | alpha.right = alpha.right, 107 | Use.obs.mean = TRUE, 108 | Use.alpha.left = Use.alpha.left, 109 | Use.alpha.right = Use.alpha.right, 110 | hypoth.or.conf = hypoth.or.conf) 111 | } 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /data/ED.R: -------------------------------------------------------------------------------- 1 | ED <- structure(list(model = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 2 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 3 | 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4 | 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 5 | 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 6 | 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 7 | 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 8 | 3L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 9 | 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 10 | 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 11 | 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("A", 12 | "B", "C"), class = "factor"), los = c(9.5, 3.7, 2.8, 14.6, 4.1, 13 | 6.3, 5.3, 1.9, 4.1, 3, 9, 9, 3.3, 2.8, 6, 5.5, 4.4, 2.7, 13, 14 | 2.2, 0.8, 6.4, 1.5, 2.8, 2.5, 2.6, 10.2, 2.8, 2.1, 7.8, 7, 7.5, 15 | 7.5, 4.5, 6.1, 11, 6.3, 6.9, 9.8, 2, 6.2, 2.5, 1.8, 6.6, 4.5, 16 | 1.9, 1.1, 1.3, 2.9, 9, 7.7, 2.6, 2.2, 1.4, 3.4, 7.6, 1.8, 1.7, 17 | 11.1, 3, 1.7, 4.5, 0.3, 7.4, 0.4, 7.9, 18.3, 4.3, 1.9, 2.5, 2, 18 | 4.1, 3.5, 1.3, 2, 2.7, 4.8, 9, 2.2, 5.6, 8.6, 3, 1, 1.8, 2.7, 19 | 4.2, 1.4, 1, 2.7, 3.3, 2.7, 4.8, 2, 6.7, 5.1, 0.8, 0.9, 0.7, 20 | 0.9, 0.9, 0.7, 0.7, 1, 4.3, 21.9, 5.5, 7, 4.1, 2.8, 2.3, 2.9, 21 | 2, 2.1, 3.2, 2.3, 2.4, 7.1, 5.6, 3.5, 4, 3.9, 3.9, 14.8, 2.5, 22 | 2.9, 3, 4.7, 10.4, 4, 7.5, 3.7, 9.5, 14.1, 3.3, 4.8, 5.8, 12.1, 23 | 19.6, 8.5, 5.4, 13.4, 3.7, 3.4, 12.9, 6, 2, 5.6, 4.7, 3.8, 6.9, 24 | 2.6, 8.5, 1.2, 3.3, 4.2, 10.3, 1.3, 4.5, 9, 4.4, 7.8, 7.3, 13.5, 25 | 2.1), age = c(40L, 50L, 85L, 61L, 85L, 56L, 71L, 58L, 76L, 51L, 26 | 95L, 82L, 86L, 79L, 86L, 72L, 78L, 70L, 60L, 70L, 36L, 42L, 49L, 27 | 42L, 65L, 65L, 63L, 77L, 52L, 66L, 57L, 70L, 68L, 89L, 34L, 82L, 28 | 65L, 70L, 42L, 92L, 65L, 81L, 56L, 95L, 60L, 87L, 52L, 59L, 56L, 29 | 76L, 57L, 65L, 59L, 49L, 60L, 64L, 54L, 90L, 61L, 86L, 56L, 63L, 30 | 35L, 57L, 66L, 65L, 69L, 72L, 59L, 73L, 61L, 81L, 58L, 53L, 83L, 31 | 60L, 82L, 61L, 64L, 68L, 70L, 82L, 69L, 60L, 55L, 51L, 65L, 84L, 32 | 52L, 58L, 57L, 89L, 58L, 55L, 64L, 70L, 50L, 44L, 43L, 54L, 90L, 33 | 77L, 70L, 56L, 77L, 51L, 55L, 88L, 76L, 63L, 86L, 81L, 65L, 94L, 34 | 84L, 72L, 89L, 65L, 62L, 85L, 62L, 70L, 65L, 76L, 83L, 63L, 75L, 35 | 30L, 61L, 56L, 83L, 69L, 69L, 71L, 33L, 77L, 72L, 75L, 73L, 71L, 36 | 60L, 55L, 84L, 45L, 76L, 56L, 44L, 45L, 98L, 77L, 85L, 72L, 65L, 37 | 78L, 62L, 33L, 47L, 50L, 63L, 78L, 92L, 88L, 60L, 67L), gender = structure(c(2L, 38 | 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 39 | 2L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 40 | 1L, 2L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 41 | 2L, 2L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 42 | 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 43 | 2L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, 1L, 1L, 2L, 1L, 44 | 2L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 45 | 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 46 | 1L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 47 | 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 48 | 1L, 1L, 2L), .Label = c("F", "M"), class = "factor"), cci = c(2L, 49 | 0L, 5L, 6L, 3L, 2L, 1L, 1L, 4L, 3L, 4L, 5L, 1L, 1L, 3L, 4L, 6L, 50 | 4L, 3L, 4L, 0L, 2L, 1L, 0L, 1L, 2L, 3L, 1L, 2L, 1L, 0L, 5L, 4L, 51 | 2L, 0L, 2L, 3L, 0L, 0L, 1L, 0L, 2L, 1L, 1L, 1L, 1L, 5L, 0L, 2L, 52 | 4L, 0L, 5L, 3L, 2L, 6L, 3L, 6L, 4L, 6L, 2L, 2L, 3L, 0L, 3L, 3L, 53 | 2L, 5L, 4L, 3L, 3L, 1L, 3L, 3L, 0L, 0L, 7L, 2L, 4L, 3L, 0L, 0L, 54 | 2L, 3L, 0L, 0L, 3L, 12L, 3L, 2L, 1L, 4L, 3L, 1L, 5L, 6L, 2L, 55 | 1L, 0L, 3L, 0L, 3L, 6L, 0L, 3L, 1L, 1L, 0L, 2L, 4L, 2L, 1L, 2L, 56 | 3L, 2L, 0L, 8L, 4L, 6L, 2L, 2L, 1L, 0L, 1L, 2L, 3L, 3L, 6L, 2L, 57 | 3L, 4L, 0L, 2L, 0L, 9L, 3L, 0L, 0L, 4L, 3L, 0L, 2L, 5L, 2L, 3L, 58 | 3L, 2L, 7L, 1L, 2L, 3L, 3L, 6L, 0L, 3L, 3L, 2L, 2L, 2L, 7L, 5L, 59 | 4L, 3L, 7L, 1L), LACE = c(10L, 7L, 13L, 19L, 10L, 13L, 8L, 8L, 60 | 10L, 9L, 17L, 15L, 8L, 7L, 12L, 16L, 14L, 11L, 11L, 10L, 7L, 61 | 9L, 3L, 6L, 7L, 8L, 12L, 7L, 8L, 9L, 9L, 10L, 10L, 10L, 7L, 10L, 62 | 13L, 8L, 8L, 6L, 4L, 5L, 6L, 10L, 5L, 8L, 9L, 4L, 11L, 14L, 8L, 63 | 12L, 11L, 6L, 13L, 11L, 11L, 10L, 10L, 5L, 11L, 8L, 3L, 9L, 6L, 64 | 11L, 12L, 9L, 9L, 7L, 6L, 10L, 10L, 8L, 5L, 12L, 9L, 10L, 9L, 65 | 7L, 8L, 8L, 7L, 5L, 6L, 11L, 6L, 7L, 9L, 7L, 15L, 14L, 7L, 15L, 66 | 12L, 2L, 5L, 3L, 10L, 3L, 7L, 10L, 4L, 8L, 11L, 8L, 12L, 9L, 67 | 12L, 10L, 8L, 9L, 8L, 12L, 2L, 11L, 12L, 12L, 6L, 9L, 8L, 9L, 68 | 11L, 8L, 9L, 9L, 15L, 10L, 10L, 11L, 8L, 7L, 10L, 15L, 14L, 4L, 69 | 11L, 18L, 8L, 7L, 11L, 15L, 6L, 12L, 13L, 11L, 16L, 8L, 12L, 70 | 12L, 11L, 17L, 5L, 9L, 10L, 12L, 7L, 10L, 14L, 13L, 15L, 11L, 71 | 15L, 6L), readmit = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 72 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 73 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 74 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 75 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 76 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 77 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 78 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 79 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 80 | 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 81 | 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("N", 82 | "Y"), class = "factor"), ED = structure(c(1L, 1L, 1L, 1L, 1L, 83 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 84 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 85 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 86 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 87 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 88 | 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 89 | 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 90 | 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 91 | 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 92 | 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("N", 93 | "Y"), class = "factor"), visit = c(FALSE, FALSE, FALSE, FALSE, 94 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 95 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 96 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 97 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 98 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 99 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 100 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 101 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 102 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 103 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 104 | FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 105 | FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, 106 | TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, 107 | TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, 108 | TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, 109 | TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, 110 | TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)), .Names = c("model", 111 | "los", "age", "gender", "cci", "LACE", "readmit", "ED", "visit" 112 | ), row.names = c(NA, -164L), class = "data.frame") -------------------------------------------------------------------------------- /.quarto/_freeze/site_libs/clipboard/clipboard.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * clipboard.js v2.0.10 3 | * https://clipboardjs.com/ 4 | * 5 | * Licensed MIT © Zeno Rocha 6 | */ 7 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1>_ 6 | 7 | Everyone is permitted to copy and distribute verbatim copies of this license 8 | document, but changing it is not allowed. 9 | 10 | ## Preamble 11 | 12 | The GNU General Public License is a free, copyleft license for software and other 13 | kinds of works. 14 | 15 | The licenses for most software and other practical works are designed to take away 16 | your freedom to share and change the works. By contrast, the GNU General Public 17 | License is intended to guarantee your freedom to share and change all versions of a 18 | program--to make sure it remains free software for all its users. We, the Free 19 | Software Foundation, use the GNU General Public License for most of our software; it 20 | applies also to any other work released this way by its authors. You can apply it to 21 | your programs, too. 22 | 23 | When we speak of free software, we are referring to freedom, not price. Our General 24 | Public Licenses are designed to make sure that you have the freedom to distribute 25 | copies of free software (and charge for them if you wish), that you receive source 26 | code or can get it if you want it, that you can change the software or use pieces of 27 | it in new free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you these rights or 30 | asking you to surrender the rights. Therefore, you have certain responsibilities if 31 | you distribute copies of the software, or if you modify it: responsibilities to 32 | respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether gratis or for a fee, 35 | you must pass on to the recipients the same freedoms that you received. You must make 36 | sure that they, too, receive or can get the source code. And you must show them these 37 | terms so they know their rights. 38 | 39 | Developers that use the GNU GPL protect your rights with two steps: **(1)** assert 40 | copyright on the software, and **(2)** offer you this License giving you legal permission 41 | to copy, distribute and/or modify it. 42 | 43 | For the developers' and authors' protection, the GPL clearly explains that there is 44 | no warranty for this free software. For both users' and authors' sake, the GPL 45 | requires that modified versions be marked as changed, so that their problems will not 46 | be attributed erroneously to authors of previous versions. 47 | 48 | Some devices are designed to deny users access to install or run modified versions of 49 | the software inside them, although the manufacturer can do so. This is fundamentally 50 | incompatible with the aim of protecting users' freedom to change the software. The 51 | systematic pattern of such abuse occurs in the area of products for individuals to 52 | use, which is precisely where it is most unacceptable. Therefore, we have designed 53 | this version of the GPL to prohibit the practice for those products. If such problems 54 | arise substantially in other domains, we stand ready to extend this provision to 55 | those domains in future versions of the GPL, as needed to protect the freedom of 56 | users. 57 | 58 | Finally, every program is threatened constantly by software patents. States should 59 | not allow patents to restrict development and use of software on general-purpose 60 | computers, but in those that do, we wish to avoid the special danger that patents 61 | applied to a free program could make it effectively proprietary. To prevent this, the 62 | GPL assures that patents cannot be used to render the program non-free. 63 | 64 | The precise terms and conditions for copying, distribution and modification follow. 65 | 66 | ## TERMS AND CONDITIONS 67 | 68 | ### 0. Definitions 69 | 70 | “This License” refers to version 3 of the GNU General Public License. 71 | 72 | “Copyright” also means copyright-like laws that apply to other kinds of 73 | works, such as semiconductor masks. 74 | 75 | “The Program” refers to any copyrightable work licensed under this 76 | License. Each licensee is addressed as “you”. “Licensees” and 77 | “recipients” may be individuals or organizations. 78 | 79 | To “modify” a work means to copy from or adapt all or part of the work in 80 | a fashion requiring copyright permission, other than the making of an exact copy. The 81 | resulting work is called a “modified version” of the earlier work or a 82 | work “based on” the earlier work. 83 | 84 | A “covered work” means either the unmodified Program or a work based on 85 | the Program. 86 | 87 | To “propagate” a work means to do anything with it that, without 88 | permission, would make you directly or secondarily liable for infringement under 89 | applicable copyright law, except executing it on a computer or modifying a private 90 | copy. Propagation includes copying, distribution (with or without modification), 91 | making available to the public, and in some countries other activities as well. 92 | 93 | To “convey” a work means any kind of propagation that enables other 94 | parties to make or receive copies. Mere interaction with a user through a computer 95 | network, with no transfer of a copy, is not conveying. 96 | 97 | An interactive user interface displays “Appropriate Legal Notices” to the 98 | extent that it includes a convenient and prominently visible feature that **(1)** 99 | displays an appropriate copyright notice, and **(2)** tells the user that there is no 100 | warranty for the work (except to the extent that warranties are provided), that 101 | licensees may convey the work under this License, and how to view a copy of this 102 | License. If the interface presents a list of user commands or options, such as a 103 | menu, a prominent item in the list meets this criterion. 104 | 105 | ### 1. Source Code 106 | 107 | The “source code” for a work means the preferred form of the work for 108 | making modifications to it. “Object code” means any non-source form of a 109 | work. 110 | 111 | A “Standard Interface” means an interface that either is an official 112 | standard defined by a recognized standards body, or, in the case of interfaces 113 | specified for a particular programming language, one that is widely used among 114 | developers working in that language. 115 | 116 | The “System Libraries” of an executable work include anything, other than 117 | the work as a whole, that **(a)** is included in the normal form of packaging a Major 118 | Component, but which is not part of that Major Component, and **(b)** serves only to 119 | enable use of the work with that Major Component, or to implement a Standard 120 | Interface for which an implementation is available to the public in source code form. 121 | A “Major Component”, in this context, means a major essential component 122 | (kernel, window system, and so on) of the specific operating system (if any) on which 123 | the executable work runs, or a compiler used to produce the work, or an object code 124 | interpreter used to run it. 125 | 126 | The “Corresponding Source” for a work in object code form means all the 127 | source code needed to generate, install, and (for an executable work) run the object 128 | code and to modify the work, including scripts to control those activities. However, 129 | it does not include the work's System Libraries, or general-purpose tools or 130 | generally available free programs which are used unmodified in performing those 131 | activities but which are not part of the work. For example, Corresponding Source 132 | includes interface definition files associated with source files for the work, and 133 | the source code for shared libraries and dynamically linked subprograms that the work 134 | is specifically designed to require, such as by intimate data communication or 135 | control flow between those subprograms and other parts of the work. 136 | 137 | The Corresponding Source need not include anything that users can regenerate 138 | automatically from other parts of the Corresponding Source. 139 | 140 | The Corresponding Source for a work in source code form is that same work. 141 | 142 | ### 2. Basic Permissions 143 | 144 | All rights granted under this License are granted for the term of copyright on the 145 | Program, and are irrevocable provided the stated conditions are met. This License 146 | explicitly affirms your unlimited permission to run the unmodified Program. The 147 | output from running a covered work is covered by this License only if the output, 148 | given its content, constitutes a covered work. This License acknowledges your rights 149 | of fair use or other equivalent, as provided by copyright law. 150 | 151 | You may make, run and propagate covered works that you do not convey, without 152 | conditions so long as your license otherwise remains in force. You may convey covered 153 | works to others for the sole purpose of having them make modifications exclusively 154 | for you, or provide you with facilities for running those works, provided that you 155 | comply with the terms of this License in conveying all material for which you do not 156 | control copyright. Those thus making or running the covered works for you must do so 157 | exclusively on your behalf, under your direction and control, on terms that prohibit 158 | them from making any copies of your copyrighted material outside their relationship 159 | with you. 160 | 161 | Conveying under any other circumstances is permitted solely under the conditions 162 | stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 163 | 164 | ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law 165 | 166 | No covered work shall be deemed part of an effective technological measure under any 167 | applicable law fulfilling obligations under article 11 of the WIPO copyright treaty 168 | adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention 169 | of such measures. 170 | 171 | When you convey a covered work, you waive any legal power to forbid circumvention of 172 | technological measures to the extent such circumvention is effected by exercising 173 | rights under this License with respect to the covered work, and you disclaim any 174 | intention to limit operation or modification of the work as a means of enforcing, 175 | against the work's users, your or third parties' legal rights to forbid circumvention 176 | of technological measures. 177 | 178 | ### 4. Conveying Verbatim Copies 179 | 180 | You may convey verbatim copies of the Program's source code as you receive it, in any 181 | medium, provided that you conspicuously and appropriately publish on each copy an 182 | appropriate copyright notice; keep intact all notices stating that this License and 183 | any non-permissive terms added in accord with section 7 apply to the code; keep 184 | intact all notices of the absence of any warranty; and give all recipients a copy of 185 | this License along with the Program. 186 | 187 | You may charge any price or no price for each copy that you convey, and you may offer 188 | support or warranty protection for a fee. 189 | 190 | ### 5. Conveying Modified Source Versions 191 | 192 | You may convey a work based on the Program, or the modifications to produce it from 193 | the Program, in the form of source code under the terms of section 4, provided that 194 | you also meet all of these conditions: 195 | 196 | * **a)** The work must carry prominent notices stating that you modified it, and giving a 197 | relevant date. 198 | * **b)** The work must carry prominent notices stating that it is released under this 199 | License and any conditions added under section 7. This requirement modifies the 200 | requirement in section 4 to “keep intact all notices”. 201 | * **c)** You must license the entire work, as a whole, under this License to anyone who 202 | comes into possession of a copy. This License will therefore apply, along with any 203 | applicable section 7 additional terms, to the whole of the work, and all its parts, 204 | regardless of how they are packaged. This License gives no permission to license the 205 | work in any other way, but it does not invalidate such permission if you have 206 | separately received it. 207 | * **d)** If the work has interactive user interfaces, each must display Appropriate Legal 208 | Notices; however, if the Program has interactive interfaces that do not display 209 | Appropriate Legal Notices, your work need not make them do so. 210 | 211 | A compilation of a covered work with other separate and independent works, which are 212 | not by their nature extensions of the covered work, and which are not combined with 213 | it such as to form a larger program, in or on a volume of a storage or distribution 214 | medium, is called an “aggregate” if the compilation and its resulting 215 | copyright are not used to limit the access or legal rights of the compilation's users 216 | beyond what the individual works permit. Inclusion of a covered work in an aggregate 217 | does not cause this License to apply to the other parts of the aggregate. 218 | 219 | ### 6. Conveying Non-Source Forms 220 | 221 | You may convey a covered work in object code form under the terms of sections 4 and 222 | 5, provided that you also convey the machine-readable Corresponding Source under the 223 | terms of this License, in one of these ways: 224 | 225 | * **a)** Convey the object code in, or embodied in, a physical product (including a 226 | physical distribution medium), accompanied by the Corresponding Source fixed on a 227 | durable physical medium customarily used for software interchange. 228 | * **b)** Convey the object code in, or embodied in, a physical product (including a 229 | physical distribution medium), accompanied by a written offer, valid for at least 230 | three years and valid for as long as you offer spare parts or customer support for 231 | that product model, to give anyone who possesses the object code either **(1)** a copy of 232 | the Corresponding Source for all the software in the product that is covered by this 233 | License, on a durable physical medium customarily used for software interchange, for 234 | a price no more than your reasonable cost of physically performing this conveying of 235 | source, or **(2)** access to copy the Corresponding Source from a network server at no 236 | charge. 237 | * **c)** Convey individual copies of the object code with a copy of the written offer to 238 | provide the Corresponding Source. This alternative is allowed only occasionally and 239 | noncommercially, and only if you received the object code with such an offer, in 240 | accord with subsection 6b. 241 | * **d)** Convey the object code by offering access from a designated place (gratis or for 242 | a charge), and offer equivalent access to the Corresponding Source in the same way 243 | through the same place at no further charge. You need not require recipients to copy 244 | the Corresponding Source along with the object code. If the place to copy the object 245 | code is a network server, the Corresponding Source may be on a different server 246 | (operated by you or a third party) that supports equivalent copying facilities, 247 | provided you maintain clear directions next to the object code saying where to find 248 | the Corresponding Source. Regardless of what server hosts the Corresponding Source, 249 | you remain obligated to ensure that it is available for as long as needed to satisfy 250 | these requirements. 251 | * **e)** Convey the object code using peer-to-peer transmission, provided you inform 252 | other peers where the object code and Corresponding Source of the work are being 253 | offered to the general public at no charge under subsection 6d. 254 | 255 | A separable portion of the object code, whose source code is excluded from the 256 | Corresponding Source as a System Library, need not be included in conveying the 257 | object code work. 258 | 259 | A “User Product” is either **(1)** a “consumer product”, which 260 | means any tangible personal property which is normally used for personal, family, or 261 | household purposes, or **(2)** anything designed or sold for incorporation into a 262 | dwelling. In determining whether a product is a consumer product, doubtful cases 263 | shall be resolved in favor of coverage. For a particular product received by a 264 | particular user, “normally used” refers to a typical or common use of 265 | that class of product, regardless of the status of the particular user or of the way 266 | in which the particular user actually uses, or expects or is expected to use, the 267 | product. A product is a consumer product regardless of whether the product has 268 | substantial commercial, industrial or non-consumer uses, unless such uses represent 269 | the only significant mode of use of the product. 270 | 271 | “Installation Information” for a User Product means any methods, 272 | procedures, authorization keys, or other information required to install and execute 273 | modified versions of a covered work in that User Product from a modified version of 274 | its Corresponding Source. The information must suffice to ensure that the continued 275 | functioning of the modified object code is in no case prevented or interfered with 276 | solely because modification has been made. 277 | 278 | If you convey an object code work under this section in, or with, or specifically for 279 | use in, a User Product, and the conveying occurs as part of a transaction in which 280 | the right of possession and use of the User Product is transferred to the recipient 281 | in perpetuity or for a fixed term (regardless of how the transaction is 282 | characterized), the Corresponding Source conveyed under this section must be 283 | accompanied by the Installation Information. But this requirement does not apply if 284 | neither you nor any third party retains the ability to install modified object code 285 | on the User Product (for example, the work has been installed in ROM). 286 | 287 | The requirement to provide Installation Information does not include a requirement to 288 | continue to provide support service, warranty, or updates for a work that has been 289 | modified or installed by the recipient, or for the User Product in which it has been 290 | modified or installed. Access to a network may be denied when the modification itself 291 | materially and adversely affects the operation of the network or violates the rules 292 | and protocols for communication across the network. 293 | 294 | Corresponding Source conveyed, and Installation Information provided, in accord with 295 | this section must be in a format that is publicly documented (and with an 296 | implementation available to the public in source code form), and must require no 297 | special password or key for unpacking, reading or copying. 298 | 299 | ### 7. Additional Terms 300 | 301 | “Additional permissions” are terms that supplement the terms of this 302 | License by making exceptions from one or more of its conditions. Additional 303 | permissions that are applicable to the entire Program shall be treated as though they 304 | were included in this License, to the extent that they are valid under applicable 305 | law. If additional permissions apply only to part of the Program, that part may be 306 | used separately under those permissions, but the entire Program remains governed by 307 | this License without regard to the additional permissions. 308 | 309 | When you convey a copy of a covered work, you may at your option remove any 310 | additional permissions from that copy, or from any part of it. (Additional 311 | permissions may be written to require their own removal in certain cases when you 312 | modify the work.) You may place additional permissions on material, added by you to a 313 | covered work, for which you have or can give appropriate copyright permission. 314 | 315 | Notwithstanding any other provision of this License, for material you add to a 316 | covered work, you may (if authorized by the copyright holders of that material) 317 | supplement the terms of this License with terms: 318 | 319 | * **a)** Disclaiming warranty or limiting liability differently from the terms of 320 | sections 15 and 16 of this License; or 321 | * **b)** Requiring preservation of specified reasonable legal notices or author 322 | attributions in that material or in the Appropriate Legal Notices displayed by works 323 | containing it; or 324 | * **c)** Prohibiting misrepresentation of the origin of that material, or requiring that 325 | modified versions of such material be marked in reasonable ways as different from the 326 | original version; or 327 | * **d)** Limiting the use for publicity purposes of names of licensors or authors of the 328 | material; or 329 | * **e)** Declining to grant rights under trademark law for use of some trade names, 330 | trademarks, or service marks; or 331 | * **f)** Requiring indemnification of licensors and authors of that material by anyone 332 | who conveys the material (or modified versions of it) with contractual assumptions of 333 | liability to the recipient, for any liability that these contractual assumptions 334 | directly impose on those licensors and authors. 335 | 336 | All other non-permissive additional terms are considered “further 337 | restrictions” within the meaning of section 10. If the Program as you received 338 | it, or any part of it, contains a notice stating that it is governed by this License 339 | along with a term that is a further restriction, you may remove that term. If a 340 | license document contains a further restriction but permits relicensing or conveying 341 | under this License, you may add to a covered work material governed by the terms of 342 | that license document, provided that the further restriction does not survive such 343 | relicensing or conveying. 344 | 345 | If you add terms to a covered work in accord with this section, you must place, in 346 | the relevant source files, a statement of the additional terms that apply to those 347 | files, or a notice indicating where to find the applicable terms. 348 | 349 | Additional terms, permissive or non-permissive, may be stated in the form of a 350 | separately written license, or stated as exceptions; the above requirements apply 351 | either way. 352 | 353 | ### 8. Termination 354 | 355 | You may not propagate or modify a covered work except as expressly provided under 356 | this License. Any attempt otherwise to propagate or modify it is void, and will 357 | automatically terminate your rights under this License (including any patent licenses 358 | granted under the third paragraph of section 11). 359 | 360 | However, if you cease all violation of this License, then your license from a 361 | particular copyright holder is reinstated **(a)** provisionally, unless and until the 362 | copyright holder explicitly and finally terminates your license, and **(b)** permanently, 363 | if the copyright holder fails to notify you of the violation by some reasonable means 364 | prior to 60 days after the cessation. 365 | 366 | Moreover, your license from a particular copyright holder is reinstated permanently 367 | if the copyright holder notifies you of the violation by some reasonable means, this 368 | is the first time you have received notice of violation of this License (for any 369 | work) from that copyright holder, and you cure the violation prior to 30 days after 370 | your receipt of the notice. 371 | 372 | Termination of your rights under this section does not terminate the licenses of 373 | parties who have received copies or rights from you under this License. If your 374 | rights have been terminated and not permanently reinstated, you do not qualify to 375 | receive new licenses for the same material under section 10. 376 | 377 | ### 9. Acceptance Not Required for Having Copies 378 | 379 | You are not required to accept this License in order to receive or run a copy of the 380 | Program. Ancillary propagation of a covered work occurring solely as a consequence of 381 | using peer-to-peer transmission to receive a copy likewise does not require 382 | acceptance. However, nothing other than this License grants you permission to 383 | propagate or modify any covered work. These actions infringe copyright if you do not 384 | accept this License. Therefore, by modifying or propagating a covered work, you 385 | indicate your acceptance of this License to do so. 386 | 387 | ### 10. Automatic Licensing of Downstream Recipients 388 | 389 | Each time you convey a covered work, the recipient automatically receives a license 390 | from the original licensors, to run, modify and propagate that work, subject to this 391 | License. You are not responsible for enforcing compliance by third parties with this 392 | License. 393 | 394 | An “entity transaction” is a transaction transferring control of an 395 | organization, or substantially all assets of one, or subdividing an organization, or 396 | merging organizations. If propagation of a covered work results from an entity 397 | transaction, each party to that transaction who receives a copy of the work also 398 | receives whatever licenses to the work the party's predecessor in interest had or 399 | could give under the previous paragraph, plus a right to possession of the 400 | Corresponding Source of the work from the predecessor in interest, if the predecessor 401 | has it or can get it with reasonable efforts. 402 | 403 | You may not impose any further restrictions on the exercise of the rights granted or 404 | affirmed under this License. For example, you may not impose a license fee, royalty, 405 | or other charge for exercise of rights granted under this License, and you may not 406 | initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging 407 | that any patent claim is infringed by making, using, selling, offering for sale, or 408 | importing the Program or any portion of it. 409 | 410 | ### 11. Patents 411 | 412 | A “contributor” is a copyright holder who authorizes use under this 413 | License of the Program or a work on which the Program is based. The work thus 414 | licensed is called the contributor's “contributor version”. 415 | 416 | A contributor's “essential patent claims” are all patent claims owned or 417 | controlled by the contributor, whether already acquired or hereafter acquired, that 418 | would be infringed by some manner, permitted by this License, of making, using, or 419 | selling its contributor version, but do not include claims that would be infringed 420 | only as a consequence of further modification of the contributor version. For 421 | purposes of this definition, “control” includes the right to grant patent 422 | sublicenses in a manner consistent with the requirements of this License. 423 | 424 | Each contributor grants you a non-exclusive, worldwide, royalty-free patent license 425 | under the contributor's essential patent claims, to make, use, sell, offer for sale, 426 | import and otherwise run, modify and propagate the contents of its contributor 427 | version. 428 | 429 | In the following three paragraphs, a “patent license” is any express 430 | agreement or commitment, however denominated, not to enforce a patent (such as an 431 | express permission to practice a patent or covenant not to sue for patent 432 | infringement). To “grant” such a patent license to a party means to make 433 | such an agreement or commitment not to enforce a patent against the party. 434 | 435 | If you convey a covered work, knowingly relying on a patent license, and the 436 | Corresponding Source of the work is not available for anyone to copy, free of charge 437 | and under the terms of this License, through a publicly available network server or 438 | other readily accessible means, then you must either **(1)** cause the Corresponding 439 | Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the 440 | patent license for this particular work, or **(3)** arrange, in a manner consistent with 441 | the requirements of this License, to extend the patent license to downstream 442 | recipients. “Knowingly relying” means you have actual knowledge that, but 443 | for the patent license, your conveying the covered work in a country, or your 444 | recipient's use of the covered work in a country, would infringe one or more 445 | identifiable patents in that country that you have reason to believe are valid. 446 | 447 | If, pursuant to or in connection with a single transaction or arrangement, you 448 | convey, or propagate by procuring conveyance of, a covered work, and grant a patent 449 | license to some of the parties receiving the covered work authorizing them to use, 450 | propagate, modify or convey a specific copy of the covered work, then the patent 451 | license you grant is automatically extended to all recipients of the covered work and 452 | works based on it. 453 | 454 | A patent license is “discriminatory” if it does not include within the 455 | scope of its coverage, prohibits the exercise of, or is conditioned on the 456 | non-exercise of one or more of the rights that are specifically granted under this 457 | License. You may not convey a covered work if you are a party to an arrangement with 458 | a third party that is in the business of distributing software, under which you make 459 | payment to the third party based on the extent of your activity of conveying the 460 | work, and under which the third party grants, to any of the parties who would receive 461 | the covered work from you, a discriminatory patent license **(a)** in connection with 462 | copies of the covered work conveyed by you (or copies made from those copies), or **(b)** 463 | primarily for and in connection with specific products or compilations that contain 464 | the covered work, unless you entered into that arrangement, or that patent license 465 | was granted, prior to 28 March 2007. 466 | 467 | Nothing in this License shall be construed as excluding or limiting any implied 468 | license or other defenses to infringement that may otherwise be available to you 469 | under applicable patent law. 470 | 471 | ### 12. No Surrender of Others' Freedom 472 | 473 | If conditions are imposed on you (whether by court order, agreement or otherwise) 474 | that contradict the conditions of this License, they do not excuse you from the 475 | conditions of this License. If you cannot convey a covered work so as to satisfy 476 | simultaneously your obligations under this License and any other pertinent 477 | obligations, then as a consequence you may not convey it at all. For example, if you 478 | agree to terms that obligate you to collect a royalty for further conveying from 479 | those to whom you convey the Program, the only way you could satisfy both those terms 480 | and this License would be to refrain entirely from conveying the Program. 481 | 482 | ### 13. Use with the GNU Affero General Public License 483 | 484 | Notwithstanding any other provision of this License, you have permission to link or 485 | combine any covered work with a work licensed under version 3 of the GNU Affero 486 | General Public License into a single combined work, and to convey the resulting work. 487 | The terms of this License will continue to apply to the part which is the covered 488 | work, but the special requirements of the GNU Affero General Public License, section 489 | 13, concerning interaction through a network will apply to the combination as such. 490 | 491 | ### 14. Revised Versions of this License 492 | 493 | The Free Software Foundation may publish revised and/or new versions of the GNU 494 | General Public License from time to time. Such new versions will be similar in spirit 495 | to the present version, but may differ in detail to address new problems or concerns. 496 | 497 | Each version is given a distinguishing version number. If the Program specifies that 498 | a certain numbered version of the GNU General Public License “or any later 499 | version” applies to it, you have the option of following the terms and 500 | conditions either of that numbered version or of any later version published by the 501 | Free Software Foundation. If the Program does not specify a version number of the GNU 502 | General Public License, you may choose any version ever published by the Free 503 | Software Foundation. 504 | 505 | If the Program specifies that a proxy can decide which future versions of the GNU 506 | General Public License can be used, that proxy's public statement of acceptance of a 507 | version permanently authorizes you to choose that version for the Program. 508 | 509 | Later license versions may give you additional or different permissions. However, no 510 | additional obligations are imposed on any author or copyright holder as a result of 511 | your choosing to follow a later version. 512 | 513 | ### 15. Disclaimer of Warranty 514 | 515 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 516 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 517 | PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER 518 | EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 519 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE 520 | QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE 521 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 522 | 523 | ### 16. Limitation of Liability 524 | 525 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY 526 | COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS 527 | PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, 528 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 529 | PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE 530 | OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE 531 | WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 532 | POSSIBILITY OF SUCH DAMAGES. 533 | 534 | ### 17. Interpretation of Sections 15 and 16 535 | 536 | If the disclaimer of warranty and limitation of liability provided above cannot be 537 | given local legal effect according to their terms, reviewing courts shall apply local 538 | law that most closely approximates an absolute waiver of all civil liability in 539 | connection with the Program, unless a warranty or assumption of liability accompanies 540 | a copy of the Program in return for a fee. 541 | 542 | _END OF TERMS AND CONDITIONS_ 543 | 544 | ## How to Apply These Terms to Your New Programs 545 | 546 | If you develop a new program, and you want it to be of the greatest possible use to 547 | the public, the best way to achieve this is to make it free software which everyone 548 | can redistribute and change under these terms. 549 | 550 | To do so, attach the following notices to the program. It is safest to attach them 551 | to the start of each source file to most effectively state the exclusion of warranty; 552 | and each file should have at least the “copyright” line and a pointer to 553 | where the full notice is found. 554 | 555 | 556 | Copyright (C) 557 | 558 | This program is free software: you can redistribute it and/or modify 559 | it under the terms of the GNU General Public License as published by 560 | the Free Software Foundation, either version 3 of the License, or 561 | (at your option) any later version. 562 | 563 | This program is distributed in the hope that it will be useful, 564 | but WITHOUT ANY WARRANTY; without even the implied warranty of 565 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 566 | GNU General Public License for more details. 567 | 568 | You should have received a copy of the GNU General Public License 569 | along with this program. If not, see . 570 | 571 | Also add information on how to contact you by electronic and paper mail. 572 | 573 | If the program does terminal interaction, make it output a short notice like this 574 | when it starts in an interactive mode: 575 | 576 | Copyright (C) 577 | This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. 578 | This is free software, and you are welcome to redistribute it 579 | under certain conditions; type 'show c' for details. 580 | 581 | The hypothetical commands `show w` and `show c` should show the appropriate parts of 582 | the General Public License. Of course, your program's commands might be different; 583 | for a GUI interface, you would use an “about box”. 584 | 585 | You should also get your employer (if you work as a programmer) or school, if any, to 586 | sign a “copyright disclaimer” for the program, if necessary. For more 587 | information on this, and how to apply and follow the GNU GPL, see 588 | <>. 589 | 590 | The GNU General Public License does not permit incorporating your program into 591 | proprietary programs. If your program is a subroutine library, you may consider it 592 | more useful to permit linking proprietary applications with the library. If this is 593 | what you want to do, use the GNU Lesser General Public License instead of this 594 | License. But first, please read 595 | <>. 596 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------