[R] Create Pie chart from .csv file

DonkeyRhubarb michaeligoe at gmail.com
Wed May 6 14:24:55 CEST 2009

Im more than happy to use a barplot, but at this stage time is just so short
I need something to show. I can find examples of plotting a line of numbers
that has been manually typed into R, but Im missing something to do it from
a CSV file. 

The name of my csv file is OutputFromDB. Would you know what I need to enter
to get anything at all from this?

Many thanks again,


Thomas Roth (geb. Kaliwe) wrote:
> Sorry for mailing to you personally...
> for types
> read.csv(file.choose())
> freqTable = table(types)
> pie(freqTable)
> ##example for some data
> temp = data.frame(types = 1:10)
> pie(table(temp))
> Thomas Roth
> PS: use barplot instead of pie
> DonkeyRhubarb schrieb:
>> Hi all,
>> I am looking to create a pie chart from a given column in a .csv file. 
>> My class variables are as follows:
>> entry_type,	uniquekey,	types, title,	 url, abstract, journal, author,
>> month,
>> year, howpublished
>> So say I want to export a pie chart that groups together all  entries
>> under
>> 'types' e.g. 3 x statistics 2x education etc. Im looking to have a
>> piechart
>> represent this graphically that shows which type of entry is in most
>> frequently. Preferably I'd like to export to a PDF chart and while I can
>> do
>> this by typing variables directly into the R console, I cannot manage it
>> from a .csv file.
>> If you cannot help me with this specific problem, just knowing how to
>> create
>> a generic pie chart would be a great help.
>> This is part of my final software project which is due in one week. I
>> would
>> very much appreciate any help.
>> Many thanks in advance
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

View this message in context: http://www.nabble.com/Create-Pie-chart-from-.csv-file-tp23387025p23405585.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list