R converting numeric to factor without level loss

前端 未结 0 1730
小蘑菇
小蘑菇 2021-02-10 16:43

case 1: a process is returning the variable "a"

a <- c(0.25,0.9)
b <- as.factor(ifelse(a> 0.5, 1, -1)) 
#if the value of "         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题