An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121121/31e80752/attachment.pl>
histogram help
3 messages · Rosario Scandurra, John Kane, Jim Lemon
i think we need some sample data. I would not have thought that you could calculate the percentage of a categorical data so perhaps a simple example of what you are doing would help. John Kane Kingston ON Canada
-----Original Message----- From: rosario.scandurra at gmail.com Sent: Wed, 21 Nov 2012 19:15:53 +0100 To: r-help at r-project.org Subject: [R] histogram help Hi, I want to generate an histogram and plot on the y axis the percentage of a categorical variable and on the x axis a nominal variable. I want to move the origin to have 2 categories below 0. Hope somebody could help me. Thanks. Best, -- Rosario Ivano Scandurra [[alternative HTML version deleted]]
______________________________________________ R-help at 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.
____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more!
On 11/22/2012 05:15 AM, Rosario Scandurra wrote:
Hi, I want to generate an histogram and plot on the y axis the percentage of a categorical variable and on the x axis a nominal variable. I want to move the origin to have 2 categories below 0. Hope somebody could help me. Thanks.
Hi Rosario, If you already have your percentages, the barplot function will display them like most people expect an histogram to look by setting space=0. See the "names.arg" argument to have the names of your nominal variables on the x axis. I'm not sure exactly what you mean by wanting 2 categories below 0. If these are negative percentages, the barplot function will automatically handle them. Jim