valueGoods: Calculates the values of virtual goods in terms of a currency

Description Usage Arguments Value

View source: R/GameCurrency.R

Description

Calculates the values of virtual goods in terms of a currency

Usage

1
valueGoods(transactions)

Arguments

transactions

A numeric matrix representing the transactions available in the game. Each row represents a transaction. The first column represents the cost of a transaction in some currency. If the currency is used up in the transaction, then the value should be negative.

The remaining columns represent the quantity of virtual goods gained after the transaction, each column representing a specific virtual good. There should be at least as many transactions as there are virtual goods.

Value

Values of each virtual good in terms of the currency given in the matrix. If the matrix of transactions is over- or under-determined, then the values of goods are returned which minimizes the squared error between the actual and calculated total values of the transaction.


agentlans/lootr documentation built on Aug. 20, 2020, 2:17 a.m.