R randomForest - is my variable treated as quantitative or categorical? I am using randomForest and obtain a model:
Shoppers.rf <- randomForest(repeater ~ . - id, data=trainData,
                  importance=TRUE, ntree=1000, mtry=15, nodesize=50, maxnodes = 100)
varImpPlot(Shoppers.rf, type=2)


The diagram tells me that the 'brand_penetration' variable is the most interesting to predict the response.
But if I look at the raw data, I get a feeling there the algorithm is treating 'brand_penetration' as a categorical variable instead of a quantitative one.
Here is a barplot of the success ratio per brand_penetration:

How can brand_penetration possibly be useful to predict the response given the plot above, except if it is used as a categorical variable?
But since I pass this variable as a 'int', I am puzzled. Should it not be used as a quantitative input by randomForest? I have tried converting to 'num', but get the same result.
 A: Checking with the command:
getTree(Shoppers.rf, k=1, labelVar=TRUE)

I could see that the variable is indeed treated as quantitative:
> getTree(Shoppers.rf, k=1, labelVar=TRUE)
    left daughter right daughter         split var   split point status prediction
1               2              3     tr_id_cat_cnt  9.500000e+00      1       <NA>
2               4              5 brand_penetration  1.213435e+05      1       <NA>
3               6              7   id_brand_cnt_60  5.000000e-01      1       <NA>
4               8              9 brand_penetration  3.548000e+03      1       <NA>
5              10             11      brandNbTrans  5.281240e+05      1       <NA>
6              12             13      avgItemPrice  2.558902e+00      1       <NA>
7              14             15      brandNbTrans  2.795950e+05      1       <NA>
etc

I am still puzzled as why the split value of 1.213435e+05 can help classify... but that seems to be the model.
A: It's hard to give a precise answer of why this is happening without looking at the data myself, but a simple thing to try is to regrow the random forest without brand_penetration, and compare the out-of-bag error between the old and new forests. In my mind, it is correct to call brand_penetration an important predictor if and only if its presence substantially increases predictive accuracy, which you can estimate with out-of-bag error.
A: From your graph it is clear that lowermost 2 brand_penetration have high success and highest 2 brand_penetration have much lower successes, and that is being reflected in importance. The middle brand_penetration values have sometimes high and sometimes low success rates, so their average would be intermediate. 
