You need some help with R markdown
Code chunk - code for exploring a single variable of factor data type:
a) The distribution of a factor variable - For each factor variable and each of this variable's nominal values, find out and show the percentage of instances that include the nominal value.
b) Choose two factor variables. For each factor variable, show a barplot of the number of instances (or count) with a nominal value for each possible value. The bars should be arranged in descending order of instance count. Show a descriptive title in each plot.
c) For each of the other three factor variables, retrieve and save the number of levels.
This are the variables I have in my data:
> str(BartRider) 'data.frame': 5493 obs. of 12 variables: $ Age : int 7 7 3 1 3 1 2 3 7 2 ... $ DistToWork : int 14 10 9 13 14 12 10 13 9 10 ... $ DualInc : chr "N" "N" "N" "N" ... $ Education : int 3 5 3 2 5 2 4 5 3 4 ... $ Gender : chr "F" "M" "M" "M" ... $ Income : int 3 8 1 1 2 1 3 6 4 8 ... $ Language : chr "English" "English" "English" "English" ... $ NbrInHouseHold : int 1 2 1 5 3 5 4 1 2 2 ... $ NbrInHouseholdUnder18: int 0 0 0 3 1 0 2 0 0 0 ... $ OwnRent : chr "Rent" "Own" "Rent" "Parent" ... $ YrsInArea : int 5 5 5 5 5 5 2 5 4 5 ... $ Rider : chr "Yes" "No" "Yes" "Yes" ...
Let me know if more infor is needed