How would I make a population histogram in R from an excel file? Thanks [[alternative HTML version deleted]]
1. Read the posting guide:
http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
2. Did you installed R?
2.1. Case yes, go to the help, click on "Manual in PDF"
bests
miltinho
On Wed, Dec 9, 2009 at 1:47 PM, terry johnson
<terry.johnson.007@gmail.com>wrote:
> How would I make a population histogram in R from an excel file? Thanks
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]
On 12/10/2009 05:47 AM, terry johnson wrote:> How would I make a population histogram in R from an excel file? Thanks >Hi Terry, library(gdata) ozpop<-read.xls("ozpop.xls") xycol<-color.gradient(c(0,0,0.5,1),c(0,0,0.5,1),c(1,1,0.5,1),18) xxcol<-color.gradient(c(1,1,0.5,1),c(0.5,0.5,0.5,1),c(0.5,0.5,0.5,1),18) library(plotrix) par(mar=pyramid.plot(ozpop$Male,ozpop$Female,labels=ozpop$Age, main="Australian population pyramid 2002",xycol=xycol,xxcol=xxcol)) Jim
On 12/10/2009 04:39 PM, Jim Lemon wrote:> On 12/10/2009 05:47 AM, terry johnson wrote: >> How would I make a population histogram in R from an excel file? Thanks > Hi Terry, > > library(gdata) > ozpop<-read.xls("ozpop.xls") > xycol<-color.gradient(c(0,0,0.5,1),c(0,0,0.5,1),c(1,1,0.5,1),18) > xxcol<-color.gradient(c(1,1,0.5,1),c(0.5,0.5,0.5,1),c(0.5,0.5,0.5,1),18) > library(plotrix) > par(mar=pyramid.plot(ozpop$Male,ozpop$Female,labels=ozpop$Age, > main="Australian population pyramid 2002",xycol=xycol,xxcol=xxcol)) > > JimOops, sorry, XLS files must be verboten, as the example data I sent seems to have disappeared. Jim