dummycode | R Documentation |
Flexible dummy-coding allowing for all R's built-in types of contrasts and optional dropping of a factor level to reduce rank defficiency probability.
dummycode(Y, contrast = "contr.sum", drop = TRUE)
Y |
|
contrast |
Contrast type, default = "contr.sum". |
drop |
|
matrix
made by dummy-coding the input vector.
vec <- c("a","a","b","b","c","c")
dummycode(vec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.