Re: [R] summary and plot

2013-10-10 Thread arun
Hi, May be: dat1<- read.table(text="city year sex  obs 1  1990  M  25 1  1990  F  32 1  1991  M  15 1  1991  F  22 2  1990  M  42 2  1990  F  36 2  1991  M  12 2  1991  F  16",sep="",header=TRUE,stringsAsFactors=FALSE) library(plyr) #by city  d1 <- ddply(dat1,.(city

Re: [R] summary and plot

2013-10-10 Thread Richard M. Heiberger
This is better for plotting the percents likert(city ~ F + M | year, data=popwide, as.percent="noRightAxis", main="F M population by city within year") likert(year ~ F + M | city, data=popwide, as.percent="noRightAxis", main="F M population by year within city") We can also plot t

Re: [R] summary and plot

2013-10-10 Thread Richard M. Heiberger
## I would use the likert function in the HH package ## if necessary ## install.packages("HH") ## install.packages("reshape") library(HH) library(reshape) pop <- read.table(header=TRUE, text=" city year sex obs 1 1990 M 25 1 1990 F 32 1 1991 M 15 1 1991 F 22 2