NUMERIC

numeric utilities

 baserep        y. in base x.
 clean          clean y. to tolerance of x. (default 1e_10)
 colsum         sum data columns of matrix by key
 fraction       convert decimal number to fraction
 groupndx       group indices of y. in x.
 int01          interval in n steps from 0 to 1 (= steps 0 1,n)
 linsert        linear insert x. (default 2) steps into y.
 randomize      sets a random value into random link
 range          range from a to b [in steps of c]
 recur          solves recurrence r(i)=a(i)+r(i-1)*m(i-1)
 round          round y. to nearest x. (e.g. 1000 round 12345)
 rounddist      round y. to nearest x. preserving total
 roundint       round to nearest integer
 steps          steps from a to b in c steps

Defined items
NameClassDescription
baserepVerby. in base x.
fractionVerbconvert decimal number to fraction
int01Verbinterval in n steps from 0 to 1 (= steps 0 1,n)
linsertVerblinear insert x. (default 2) steps into y.
roundVerbround y. to nearest x. (e.g. 1000 round 12345)
roundintVerbround to nearest integer
cleanVerbclean y. to tolerance of x. (default 1e_10)
colsumVerbsum data columns of matrix by key
groupndxVerbgroup indices of y. in x.
randomizeVerbsets a random value into random link
rangeVerbrange from a to b [in steps of c]
recurVerbsolves recurrence r(i)=a(i)+r(i-1)*m(i-1)
rounddistVerbround y. to nearest x. preserving total
stepsVerbsteps from a to b in c steps

baserep............. (v) y. in base x.

fraction............ (v) convert decimal number to fraction

int01............... (v) interval in n steps from 0 to 1 (= steps 0 1,n)

linsert............. (v) linear insert x. (default 2) steps into y.

round............... (v) round y. to nearest x. (e.g. 1000 round 12345)

roundint............ (v) round to nearest integer

clean............... (v) clean y. to tolerance of x. (default 1e_10)

form: tolerance (default 1e_10) clean numbers
sets values less than tolerance to 0

colsum.............. (v) sum data columns of matrix by key

form: key colsum mat
sum data columns of matrix on key columns
e.g. if column 2 of mat is age, then
   2 colsum mat
sums the remaining columns by age

groupndx............ (v) group indices of y. in x.

Return group indices of elements of y.
x. is an integer vector of the starting numbers of each group,
assumed to be in ascending order.
e.g.  0 0 0 1 1 1 2 2  =  0 3 6 groupndx i.8
i.e.  <:@(+/@(<:/))

randomize........... (v) sets a random value into random link

range............... (v) range from a to b [in steps of c]

recur............... (v) solves recurrence r(i)=a(i)+r(i-1)*m(i-1)

form: r = m recur a
  r(0) = a(0)
  r(i) = a(i)+r(i-1)*m(i-1)
e.g    1.05 1.10 recur 100 100 100
    100 205 325.5

rounddist........... (v) round y. to nearest x. preserving total

distributive rounding
round y. to nearest x. preserving total to nearest x.
e.g.    0.1 rounddist 6$0.45
     0.5 0.5 0.5 0.4 0.4 0.4

steps............... (v) steps from a to b in c steps

form: steps a,b,c

system\main\numeric.ijsRelease: 4.02/1998-11-13/12:26