The first step (reading in the csv) is pretty simple:
data = read.table("filename.csv",
sep = ",", quote = "",
The ‘sep’ part makes it clear that the separator is a comma, and ‘header’ keeps those column headings separate from the rest of the data.
Does that work for you?
solved Using R – Read CSV , aggregate/percent column