temiz <[EMAIL PROTECTED]> wrote in news:478225E1.5010706 @deprem.gov.tr:
> hello > > which graph can I use for categoric var. vs categoric var. ? plot() works if there is a method for the class of object. Here is an example with contingency table given to plot() that appeared on the list last month: tbl<-r2dtable(1,c=4*c(15,12,8,5),r=4*c(20,10,5,5)) tbl #[[1]] # [,1] [,2] [,3] [,4] #[1,] 27 23 21 9 #[2,] 18 11 5 6 #[3,] 8 6 2 4 #[4,] 7 8 4 1 # > class(tbl) # [1] "list" ITS=factor(rep(LETTERS[1:4])) DMS=factor(rep(LETTERS[1:4])) df<-data.frame(counts=unlist(tbl),expand.grid(DMS,ITS)) names(df)<-c("counts","DMS", "ITS") df (df.tbl<-xtabs(counts~DMS+ITS,df)) # ITS # DMS A B C D # A 27 23 21 9 # B 18 11 5 6 # C 8 6 2 4 # D 7 8 4 1 plot(df.tbl) -- David Winsemius ______________________________________________ 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.