Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tesing
- =======================
- ```{r echo=FALSE,results='asis'}
- mytest <- function(myresponse, myterms, mydata) {
- # do clever stuff...
- # then:
- plot1 <- barplot(ppr$pain_protocol1, name=ppr$category,las=2)
- plot2 <- barplot(ppr_pa$extra_pp, name=ppr_pa$adult_anaesthetist,las=2)
- list(plot1 = plot1, plot2 = plot2)
- }
- terms <- c(' age', 'log_age', 'age2', 'inv_age', 'op_time', 'log_op_time',
- 'op_time2', 'gender', 'category', 'thimble')
- response <- 'pain_protocol1'
- results <- mytest(response, terms, d4)
- ```
- This is plot 1:
- ```{r echo=FALSE,results='asis'}
- library(ggplot2)
- ggplot_build(results[["plot1"]])
- ```
- This is plot 2:
- ```{r echo=FALSE,results='asis'}
- results[["plot2"]]
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement