# R-program for Supplementary Exercise 1.10 of IPS7e stud <- read.csv("R:/Chapter 1/ex01_010.csv") # in order to extract the counts, we use [[2]] or [["Count"]] sum(stud[[2]]) sum(stud[["Count"]]) # similarly we use stud[[1]] to extract the category names for the plots barplot(stud[[2]], names=stud[[1]]) pie(stud[[2]], labels=stud[[1]])