powered by
Functions for converting between \(d_{ab}\) indexing of contrasts (useful notationally) and d[i] indexing used by R.
d[i]
d_ab2i(a, b, K)d_i2ab(i, K)
d_i2ab(i, K)
Vector of treatment codes \(a\).
Vector of treatment codes \(b\).
Total number of treatments.
Vector of indices i.
i
d_ab2i returns a vector of indices i. d_i2ab returns a data frame of indices a and b.
d_ab2i
d_i2ab
a
b
d_ab2i: Convert d[i] type indices to \(d_{ab}\) type indices.
d_i2ab: Convert \(d_{ab}\) type indices to d[i] type indices.
# NOT RUN { d_ab2i(c(1,1,1, 2,2, 3), c(2,3,4, 3,4, 4), K=4) d_i2ab(1:6, K=4) # }
Run the code above in your browser using DataLab