Why does randomForest returns an overall value for variable importance instead of one value per class? In my training dataset I have two classes. I have run rf using the following code
control <- trainControl(method = "repeatedcv", repeats=5, p=.7, sampling = "down") 
fit  <- train(x = training, y = factor(classe), method = "rf", trControl = control, importance=TRUE)

#> fit
#    Random Forest
#    
#     27 samples
#    403 predictors
#      2 classes: 'group1', 'group2'

But rf variable importance returns one overal value 
#rf variable importance
#
#  only 20 most important variables shown (out of 403)
#
#             Overal
#v1           100.00
#v6           96.03
#v8           94.74
#v33          94.18
#v34          92.22
#v67          91.81

and trying 
head(varImp(fit)$importance)
#           group1 group2
#v13        20.87988 20.87988
#v45        20.87988 20.87988
#v67        20.87988 20.87988
#v56        20.87988 20.87988
#v3         20.87988 20.87988
#v34        92.22880 92.22880

Returns exactly the same values while I want to have importance across classes. Is there any option that I should add it in the command?
 A: The reason that the variable importance is overall and not per class is a result of the way that importance is calculated. The importance assigned to a variable is the mean decrease in impurity averaged over all nodes where that variable was used to split the node. Certainly,  the nodes are impure before splitting and often afterwards, so there would be no clear class to assign this change to. A quick example may help. Suppose that you have a node that has 40 points - 10 of each of 4 classes. You use a variable to split the node into two children.  Each child has 20 points - ten from each of two classes.  This would be a pretty useful split, but there is no way to assign credit to just one of the classes. The change in impurity is a statement about how the whole population was subdivided.   This "example" was about one node. The measure is just the average of these changes over all nodes using the given attribute. But the change in impurity is a statement about how well the feature did at simplifying the population, not about how well it worked to identify a particular class.
I think that you are also asking if there is a way to get a per-class importance. If you need such a measure, you could (with some work) get a measure of the importance of a variable in identifying a particular class by recoding the class variable into a binary variable. Given a specific value of the class to be predicted,  class=A,  you could create the binary variable classA which is 1 if class=A and 0 otherwise. Then compute the variable importance in predicting this feature. That should be useful in tying variables to a specific class. I doubt that there could be any useful comparisons of these measures across the different values of the class, that is, I don't think that you can compare the importance of a variable based on classA with the importance base on classB, but still for each class it would tell you something. 
