Argyro Antaraki
2008-Nov-14 05:55 UTC
[R] how to plot a variable's histogram in the levels of a second variable(1)
Goodmorning to everyone, I am trying to create a clustered barplot for the following 2 variables who have more cases but as an example i am giving you 10 items: sex聽 socio-economic status 1聽聽聽聽 1 2聽聽聽聽 2 2聽聽聽聽 2 2聽聽聽聽 3 2聽聽聽聽 2 1聽聽聽聽 4 1聽聽聽聽 1 1聽聽聽聽 1 2聽聽聽聽 3 2聽聽聽聽 1 where sex: 1:man, 2:woman 聽聽聽聽聽聽聽聽聽聽 socio-economic status:1:Low, 2:Medium, 3:High, 4:Very High Does anybody came across with a similar graph? Thank you in advance. Argyro Antaraki School of Medicine, Athens University Biomedical Research Institute, Academy of Athens ___________________________________________________________ 围蟻畏蟽喂渭慰蟺慰喂蔚委蟍[elided Yahoo spam]] 螔伪蟻蔚胃萎魏伪蟿蔚 蟿伪 蔚谓慰蠂位畏蟿喂魏维 渭畏 未喂伪胃苇蟿蔚喂 蟿畏谓 魏伪位蠉蟿蔚蟻畏 未蠀谓伪蟿萎 蟺蟻慰蟽蟿伪蟽委伪 魏伪蟿维 蟿蠅谓 蔚谓慰蠂位畏蟿喂魏蠋谓 渭畏谓蠀渭维蟿蠅谓 http://login.yahoo.com/config/mail?.intl=gr [[alternative HTML version deleted]]
Jim Lemon
2008-Nov-14 09:45 UTC
[R] how to plot a variable's histogram in the levels of a second variable(1)
Argyro Antaraki wrote:> Goodmorning to everyone, > > I am trying to create a clustered > barplot for the following 2 variables who have more cases but as an > example i am giving you 10 items: > > sex? socio-economic status > 1? ? ? ? 1 > 2? ? ? ? 2 > 2? ? ? ? 2 > 2? ? ? ? 3 > 2? ? ? ? 2 > 1? ? ? ? 4 > 1? ? ? ? 1 > 1? ? ? ? 1 > 2? ? ? ? 3 > 2? ? ? ? 1 > > where sex: 1:man, 2:woman > ? ? ? ? ? ? ? ? ? ? socio-economic status:1:Low, 2:Medium, 3:High, 4:Very High > > Does anybody came across with a similar graph? >Hi Argyro, You may be able to use the barp function in the plotrix package. You can pass the output of brkdn, freq (both in the prettyR package) or table (in the base package) to get the correct summary values or just build a matrix of the values you want and pass it to barp. See the help page for details of how to do this. Jim
Maybe Matching Threads
- how to plot a variable's histogram in the levels of a second variable
- question on clustered barplot
- Xen 3.2 is not loading on FC8 - Error: Kernel panic - Attempted to kill init
- Updating from an Old to a New version of R
- Calculating Leverage or studentized residuals with gls