| transf.data | R Documentation |
A function that converts categorical data in a database into dummy data, that is, binary data.
transf.data(data)
data |
Numerical and categorical data. |
trf.data |
Returns the numeric data with the categorical data converted to binary. |
Paulo Cesar Ossani
data <- data.frame(
C1 = c("A", "B", "A", "C", "B", "C", "A"),
X1 = c(12, 15, 18, 14, 20, 17, 22),
C2 = c("Sim", "Não", "Sim", "Não", "Sim", "Sim", "Não"),
X2 = c(3.5, 4.2, 5.1, 3.8, 6.0, 4.7, 6.5),
C3 = c("Baixo", "Médio", "Alto", "Baixo",
"Alto", "Médio", "Alto")
)
transf.data(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.