R/pls_analysis.R
convert_dummy_variable.Rd
convert_dummy_variable
convert_dummy_variable(y)
a vector of numeric or character
ggplot2 object
Xiaotao Shen shenxt1990@outlook.com
y = c(rep("a", 3), rep("b", 3)) convert_dummy_variable(y) #> a b #> [1,] 1 0 #> [2,] 1 0 #> [3,] 1 0 #> [4,] 0 1 #> [5,] 0 1 #> [6,] 0 1