Learn R Programming

ternvis (version 1.3)

tscale: Rescale a 3-vector to yield a ternary forecast

Description

Utility function to rescale 3-vectors to be probability distributions.

Usage

tscale(p)

Value

A vector of length 3 rescaled so that elements are all >= 0 and sum to unity.

Arguments

p

a vector of length 3.

Author

Tim Jupp

Details

A utility function.

Examples

Run this code
tscale(cbind(1,2,3))  # rescale (1,2,3) to be a ternary forecast.

Run the code above in your browser using DataLab