-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathreport.Rmd
93 lines (84 loc) · 3.88 KB
/
report.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
title: "Method Comparison & Bias Estimation"
author: "https://bahar.shinyapps.io/method_compare"
date: '`r Sys.Date()`'
output: pdf_document
---
```{r dataframe, comment = '', echo=FALSE, warning = FALSE, message = FALSE}
library(mcr)
library(pander)
a <- datasetInput()
if (is.null(a)) {
return(NULL)} else {
names(a) <- c("M1", "M2")
data1 <- mcreg(a$M1, a$M2, error.ratio = input$syx,
method.reg = input$regmodel, method.ci = input$cimethod,
method.bootstrap.ci = input$metbootci, slope.measure = "radian",
mref.name = input$var1, mtest.name = input$var2, na.rm = TRUE)
tname <- paste('X:', input$m1, '; Y:', input$m2, '; S: Sample No.')
pander(MCResult.getData(data1), caption = tname, style = "grid")
}
```
```{r regression plot, echo = FALSE, results = 'markup', fig.show = 'asis', message = FALSE}
library(mcr)
a <- datasetInput()
if (is.null(a)) {
return(NULL)} else {
names(a) <- c("M1", "M2")
data1<- mcreg(a$M1, a$M2, error.ratio = input$syx,
method.reg = input$regmodel, method.ci = input$cimethod,
method.bootstrap.ci = input$metbootci, slope.measure = "radian", na.rm = TRUE)
MCResult.plot(data1, ci.area = input$ciarea,
add.legend = input$legend, identity = input$identity,
add.cor = input$addcor, x.lab = input$m1,
y.lab = input$m2, cor.method = input$cormet,
equal.axis = TRUE, add.grid = TRUE)
}
```
```{r statistics, echo = FALSE, comment = '', warning = FALSE, message = FALSE}
library(mcr)
library(pander)
a <- datasetInput()
if (is.null(a)) {
return(NULL)} else {
names(a) <- c("M1", "M2")
data1 <- mcreg(a$M1, a$M2, error.ratio = input$syx,
method.reg = input$regmodel, method.ci = input$cimethod,
method.bootstrap.ci = input$metbootci, slope.measure = "radian",
mref.name = input$var1, mtest.name = input$var2, na.rm = TRUE)
pander(getCoefficients(data1), caption = "Estimate (EST), standard error (SE) and upper-lower confidence interval (UCI-LCI) for intercept and slope", style = "grid")
}
```
```{r coef plot, echo = FALSE, comment = '', warning = FALSE, message = FALSE}
library(mcr)
a <- datasetInput()
if (is.null(a)) {
return(NULL)} else {
names(a) <- c("M1", "M2")
data1 <- mcreg(a$M1, a$M2, error.ratio = input$syx,
method.reg = input$regmodel, method.ci = input$cimethod,
method.bootstrap.ci = input$metbootci, slope.measure = "radian",
mref.name = input$var1, mtest.name = input$var2, na.rm = TRUE)
compareFit(data1)
}
```
```{r BA plot, echo=FALSE, results = 'markup'}
library(mcr)
a <- datasetInput()
if (is.null(a)) {
return(NULL)} else {
names(a) <- c("M1", "M2")
data1 <- mcreg(a$M1, a$M2,
mref.name = input$m1, mtest.name = input$m2, na.rm = TRUE)
MCResult.plotDifference(data1, plot.type = input$batype, add.grid = TRUE)
}
```
#### Data is processed using R language^1^, shiny web application framework^2^ and mcr package^3^. Shinydashboard^4^, rhandsontable^5^ and pander^6^ are used for website construction. Rmarkdown^7^ is used for converting results into PDF and HTML files.
##### References and packages:
1. R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. Version: `r getRversion()` URL: https://www.R-project.org
2. shiny: Web Application Framework for R. Version `r packageDescription("shiny")$Version` URL: http://CRAN.R-project.org/package=shiny
3. mcr: Method Comparison Regression. Version: `r packageDescription("mcr")$Version` URL: http://CRAN.R-project.org/package=mcr
4. shinydashboard: Create Dashboards with 'Shiny'. Version: `r packageDescription("shinydashboard")$Version` URL: http://rstudio.github.io/shinydashboard
5. rhandsontable: Interface to the 'Handsontable.js' Library. Version: `r packageDescription("rhandsontable")$Version` URL: http://jrowen.github.io/rhandsontable
6. pander: An R Pandoc Writer. Version: `r packageDescription("pander")$Version` URL: http://rapporter.github.io/pander
7. rmarkdown: Dynamic Documents for R. Version: `r packageDescription("rmarkdown")$Version` URL: http://rmarkdown.rstudio.com