| juxtapose | R Documentation |
Two CAs D1 and D2 with the same strength t, the same number of columns k, and the same numbers of levels in all but at most one column are juxtaposed, such that the levels of one corresponding column in each array are concatenated, resulting in a new strength t CA with the sum of the numbers of levels for that column.
juxtapose(D1, D2, jcol=NULL, start0=TRUE, ...)
D1 |
a CA with levels as integers 0, ..., v-1 or 1,...,v (may have different number of levels for each column, but same coding) |
D2 |
a CA like |
jcol |
the id of the column to be concatenated; if |
start0 |
logical: Do integer valued levels start with 0 ? (Otherwise, they must start with 1.) |
... |
further arguments to function |
Juxtaposing two CAs of a particular strength yields a new CA of the same strength.
If D1 and D2 do not have the same strength, the weaker strength prevails.
If D1 is a N1 x k CA of strength t
and D2 is a N2 x k CA of strength t,
the function returns an (N1 + N2) x k matrix of class ca,
which is a CA of strength t and has the same numbers of levels
as the ingoing arrays, except for the juxtaposed column jcol,
for which the number of levels is the sum of the
numbers of levels of the ingoing CA.
# create a CA(24,3,2^10 4^1) from two CA(12,3,11,2)
## do it by hand
A <- paleyHad(11)
A2 <- A
A2[,11] <- A[,11] + 2
coverage(rbind(A,A2),3)
## use the function
juxtapose(A, A, jcol=11)
## create a CA(13, 2^10 3^1, 2) by juxtaposing two
## strength 2 CAs (one with a column that has only 1 level):
juxtapose(KSK(11), cbind(KSK(10), 0))
## note: it is not necessary to specify jcol
## because there is only one column with
## different number of levels
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.