1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 10:31:53 +02:00
This commit is contained in:
2019-06-03 17:45:22 +02:00
parent 702da574c0
commit 270aa0dd33
87 changed files with 507 additions and 544 deletions

View File

@ -1,23 +0,0 @@
---
title: "How to use the *G*-test"
author: "Matthijs S. Berends"
date: '`r format(Sys.Date(), "%d %B %Y")`'
output:
rmarkdown::html_vignette:
toc: true
vignette: >
%\VignetteIndexEntry{How to use the G-test}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
chunk_output_type: console
---
```{r setup, include = FALSE, results = 'markup'}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#"
)
```
*(will be available soon - in the meanwhile, please read about [this *G*-test in the manual](./../reference/g.test.html))*

View File

@ -34,7 +34,7 @@ library(readxl)
data <- read_excel(path = "path/to/your/file.xlsx")
```
This package comes with an [example data set `WHONET`](./reference/WHONET.html). We will use it for this analysis.
This package comes with an [example data set `WHONET`](https://msberends.gitlab.io/AMR/reference/WHONET.html). We will use it for this analysis.
# Preparation
@ -48,7 +48,7 @@ library(AMR) # this package
We will have to transform some variables to simplify and automate the analysis:
* Microorganisms should be transformed to our own microorganism IDs (called an `mo`) using [the ITIS reference data set](./reference/ITIS.html), which contains all ~20,000 microorganisms from the taxonomic kingdoms Bacteria, Fungi and Protozoa. We do the tranformation with `as.mo()`. This function also recognises almost all WHONET abbreviations of microorganisms.
* Microorganisms should be transformed to our own microorganism IDs (called an `mo`) using [the ITIS reference data set](https://msberends.gitlab.io/AMR/reference/ITIS.html), which contains all ~20,000 microorganisms from the taxonomic kingdoms Bacteria, Fungi and Protozoa. We do the tranformation with `as.mo()`. This function also recognises almost all WHONET abbreviations of microorganisms.
* Antimicrobial results or interpretations have to be clean and valid. In other words, they should only contain values `"S"`, `"I"` or `"R"`. That is exactly where the `as.rsi()` function is for.
```{r}