I am working with a data set that looks like this:
ClusterID URL Text_Body
0 www.text.com texttexttexttexttext.....
1 www.text1.com texttexttexttexttext.....
2 www.text2.com texttexttexttexttext.....
3 www.text3.com texttexttexttexttext.....
4 www.text4.com texttexttexttexttext.....
5 www.text5.com texttexttexttexttext.....
6 www.text6.com texttexttexttexttext.....
7 www.text7.com texttexttexttexttext.....
8 www.text8.com texttexttexttexttext.....
Lets call this data set "onlinearticles". ClusterID is the cluster that an article appears in, url is the distinct url for each article, and text body is the actual article. I need to build an additional column which assigns a value of 1 to any row belonging to clusterID 0, 4, 6, and 7. Any other clusterID should have a value of 0. I need to build this column in order to do a regression tree. How can I go about building said column?