If there are many character variables,and I want to get the mosaic plot of every pair of each variable,how to do then?
If the variables are numeric, I can use pairs to get paired scatter plot. But as to the character variables, how to get the "paired mosaic plot"? Many thanks. -- QQ: 1733768559 At 2015-02-07 17:04:26,"Jim Lemon" <drjimle...@gmail.com> wrote: >Hi meng, >It's not too hard to get a mosaic plot of two character variables: > >x<-sample(LETTERS[1:3],20,TRUE) >y<-sample(LETTERS[24:26],20,TRUE) >mosaicplot(table(x,y)) > >If you could tell us how the above is not what you want, perhaps a >better suggestion will appear. > >Jim > > >On Sat, Feb 7, 2015 at 6:29 PM, meng <laomen...@163.com> wrote: >> If both x and y are all character, paired scatter plot is a little bit >> strange I think. >> >> >> >> >> >> >> -- >> QQ: 1733768559 >> >> >> >> >> >> At 2015-02-06 23:52:34,"Duncan Murdoch" <murdoch.dun...@gmail.com> wrote: >>>On 06/02/2015 6:46 AM, meng wrote: >>>> Hi all: >>>> If there are two numeric variable:x,y, and I can get paired scatter plot >>>> by function "pairs".But if x and y are character, and I want to get paired >>>> mosaic plot,which function should be used then? >>> >>>Why not pairs, with a custom panel function? There are examples on the >>>help page, though I don't think a mosaic plot is there. >>> >>>Duncan Murdoch >>>> >>>> >>>> Many thanks! >>>> My best. >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> QQ: 1733768559 >>>> >>>> >>>> [[alternative HTML version deleted]] >>>> >>>> ______________________________________________ >>>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >>>> 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. >>> >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.