TOC R package
R
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
inst/external
man
.gitignore
DESCRIPTION
LICENSE
NAMESPACE
README.md
TOC-manual.pdf

README.md

TOC R package

1. Installation

The TOC R package can be installed from CRAN, the official R packages repository, or from this GitHub repository.

The official release of the TOC R package can be found on CRAN. To install from CRAN enter the following command line in R (on Windows OS, run R as Administrator):

install.packages("TOC")

To install the development version of the TOC R package from this account on GitHub, first install the devtools R package using the following command:

install.packages("devtools")

Then install the TOC package from Github using the devtools package:

devtools::install_github("amsantac/TOC")

2. Construction of the TOC curve

Once installed from CRAN or GitHub, the TOC package can be loaded. The package includes sample data to run the examples:

library(TOC)
index <- raster(system.file("external/Prob_Map2.rst", package="TOC"))
boolean <- raster(system.file("external/Change_Map2b.rst", package="TOC"))
mask <- raster(system.file("external/MASK4.rst", package="TOC"))

The TOC and ROC curves can be generated and plotted using the following instructions:

tocd <- TOC(index, boolean, mask, nthres=100, progress=TRUE)
tocd
plot(tocd)

rocd <- ROC(index, boolean, mask, nthres=100, progress=TRUE)
rocd
plot(rocd)

For help on the functions implemented in the TOC package see the reference manual or run the following command lines in R:

?'TOC-package'
?TOC

3. Shiny TOC web app

An interactive web application for TOC developed with Shiny can be found here. The Shiny TOC app allows the construction of the TOC and ROC curves for spatial and non-spatial data through a graphical user interface.