Re: [R] Create Pie chart from .csv file

2009-05-06 Thread DonkeyRhubarb

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,

Michael



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@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.

__
R-help@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.


Re: [R] Create Pie chart from .csv file

2009-05-06 Thread DonkeyRhubarb


Ive found out a way around my problem. I was trying to plaot a histogram of
strings, but I had to change it into integers. I ran an sql query on the
original DB that I got the CSV file from and used COUNT to get the number of
each unique item in a given column. I then used these numbers to create a
histogram in R. It's a round about way of doing it, but it will have to
suffice.

Thanks to all for your tips.
-- 
View this message in context: 
http://www.nabble.com/Create-Pie-chart-from-.csv-file-tp23387025p23410063.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


[R] Create Pie chart from .csv file

2009-05-05 Thread DonkeyRhubarb

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

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

__
R-help@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.


[R] Re ading from a Database

2009-03-18 Thread DonkeyRhubarb

Hi all,

I'm quite new to R and have limited experience. What Im trying to do is very
important as it is part of my final year project; or more so the central
idea behind it.

I will be creating BibTex files to enter into a mySQL database. I then need
to perform operations on this DB like 'return studies similar to x'.

It's really just getting a start at this that I'm having trouble with and if
anyone could offer any advice whatsoever I would be more than grateful.

Many thanks.



-- 
View this message in context: 
http://www.nabble.com/Reading-from-a-Database-tp22578072p22578072.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


Re: [R] Re ading from a Database

2009-03-18 Thread DonkeyRhubarb

Some of the simpler commands could surely be done using SQL-only queries, but
thats too simple for my project. I need to create some more complex commands
that would only be possible using R. Indeed if anyone has any suggestions
for this, Id also appreciate that. Every little bit of information I get
helps me finish college:-)

Thanks for that info Ben and thanks to anyone else who shares some much
needed insight with me.

Ben Bolker wrote:
 
 DonkeyRhubarb michaeligoe at gmail.com writes:
 
 
 I'm quite new to R and have limited experience. What Im trying to do is
 very
 important as it is part of my final year project; or more so the central
 idea behind it.
 
 I will be creating BibTex files to enter into a mySQL database. I then
 need
 to perform operations on this DB like 'return studies similar to x'.
 
 It's really just getting a start at this that I'm having trouble with and
 if
 anyone could offer any advice whatsoever I would be more than grateful.
 
 Many thanks.
 
 
   Hmmm.  This sounds much more like a database question than
 an R question.  R has various interfaces (RmySQL, RODBC, etc)
 for interfaces to relational databases.  Section 4 of the
 R data import/export manual gives quite a bit of detail.
 I think that if you need more information on SQL queries etc.
 you need to start with a local source (who is the advisor
 for your project?)
 
   good luck
 Ben Bolker
 
 __
 R-help@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/Reading-from-a-Database-tp22578072p22587990.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.