R/preTreatmentMethods.R

Defines functions preTreatmentMethods

#' @importFrom metabolyseR preTreatedInfo

preTreatmentMethods <- function(analysis){
  if ({analysis %>% preTreatedInfo() %>% nrow()} > 0) {
    "
### Pre-treatment

```{r RSDplot,echo = F}
if (T %in% str_detect([email protected]@preTreat %>% names(),'QC')) {
    plotRSD(analysis)
}
```

```{r unsupervisedPlots,echo = F,fig.width = 10}
{plotPCA(analysis) %>% [email protected]} + {plotUnsupervisedRF(analysis) %>% [email protected]}
```

```{r supervisedPlots,echo = F,fig.width = 10}
{plotLDA(analysis) %>% [email protected]} + {plotSupervisedRF(analysis) %>% [email protected]}
```
"
  } else {
    ""
  }

}
jasenfinch/metaboReports documentation built on Aug. 11, 2018, 1:06 p.m.