This repository has been archived by the owner on Dec 30, 2023. It is now read-only.
forked from jonathon-love/blandr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
109 lines (74 loc) · 5.05 KB
/
README.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# blandr: a Bland-Altman Method Comparison package for R
*blandr* carries out Bland Altman analyses (also known as a Tukey mean-difference plot) as described by JM Bland and DG Altman in 1986.
This package was started in 2015 as existing Bland-Altman R functions did not calculate confidence intervals. The *blandr* was created to fulfil this need.
*blandr* has been improved iteratively over time, and hopefully this library will be useful to researchers as an open-source and reproducible package.
## The benefits
* Calculates and plots confidence intervals
* Outputs ggplot2 information to create extensible plots
* Has a basic Jamovi module, to allow GUI analysis for those not comfortable with command line tools
* Has a function to chart for proportional bias
* If you get me through GitHub, I will do my best to maintain and improve this package
# Citations
You can find the citation information through the usual R citation commands:
```{r}
citation("blandr")
```
The DOI will refer to all versions of blandr. If you need to cite specific releases DOIs, the full versioning information can be found at Zenodo (https://zenodo.org/record/824514), with the full source code at the blandr GitHub page (https://github.com/deepankardatta/blandr/).
## Installation
blandr is available as a package from CRAN and can be installed with the following commands:
```{r gh-installation, eval = FALSE}
install.packages("blandr")
library(blandr)
```
You can install the blandr development version, hosted on github at https://github.com/deepankardatta/blandr/, with the following commands:
```{r gh-installation, eval = FALSE}
install.packages("devtools")
devtools::install_github("deepankardatta/blandr")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r, eval = FALSE}
library(blandr)
load(file="Data/bland.altman.PEFR.1986.rda")
blandr.display ( bland.altman.PEFR.1986$WrightFirst , bland.altman.PEFR.1986$MiniWrightFirst , sig.level=0.95 )
blandr.draw( bland.altman.PEFR.1986$WrightFirst , bland.altman.PEFR.1986$MiniWrightFirst )
```
## The Jamovi module
One of the benefits of the current version is that it includes a basic module for the Jamovi GUI statistical spreadsheet (https://www.jamovi.org/). I'm a believer in making this tool more accesible and Jamovi is a way to do this. The Jamovi module is still under development, and will be submitted to the Jamovi module repository soon. However until this is done, it can be installed using the following commands:
```{r gh-installation, eval = FALSE}
install.packages('jmvtools', repos=c('https://repo.jamovi.org', 'https://cran.r-project.org'))
library(jmvtools)
jmvtools::install()
```
## Why the odd name?
Thinking of a unique name was difficult - if you look through the history of the sources the package had a very cumbersome name. This had to change when uploading to CRAN as it seemed to be frowned upon.
Hadley Wickham has an excellent set of documentation on creating packages. The one on naming (http://r-pkgs.had.co.nz/package.html) is worth a read. Reflecting on it a lot of the naming issues are to prevent collisions with similarly named packages, so using *blandaltman* in the name might have cause problems. Mirroring the pre-existing *plyr* and *knitr* I thought I'd just add a "r" to "bland": yes it doesn't involve Altman's name, but I couldn't think of anything better.
If you can think of a better name please let me know!
## Further information
Further information can be found in the function help files in the package, as well as in the vignettes.
## System Requirements
The library is quite small, and mostly depends on the ggplot2 library. However the report functions do require rmarkdown, knitr, and most importantly pandoc - the function should check this is available and stop gracefully if not. Further the Jamovi based functions need the Jamovi library to work.
## Future improvements
Whilst this package is good enough for use, there is the scope for iterative improvements.
Future works include:
* There are a further few deprecated functions to delete (I just need to finish a few projects first!!).
* The package needs to have to go through some validation and testing
* For further testing I need to write some *testhtat* modules
* The function descriptions needs to be improved
* Some of the roxygen2 documentation can be improved by calling the import parameters function
* I want to add a few more sample data packs: including some of my own if possible
* Development of a report generator
* Further development of the Jamovi module
## Help wanted!
Comments on the code, suggestions for improvement, verification tests, validation studies, and even code contributions would be gratefully accepted. Email me at [email protected] and I'll try and get back to you as soon as possible. Please do bear in mind this is a side-project, and I can be otherwise busy with a lot of other work.