combinatIntTable: Planing For Making All Multiplicative Combinations

View source: R/combinatIntTable.R

combinatIntTableR Documentation

Planing For Making All Multiplicative Combinations

Description

Provide all combinations for each of n elements of vector 'nMax' (positive integer, eg number of max multiplicative value). Results allow to see possible total compositons and must be read vertically.

Usage

combinatIntTable(
  nMax,
  include0 = TRUE,
  asList = FALSE,
  callFrom = NULL,
  debug = FALSE,
  silent = TRUE
)

Arguments

nMax

(positiveinteger) atomic compostion; could be max number of voting participants form different cities, eg Paris max 2 persons, Lyon max 1 person ...

include0

(logical) include 0 occurances, ie provide al combinations starting from 0 or from 1 up to nMax

asList

(logical) return result a

callFrom

(character) allows easier tracking of messages produced

debug

(logical) additional messages for debugging

silent

(logical) suppress messages

Value

This functions returns a list or array (as 2- or 3 dim) with possible number of occurances for each of the 3 elements in nMax. Read results vertical : out[[1]] or out[,,1] .. (multiplicative) table for 1st element of nMax; out[,,2] .. for 2nd

See Also

combinateAllAndSum

Examples

combinatIntTable(c(1,1,1,2), include0=TRUE, asList=FALSE, silent=TRUE)
nMa <- c(Paris=2,Lyon=1,Strasbourg=1)
combinatIntTable(nMa, include0=TRUE, asList=TRUE, silent=TRUE) 

wrTopDownFrag documentation built on June 8, 2025, 1:34 p.m.