Options
If statement for many value
I have many type of crime to classify into two group (violence crime and property crime)
I have tried using generate attribute if statement
If(Crime=="murder", "violence crime", "Property crime")
however it gives me an error when i do
If(crime=="murder" ^ "rape" ^ "Crime3", "violence crime", "property crime")
can someone help me?
crime is binominal attribute btw
I have tried using generate attribute if statement
If(Crime=="murder", "violence crime", "Property crime")
however it gives me an error when i do
If(crime=="murder" ^ "rape" ^ "Crime3", "violence crime", "property crime")
can someone help me?
crime is binominal attribute btw
0
Answers
Can you try this and see if this works out?
If(Crime=="murder", "violence crime", If(Crime=="rape", "violence crime", If(Crime=="Crime3", "violence crime", "Property crime")))
Best
Varun
Varun
https://www.varunmandalapu.com/
Be Safe. Follow precautions and Maintain Social Distancing
Jan
Scott
Dortmund, Germany
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts
Varun
https://www.varunmandalapu.com/
Be Safe. Follow precautions and Maintain Social Distancing