R/assignmentMethods.R

Defines functions assignmentMethods

assignmentMethods <- function(analysis){
  methods <- list(
   parameters = function(analysis,type = 'head'){
      headHash <- '##'
      
      if (type == 'sub') {
         headHash <- '###'
      }
      
     str_c("
",headHash," Parameters

```{r assignmentParamters,echo=FALSE}
assignment@parameters
```
")
   },
   assignments = function(analysis,type = 'head'){
      headHash <- '##'
      
      if (type == 'sub') {
         headHash <- '###'
      }
      
     str_c('
',headHash,' Assignments  

```{r assignmentTable,echo = FALSE,cache = FALSE}
datatable(assignment %>%
  summariseAssignment(),
          rownames = F,filter = "top",caption = "Summary table of molecular formula assignments")
```

')
   }
  )
  
  return(methods)
  
}
jasenfinch/metaboReports documentation built on Nov. 19, 2021, 7:23 p.m.