1. Home
  2. Docs
  3. Plugin Management
  4. Prerequisites for Plugin Development

Prerequisites for Plugin Development

A couple of software and tools are required to create Digitwin plugins using R:

(1) Install R (version 4.10 or above) from the official website

https://cran.r-project.org/

(2) RStudio is recommended for developing R scripts. The “RStudio Desktop Open Source License” version just works great

https://www.rstudio.com/products/rstudio/download/

(3) Install Rtools (for Windows developers only) from here

https://cran.r-project.org/bin/windows/Rtools/

(4) Please check your R version first before installing the RTools and select the corresponding version for the RTools. Ensure it is installed and in your system’s PATH before attempting to install this package.

Note: since zip.exe in the Rtools packages will be used in the “utils.r”, please make sure “YOUR_Rtools_DIRECTORY/bin” is included in the system “Path” environment variable.

(5) When testing your indicator script, RScript.exe which locates in “YOUR_R_DIRECTORY\bin” will be used, make sure this directory is included in the system “Path” environment variable.

(5) Ensure that you have either devtools or remotes installed. You can install them using the following commands in R:

install.packages("devtools")
install.packages("remotes")

(6) Install R packages on your dev environment. In RStudio, go to “Tools”->”Install Packages”, make sure the “Install dependencies” option is checked, then install the following packages one by one:

‘sp’, maptools’, ‘rgdal’, ‘rgeos’, ‘jsonlite, ‘httr’, ‘uuid’

you might need to close and reopen RStudio to use the installed packages

(7) Download the source code from bitbucket by typing the following in the terminal

devtools::install_git("https://bitbucket.org/csdila/dt-dtrutils.git")

DT plugin is open-sourced on Bitbucket (https://bitbucket.org/digitwin/dt-plugin-r). To join the DT plugin developer community and contribute your knowledge and expertise to the ecosystem, please contact the UoM Digitwin dev team (Dr Yiqun Chen yiqun.c@unimelb.edu.au) for your developer account arrangement.