diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index 3243e41..0000000
Binary files a/.DS_Store and /dev/null differ
diff --git a/.Rbuildignore b/.Rbuildignore
index 750a2f0..29263f2 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -1,10 +1,7 @@
^writR\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
-^README\.html$
^README\.Rmd$
-README_files
-testing
docs
^_pkgdown\.yml$
^docs$
diff --git a/README.Rmd b/README.Rmd
index be57fab..f90eccf 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -17,7 +17,7 @@ knitr::opts_chunk$set(
)
```
- writR
+ writR
==================================================================
@@ -486,7 +486,6 @@ print(result)
lablr(result)
```
-
## Dependencies
The package writR is standing on the shoulders of giants. `writR` depends on the following packages:
@@ -499,12 +498,6 @@ deepdep::plot_dependencies('writR', local = TRUE, depth = 3)
I would like to thank to developers of `statsExpressions` and `ggstatsplot` for being an inspiration for this package. Naturally this package is in its first steps, but I hope that future collaborative work can expand the potential of this package.
-## Contact
-
-For collaborations or anything else, you can send me an email at:
-
-- matcasti\@umag.cl
-
## Citation
To cite package 'writR' in publications run the following code in your `R` console:
diff --git a/README.md b/README.md
index 5aee656..67c80ff 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-# writR
+# writR
@@ -659,12 +659,6 @@ I would like to thank to developers of `statsExpressions` and
package is in its first steps, but I hope that future collaborative work
can expand the potential of this package.
-## Contact
-
-For collaborations or anything else, you can send me an email at:
-
-- matcasti@umag.cl
-
## Citation
To cite package ‘writR’ in publications run the following code in your
diff --git a/README_files/.DS_Store b/README_files/.DS_Store
deleted file mode 100644
index 5008ddf..0000000
Binary files a/README_files/.DS_Store and /dev/null differ
diff --git a/README_files/figure-gfm/unnamed-chunk-15-1.svg b/README_files/figure-gfm/unnamed-chunk-15-1.svg
deleted file mode 100644
index cf17a9f..0000000
--- a/README_files/figure-gfm/unnamed-chunk-15-1.svg
+++ /dev/null
@@ -1,717 +0,0 @@
-
-
diff --git a/README_files/figure-html/unnamed-chunk-15-1.svg b/README_files/figure-html/unnamed-chunk-15-1.svg
deleted file mode 100644
index 4a9a751..0000000
--- a/README_files/figure-html/unnamed-chunk-15-1.svg
+++ /dev/null
@@ -1,695 +0,0 @@
-
-
diff --git a/README_files/figure-html/unnamed-chunk-7-1.svg b/README_files/figure-html/unnamed-chunk-7-1.svg
deleted file mode 100644
index de02f0f..0000000
--- a/README_files/figure-html/unnamed-chunk-7-1.svg
+++ /dev/null
@@ -1,1513 +0,0 @@
-
-
diff --git a/logo.png b/logo.png
deleted file mode 100644
index 028b810..0000000
Binary files a/logo.png and /dev/null differ
diff --git a/man/figures/README-unnamed-chunk-15-1.png b/man/figures/README-unnamed-chunk-15-1.png
index 7519bfe..4c90fb1 100644
Binary files a/man/figures/README-unnamed-chunk-15-1.png and b/man/figures/README-unnamed-chunk-15-1.png differ
diff --git a/README_files/logo.png b/man/figures/logo.png
similarity index 100%
rename from README_files/logo.png
rename to man/figures/logo.png
diff --git a/testing/contingency.R b/testing/contingency.R
deleted file mode 100644
index 2fccbd5..0000000
--- a/testing/contingency.R
+++ /dev/null
@@ -1,76 +0,0 @@
-# Unit testing
-
-# Load data
-data <- readRDS(file = "~/Documents/R/WD/IND/data/swim.RDS")
-
-# Load libraries
-library(writR)
-
-# One way
-
-## Fisher's exact test
-contingency(data, "Sexo", exact = TRUE) # Should throw an error
-
-## Mcnemar's test
-contingency(data, "Sexo", paired = TRUE) # Should throw an error
-
-## Goodness-of-fit Chi-square test
-a <- contingency(data, "Sexo")
-print(a)
-lablr(a)
-
-a. <- table(data$Sexo) |> chisq.test()
-
-a$p.value == a.$p.value # TRUE
-
-# Two way 2 x 2
-
-## Fisher's exact test
-b <- contingency(data, "Sexo", "cat_Edad", exact = TRUE)
-print(b)
-lablr(b)
-
-b. <- table(data$Sexo, data$cat_Edad) |> fisher.test()
-
-b$p.value == b.$p.value # TRUE
-
-## Mcnemar's test
-c <- contingency(data, "Sexo", "cat_Edad", paired = TRUE)
-print(c)
-lablr(c)
-
-c. <- table(data$Sexo, data$cat_Edad) |> mcnemar.test()
-
-c$p.value == c.$p.value # TRUE
-
-## Person's Chi-square test
-d <- contingency(data, "Sexo", "cat_Edad")
-print(d)
-lablr(d)
-
-d. <- table(data$Sexo, data$cat_Edad) |> chisq.test()
-
-d$p.value == d.$p.value # TRUE
-
-# Two way 5 x 3
-
-## Fisher's exact test
-e <- contingency(data, "Periodo", "cat_Edad", exact = TRUE)
-print(e)
-lablr(e)
-
-e. <- table(data$Periodo, data$cat_Edad) |> fisher.test()
-
-e$p.value == e.$p.value # TRUE
-
-## Mcnemar's test
-contingency(data, "Periodo", "cat_Edad", paired = TRUE) # Should throw an error
-
-## Person's Chi-square test
-f <- contingency(data, "Periodo", "cat_Edad")
-print(f)
-lablr(f)
-
-f. <- table(data$Periodo, data$cat_Edad) |> chisq.test()
-
-f$p.value == f.$p.value # TRUE
diff --git a/testing/group_diff.R b/testing/group_diff.R
deleted file mode 100644
index af58023..0000000
--- a/testing/group_diff.R
+++ /dev/null
@@ -1,202 +0,0 @@
-# Unit testing
-
-# Load data
-data <- readRDS(file = "~/Documents/R/WD/IND/data/swim.RDS")
-
-# Load libraries
-library(writR)
-
-# 1. K-samples
-
-## Paired samples
-
-### Parametric - Fisher's rmANOVA
-a <- k_sample(data, "Periodo", "FEV1", rowid = "ID", type = "p", paired = TRUE, sphericity = "none")
-print(a)
-lablr(a)
-
-a. <- data |>
- subset(Periodo %in% c("BASAL", "PRE1", "PRE2")) |> # Other levels from 'Periodo' are empty
- afex::aov_ez(id = "ID", dv = "FEV1", within = "Periodo",
- anova_table = list(correction = "none"))
-
-a$p.value == a.$anova_table$`Pr(>F)` # TRUE
-
-### Parametric - rmANOVA with GG correction
-b <- k_sample(data, "Periodo", "FEV1", rowid = "ID", type = "p", paired = TRUE, sphericity = "GG")
-print(b)
-lablr(b)
-
-b. <- data |>
- subset(Periodo %in% c("BASAL", "PRE1", "PRE2")) |> # Other levels from 'Periodo' are empty
- afex::aov_ez(id = "ID", dv = "FEV1", within = "Periodo",
- anova_table = list(correction = "GG"))
-
-b$p.value == b.$anova_table$`Pr(>F)` # TRUE
-
-### Parametric - rmANOVA with HF correction
-c <- k_sample(data, "Periodo", "FEV1", rowid = "ID", type = "p", paired = TRUE, sphericity = "HF")
-print(c)
-lablr(c)
-
-c. <- data |>
- subset(Periodo %in% c("BASAL", "PRE1", "PRE2")) |> # Other levels from 'Periodo' are empty
- afex::aov_ez(id = "ID", dv = "FEV1", within = "Periodo",
- anova_table = list(correction = "HF"))
-
-c$p.value == c.$anova_table$`Pr(>F)` # TRUE
-
-### Non-parametric - Friedman rank-sum test
-d <- k_sample(data, "Periodo", "FEV1", rowid = "ID", type = "np", paired = TRUE)
-print(d)
-lablr(d)
-
-d. <- clean_data(data, "Periodo", "FEV1", "ID", paired = TRUE, wide = TRUE)[,-1L] |>
- as.matrix() |>
- friedman.test()
-
-d$p.value == d.$p.value # TRUE
-
-### Robust - rmANOVA on trimmed means
-e <- k_sample(data, "Periodo", "FEV1", rowid = "ID", type = "r", paired = TRUE)
-print(e)
-lablr(e)
-
-e. <- clean_data(data, "Periodo", "FEV1", "ID", paired = TRUE) |>
- with({
- WRS2::rmanova(y = FEV1,
- groups = Periodo,
- blocks = rowid)
- })
-
-e$p.value == e.$p.value # TRUE
-
-## Independent samples
-
-### Parametric - Fisher's ANOVA
-f <- k_sample(data, "Periodo", "FEV1", type = "p", var.equal = TRUE)
-print(f)
-lablr(f)
-
-f. <- oneway.test(FEV1 ~ Periodo, data,
- subset = Periodo %in% c("BASAL", "PRE1", "PRE2"),
- var.equal = TRUE)
-
-f$p.value == f.$p.value # TRUE
-
-### Parametric - Welch's ANOVA
-g <- k_sample(data, "Periodo", "FEV1", type = "p", var.equal = FALSE)
-print(g)
-lablr(g)
-
-g. <- oneway.test(FEV1 ~ Periodo, data,
- subset = Periodo %in% c("BASAL", "PRE1", "PRE2"),
- var.equal = FALSE)
-
-g$p.value == g.$p.value # TRUE
-
-### Non-parametric - Kruskal-Wallis
-h <- k_sample(data, "Periodo", "FEV1", type = "np")
-print(h)
-lablr(h)
-
-h. <- kruskal.test(FEV1 ~ Periodo, data,
- subset = Periodo %in% c("BASAL", "PRE1", "PRE2"))
-
-h$p.value == h.$p.value # TRUE
-
-### Robust - ANOVA on trimmed means
-i <- k_sample(data, "Periodo", "FEV1", type = "r")
-print(i)
-lablr(i)
-
-i. <- clean_data(data, "Periodo", "FEV1") |>
- WRS2::t1way(formula = FEV1 ~ Periodo)
-
-i$p.value == i.$p.value # TRUE
-
-# 2. Two-samples
-
-## Paired samples
-
-### Parametric - Student-t test
-j <- two_sample(data[Periodo %in% c("PRE1", "PRE2")], "Periodo", "FEV1", rowid = "ID", type = "p", paired = TRUE)
-print(j)
-lablr(j)
-
-j. <- clean_data(data, "Periodo", "FEV1", paired = TRUE) |>
-stats:::t.test.formula(formula = FEV1 ~ Periodo,
- subset = Periodo %in% c("PRE1", "PRE2"), paired = TRUE)
-
-j$p.value == j.$p.value # TRUE
-
-### Non-parametric - Wilcoxon signed-rank test
-k <- two_sample(data[Periodo %in% c("PRE1", "PRE2")], "Periodo", "FEV1", rowid = "ID", type = "np", paired = TRUE)
-print(k)
-lablr(k)
-
-k. <- clean_data(data, "Periodo", "FEV1", paired = TRUE) |>
- stats:::wilcox.test.formula(formula = FEV1 ~ Periodo, paired = TRUE,
- subset = Periodo %in% c("PRE1", "PRE2"))
-
-k$p.value == k.$p.value # TRUE
-
-### Robust - Yuen's t-test on trimmed means
-l <- two_sample(data[Periodo %in% c("PRE1", "PRE2")], "Periodo", "FEV1", rowid = "ID", type = "r", paired = TRUE, trim = 0.2)
-print(l)
-lablr(l)
-
-l. <- clean_data(
- data = data[Periodo %in% c("PRE1", "PRE2")],
- x = "Periodo", y = "FEV1", rowid = "ID", paired = TRUE, wide = TRUE)[,-1L] |>
- with({
- WRS2::yuend(x = PRE1, y = PRE2, tr = 0.2)
- })
-
-l$p.value == l.$p.value # TRUE
-
-## Independent samples
-
-### Parametric - Student-t test
-m <- two_sample(data[Periodo %in% c("PRE1", "PRE2")], "Periodo", "FEV1", type = "p", var.equal = TRUE)
-print(m)
-lablr(m)
-
-m. <- clean_data(data, "Periodo", "FEV1") |>
- stats:::t.test.formula(formula = FEV1 ~ Periodo, var.equal = TRUE,
- subset = Periodo %in% c("PRE1", "PRE2"))
-
-m$p.value == m.$p.value # TRUE
-
-### Parametric - Welch-t test
-n <- two_sample(data[Periodo %in% c("PRE1", "PRE2")], "Periodo", "FEV1", type = "p", var.equal = FALSE)
-print(n)
-lablr(n)
-
-n. <- clean_data(data, "Periodo", "FEV1") |>
- stats:::t.test.formula(formula = FEV1 ~ Periodo, var.equal = FALSE,
- subset = Periodo %in% c("PRE1", "PRE2"))
-
-n$p.value == n.$p.value # TRUE
-
-### Non-parametric - Wilcoxon sum-rank test
-o <- two_sample(data[Periodo %in% c("PRE1", "PRE2")], "Periodo", "FEV1", type = "np")
-print(o)
-lablr(o)
-
-o. <- clean_data(data, "Periodo", "FEV1") |>
- stats:::wilcox.test.formula(formula = FEV1 ~ Periodo,
- subset = Periodo %in% c("PRE1", "PRE2"))
-
-o$p.value == o.$p.value # TRUE
-
-### Robust - Yuen's t-test on trimmed means
-p <- two_sample(data[Periodo %in% c("PRE1", "PRE2")], "Periodo", "FEV1", type = "r")
-print(p)
-lablr(p)
-
-p. <- clean_data(data[Periodo %in% c("PRE1", "PRE2")], "Periodo", "FEV1") |>
- WRS2::yuen(formula = FEV1 ~ Periodo, tr = 0.2)
-
-p$p.value == p.$p.value # TRUE
-