I am new in R and trying to convert VIF results into dataframe to feed it to ggplot:
vif_values <- car::vif(model_vif_check_aliased$finalModel)
vif_values
############ output ###############
       duration       nr.employed         euribor3m             pdays 
         1.016706         75.587546         80.930134         10.216410 
     emp.var.rate  poutcome.success         month.mar     cons.conf.idx 
        64.542469          9.190354          1.077018          3.972748 
contact.telephone          previous               age    cons.price.idx 
         2.091533          1.850089          1.185461         28.614339 
        month.jun       job.retired 
         3.936681          1.198350 
ISSUE: When I convert this into data frame then name of variables comes into index rather than as a separate column:
as.data.frame(vif_values) 
############ output ###############
 
               vif_values
               <dbl>
duration       1.016706         
nr.employed    75.587546            
euribor3m      80.930134            
pdays          10.216410            
emp.var.rate    64.542469           
poutcome.success    9.190354            
month.mar      1.077018         
cons.conf.idx   3.972748            
contact.telephone   2.091533            
previous       1.850089
How do I make this as data frame of two column so that I can use this in ggplot to create a barplot of variable names with their values ?
ggplot(aes(x=var_name, y=vif_values)+
 geom_col(col="blue")+
 coord_flip()