as.factor2k | R Documentation |
2^k
$ fatoctorial designsFunction to convert the low and hight levels of a given factor to -1 and 1, respectively.
as.factor2k(x)
x |
factor to be converted. |
the recodified factor with -1 and +1 levels
library(planex)
library(tidyverse)
data(rugosidade)
head(rugosidade)
rugosidade <- mutate(rugosidade,
alimentacao = as.factor2k(alimentacao),
profundidade = as.factor2k(profundidade),
angulo = as.factor2k(angulo)
)
rugosidade
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.