| derive | R Documentation |
A CA D of strength t+1 is reduced to a single level of a particular column, which is subsequently omitted from the array. The resulting CA has strength t.
derive(D, dcol=1, dval=NULL, ...)
deriveto(N, k, v, ...)
derivefrom(N, k, v, ...)
D |
a CA with levels as integers 0, ..., v-1 or 1,...,v |
dcol |
the id of the column to be deleted (default: 1) |
dval |
the value to be used for filtering (default: the first value that has minimum frequency in column |
... |
currently unused |
N |
integer: run size; |
k |
integer: number of columns; |
v |
integer: the number of levels (same for ingoing and resulting array) |
The name derive was taken from Zhang et al. (2014). derive returns a strength t
CA from a strength t+1 array by
picking one column and selecting only the runs for a single level of that column
(if not balanced, use the least frequent level for obtaining the smallest run size)
and subsequently omitting that column.
deriveto predicts the dimensions of a derived array, when deriving a CA(N,t+1,k,v),
assuming maximum possible balance in the column to derive on (which is worst case).
derivefrom provides the dimensions of a CA from which the specified parameters
can be obtained by derivation; note that the run size is not unique, because, e.g.,
deriving a 20 run Ca or a 21 run CA with v=2 will both yield 10 runs. The result
for N is therefore a vector of possibilities.
derive returns a matrix with class ca, which has strength one
less than D; its levels are coded in the same way as those of D.
deriveto returns a named vector with integer-valued elements N and k.
derievefrom returns a list with elements N (an integer-valued vector)
and k (an integer number).
# create a CA(6,2,10,2) from a CA(12,3,11,2)
A <- paleyHad(11) ## a CA(12,3,11,2)
sixdefault <- derive(A) ## first column of A was 0,
## first column omitted
dim(sixdefault)
coverage(sixdefault, 2)
eCAN(2,10,2) ## the array is optimal
## default construction can be modified:
## select all the runs with 11th column at level 1
## keep first 10 columns for these
six <- derive(A, dcol=11, dval=1)
dim(six)
## strength 3 was reduced to strength 2
coverage(six, 2)
deriveto(24, 12, 2)
derivefrom(24, 12, 2)
# t=3 v=2 k=5
eCAN(3,5,2) ## N=10, Derive from strength 4
derivefrom(10, 5, 2)
# t=4, v=2, k=6, N in 20 or 21
eCAN(4,6,2) ## N=21, Derive from strength 5
derivefrom(21, 6, 2)
# t=5, v=2, k=7, N in 42 or 23
eCAN(5,7,2)
## has 42 runs, Source "Special (Yan Jun)"
# this or equivalent CA is available in TJ library
N_TJcat(5, 7, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.