SyntaxFix
Write A Post
Hire A Developer
Questions
can you try if.else
> col2=ifelse(df1$col=="true",1,0) > df1 $col [1] "true" "false" > cbind(df1$col) [,1] [1,] "true" [2,] "false" > cbind(df1$col,col2) col2 [1,] "true" "1" [2,] "false" "0"