---
title: "Tests and Coverage"
date: "`r format(Sys.time(), '%d %B, %Y %H:%M:%S')`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{covrpage: Tests and Coverage}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
eval = FALSE
)
options(rmarkdown.html_vignette.check_title = FALSE)
```
- [Coverage](#coverage)
- [Unit Tests](#unit-tests)
This output is created by
[covrpage](https://github.com/yonicd/covrpage).
## Coverage
Coverage summary is created using the
[covr](https://github.com/r-lib/covr) package.
| Object | Coverage (%) |
| :------------------------------------- | :----------: |
| equatiomatic | 99.66 |
| [R/extract\_lhs.R](https://github.com/datalorax/equatiomatic/blob/master/R/extract_lhs.R) | 98.70 |
| [R/create\_eq.R](https://github.com/datalorax/equatiomatic/blob/master/R/create_eq.R) | 100.00 |
| [R/extract\_eq.R](https://github.com/datalorax/equatiomatic/blob/master/R/extract_eq.R) | 100.00 |
| [R/extract\_rhs.R](https://github.com/datalorax/equatiomatic/blob/master/R/extract_rhs.R) | 100.00 |
| [R/print.R](https://github.com/datalorax/equatiomatic/blob/master/R/print.R) | 100.00 |
| [R/utils.R](https://github.com/datalorax/equatiomatic/blob/master/R/utils.R) | 100.00 |
## Unit Tests
Unit Test summary is created using the
[testthat](https://github.com/r-lib/testthat) package.
| file | n | time | error | failed | skipped | warning |
| :---------------------------------------------------------------- | -: | ----: | ----: | -----: | ------: | ------: |
| [test-clm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-clm.R) | 6 | 0.051 | 0 | 0 | 0 | 0 |
| [test-glm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-glm.R) | 8 | 0.057 | 0 | 0 | 0 | 0 |
| [test-lm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-lm.R) | 7 | 0.037 | 0 | 0 | 0 | 0 |
| [test-polr.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-polr.R) | 5 | 0.052 | 0 | 0 | 0 | 0 |
| [test-print.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-print.R) | 2 | 0.005 | 0 | 0 | 0 | 0 |
| [test-utils.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-utils.R) | 8 | 0.028 | 0 | 0 | 0 | 0 |
| [test-wrapping-formatting.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-wrapping-formatting.R) | 10 | 0.040 | 0 | 0 | 0 | 0 |
Show Detailed Test Results
| file | context | test | status | n | time |
| :------------------------------------------------------------------------ | :---------------------- | :-------------------------------- | :----- | -: | ----: |
| [test-clm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-clm.R#L46_L47) | CLMs | Ordered models with clm work | PASS | 5 | 0.039 |
| [test-clm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-clm.R#L79) | CLMs | Unsupported CLMs create a message | PASS | 1 | 0.012 |
| [test-glm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-glm.R#L16_L17) | GLMs | Logistic regression works | PASS | 1 | 0.009 |
| [test-glm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-glm.R#L33_L34) | GLMs | Probit regression works | PASS | 2 | 0.013 |
| [test-glm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-glm.R#L49) | GLMs | Unsupported GLMs create a message | PASS | 1 | 0.007 |
| [test-glm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-glm.R#L78_L79) | GLMs | Distribution-based equations work | PASS | 3 | 0.019 |
| [test-glm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-glm.R#L107) | GLMs | Weights work | PASS | 1 | 0.009 |
| [test-lm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-lm.R#L11_L12) | Linear models | Simple lm models work | PASS | 3 | 0.016 |
| [test-lm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-lm.R#L32_L33) | Linear models | Interactions work | PASS | 2 | 0.011 |
| [test-lm.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-lm.R#L48_L49) | Linear models | Custom Greek works | PASS | 2 | 0.010 |
| [test-polr.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-polr.R#L44_L45) | polr | Ordered logistic regression works | PASS | 5 | 0.052 |
| [test-print.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-print.R#L11_L12) | Printing | Equation is printed correctly | PASS | 2 | 0.005 |
| [test-utils.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-utils.R#L9_L11) | Utility functions | Strict mapply\_\* functions work | PASS | 8 | 0.028 |
| [test-wrapping-formatting.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-wrapping-formatting.R#L8_L9) | Wrapping and formatting | Coefficient digits work correctly | PASS | 2 | 0.010 |
| [test-wrapping-formatting.R](https://github.com/datalorax/equatiomatic/blob/master/tests/testthat/test-wrapping-formatting.R#L26_L27) | Wrapping and formatting | Wrapping works correctly | PASS | 8 | 0.030 |
Session Info
| Field | Value |
| :------- | :-------------------------------- |
| Version | R version 4.0.2 (2020-06-22) |
| Platform | x86\_64-apple-darwin17.0 (64-bit) |
| Running | macOS Catalina 10.15.6 |
| Language | en\_US |
| Timezone | America/Los\_Angeles |
| Package | Version |
| :------- | :------ |
| testthat | 2.3.2 |
| covr | 3.5.0 |
| covrpage | 0.0.71 |