[R] Decision Tree Issue: Why does tree() not pick all variables for the nodes

2018-06-06 Thread nguy2952 University of Minnesota
I am working on a project at my work place and I am running into some issues with my decision tree analysis. THIS IS NOT A HOMEWORK ASSIGNMENT. Sample dataset PRODUCT_SUB_LINE_DESCR MAJOR_CATEGORY_DESCR CUST_REGION_DESCR SUNDRYSMALL EQUIP NORTH EAST

[R] Regroup and create new dataframe

2018-06-01 Thread nguy2952 University of Minnesota
Hello folks, I have a big project to work on and the dataset is classified so I am just going to use my own example so everyone can understand what I am targeting. Let's take Target as an example: We consider three brands of tape: Target brand, 3M and Avery. The original data frame has 4 columns: