Hi I'm new to R and could use some help. Im supposed to check some data regarding credit defaults.
To see how defaults are for different ratings by moodys I did the following:
Default_pro_rating= CrossTable(ratg, def)
barplot((prozentualer_Ausfall_pro_Rating),xlab = "Rating", ylab = "anteilige Ausfälle", axis.lty = 1, las=2)
This works quite well actually, however, it does not sort them by the right order of the ranking , which would be Aaa, Aa1,..., instead it does A1, A2,A3, Aaa,.....
Does anybody know how I can rearrange my x-axis, I´ve searched all day but nothing seams to work for my problem.