-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathInstallationGuide.Rmd
More file actions
96 lines (60 loc) · 4.25 KB
/
Copy pathInstallationGuide.Rmd
File metadata and controls
96 lines (60 loc) · 4.25 KB
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
---
title: "Patient-Level Prediction Installation Guide"
author: "Jenna Reps, Peter R. Rijnbeek, Egill Fridgeirsson"
date: '`r Sys.Date()`'
output: rmarkdown::html_vignette
vignette: >
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{Patient-Level Prediction Installation Guide}
%\VignetteEncoding{UTF-8}
---
# Introduction
This vignette describes how you need to install the Observational Health Data Science and Informatics (OHDSI) [`PatientLevelPrediction`](https://github.com/OHDSI/PatientLevelPrediction) package under Windows, Mac, and Linux.
# Software Prerequisites
## Windows Users
Under Windows the OHDSI Patient Level Prediction (PLP) package requires installing:
- R (<https://cran.r-project.org/> ) - (R \>= 4.1.0, but latest is recommended)
- Rstudio (<https://posit.co/> )
- Java
- RTools (<https://cran.r-project.org/bin/windows/Rtools/>)
## Mac/Linux Users
Under Mac and Linux the OHDSI Patient Level Prediction (PLP) package requires installing:
- R (<https://cran.r-project.org/> ) - (R \>= 4.1.0, but latest is recommended)
- Rstudio (<https://posit.co/> )
- Java
- Xcode command line tools(run in terminal: xcode-select --install) [MAC USERS ONLY]
# Installing the Package
The preferred way to install the package is by using `remotes`, which will automatically install the latest release and all the latest dependencies.
If you do not want the official release you could install the bleeding edge version of the package (latest develop branch).
Note that the latest develop branch could contain bugs, please report them to us if you experience problems.
## Installing PatientLevelPrediction using remotes
To install using `remotes` run:
```{r, echo = TRUE, message = FALSE, warning = FALSE,tidy=FALSE,eval=FALSE}
install.packages("remotes")
remotes::install_github("OHDSI/PatientLevelPrediction")
```
When installing make sure to close any other Rstudio sessions that are using `PatientLevelPrediction` or any dependency. Keeping Rstudio sessions open can cause locks that prevent the package installing.
# Python environment
Some classifiers in `PatientLevelPrediction` use a Python backend. In a standard online environment, `reticulate` will manage the Python requirements automatically when a Python model is used.
If you are in an offline or locked-down environment, configure Python outside `PatientLevelPrediction` and point `reticulate` to that Python binary before loading the package:
```{r, echo = TRUE, message = FALSE, warning = FALSE,tidy=FALSE,eval=FALSE}
Sys.setenv(RETICULATE_PYTHON = "/path/to/python")
library(PatientLevelPrediction)
```
The Python environment must include the packages needed by the selected model, including `scikit-learn`.
# Installation issues
Installation issues need to be posted in our issue tracker: <https://github.com/OHDSI/PatientLevelPrediction/issues>
The list below provides solutions for some common issues:
1. If you have an error when trying to install a package in R saying **'Dependancy X not available ...'** then this can sometimes be fixed by running `install.packages('X')` and then once that completes trying to reinstall the package that had the error.
2. I have found that using the github `remotes` to install packages can be impacted if you have **multiple R sessions** open as one session with a library open can cause the library to be locked and this can prevent an install of a package that depends on that library.
## Common issues
### Python environment Mac/Linux users
If `reticulate` is not selecting the intended Python environment, set the `RETICULATE_PYTHON` environment variable to the full path of the Python binary before loading `PatientLevelPrediction`.
# Acknowledgments
Considerable work has been dedicated to provide the `PatientLevelPrediction` package.
```{r tidy=TRUE,eval=TRUE}
citation("PatientLevelPrediction")
```
**Please reference this paper if you use the PLP Package in your work:**
[Reps JM, Schuemie MJ, Suchard MA, Ryan PB, Rijnbeek PR. Design and implementation of a standardized framework to generate and evaluate patient-level prediction models using observational healthcare data. J Am Med Inform Assoc. 2018;25(8):969-975.](https://dx.doi.org/10.1093/jamia/ocy032)
This work is supported in part through the National Science Foundation grant IIS 1251151.