## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  warning = FALSE,
  message = FALSE,
  fig.width = 10,
  fig.height = 7
)

## ----installation, eval=FALSE-------------------------------------------------
# install.packages(
#   "TH_1.0.0.tar.gz",
#   repos = NULL,
#   type = "source"
# )

## ----loading------------------------------------------------------------------
library(TH)
packageVersion("TH")

## ----package-help, eval=FALSE-------------------------------------------------
# help(package = "TH")

## ----example-tz1, fig.show="hold"---------------------------------------------
X <- c(52, 49, 51, 50, 53, 54, 48, 52, 51, 50)
tz1(X, mp = 50, vp = 4, alfa = 0.05, Ha = 1, unidade = " units")

## ----example-tz2, fig.show="hide"---------------------------------------------
X <- c(15, 16, 14, 17, 15, 16, 14, 15)
Y <- c(11, 12, 13, 10, 12, 11, 13, 12)
tz2(X, Y, vpX = 4, vpY = 4, alfa = 0.05, Ha = 2, plot = FALSE)

## ----example-tt1, fig.show="hide"---------------------------------------------
X <- c(11, 12, 13, 12, 14, 13, 12, 15)
tt1(X, mp = 10, alfa = 0.05, Ha = 2, unidade = " units", plot = FALSE)

## ----example-tt2i, fig.show="hide"--------------------------------------------
X <- c(18, 20, 19, 21, 22, 20)
Y <- c(14, 15, 16, 15, 14, 16)
tt2i(X, Y, alfa = 0.05, Ha = 1, plot = FALSE)

## ----example-tt2d, fig.show="hide"--------------------------------------------
X <- c(20, 21, 19, 22, 18, 20)
Y <- c(10, 15, 5, 20, 0, 10)
tt2d(X, Y, alfa = 0.05, Ha = 2, plot = FALSE)

## ----example-tt2p, fig.show="hide"--------------------------------------------
before <- c(70, 72, 68, 75, 74, 71, 69, 73)
after <- c(66, 69, 65, 71, 70, 68, 66, 69)
tt2p(before, after, mpD = 0, alfa = 0.05, Ha = 3, unidade = " units", plot = FALSE)

## ----example-tf2, fig.show="hide"---------------------------------------------
X <- c(8, 12, 16, 20, 24, 28)
Y <- c(14, 15, 14, 15, 14, 15)
tf2(X, Y, alfa = 0.05, Ha = 2, plot = FALSE)

## ----example-tq2a, fig.show="hide"--------------------------------------------
categories <- c(rep("A", 50), rep("B", 30), rep("C", 20))
tq2a(categories, p = c(1, 1, 1), alfa = 0.05, Ha = 2, r = 0, plot = FALSE)

## ----example-tq2i, fig.show="hide"--------------------------------------------
FO <- matrix(c(30, 10, 5, 10, 25, 20), nrow = 2, byrow = TRUE)
tq2i(NULL, NULL, FO = FO, alfa = 0.05, Ha = 2, r = 0, plot = FALSE)

## ----example-tq2h, fig.show="hide"--------------------------------------------
FO <- matrix(c(30, 15, 5, 10, 25, 15, 20, 20, 10), nrow = 3, byrow = TRUE)
tq2h(NULL, NULL, FO = FO, alfa = 0.05, Ha = 2, r = 0, plot = FALSE)

## ----help-citation, eval=FALSE------------------------------------------------
# ?tz1
# citation("TH")
# browseVignettes("TH")

## ----session-information------------------------------------------------------
sessionInfo()

