Sign In
Register
乐鱼官网手机版下载
Solutions
乐鱼体育安装
Pricing
Partners
Company
Howdy, Stranger!
It looks like you're new here. Sign in or register to get started.
Sign In with RapidMiner
Sign In with RapidMiner
Sign In
Register
Quick Links
Categories
Recent Discussions
Best Of...
Unanswered
Groups
Categories
所有类别
19.8K
Help
442
Knowledge Base
Altair RapidMiner Community
GET HELP. LEARN BEST PRACTICES. NETWORK WITH YOUR PEERS.
Discussion
How can I use more than 1 conditions in an IF statement to create a new attribute?
Author
Date within
1 day
3 days
1 week
2 weeks
1 month
2 months
6 months
1 year
of
Examples: Monday, today, last week, Mar 26, 3/26/04
Search
0 Comments
0 Discussions
0 Members
0 Online
ASK A QUESTION
FIND HELPFUL VIDEOS
Home
›
Help
How can I use more than 1 conditions in an IF statement to create a new attribute?
scooped
Member
Posts:
1
Newbie
November 2021
in
Help
I use if(contains("SCOOP EGG",[subclass_english]),1,0) but I also want the result to come out to be 1 if there are other conditions like SCOOP EGG PAPER, PLANTS, BALLOONS within the same statement
0
Answers
BalazsBarany
Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert
Posts:
953
Unicorn
November 2021
Hi!
Generally, can use the && operator for a logical AND and || for a logical OR concatenation of your conditions.
So the expression would be something like
if(contains(...) || contains(...) || contains(...), 1, 0)
But if() in Generate Attributes has three parameters anyway, so you can put your conditions inside the if() if you want.
if(contains(...), 1,
if(contains(...), 1,
if(contains(...), 1,
0
)
)
)
Regards,
Balázs
0
Sign In
or
Register
to comment.
Answers
Generally, can use the && operator for a logical AND and || for a logical OR concatenation of your conditions.
So the expression would be something like
if(contains(...) || contains(...) || contains(...), 1, 0)
But if() in Generate Attributes has three parameters anyway, so you can put your conditions inside the if() if you want.
if(contains(...), 1,
if(contains(...), 1,
if(contains(...), 1,
0
)
)
)
Regards,
Balázs