[R] Bar Graph

Keniajin Wambui kiangati at gmail.com
Wed Nov 13 09:20:51 CET 2013

The serialno represents each individual in the data set.The total
count of the serialno will represent the whole sample

 I want to do a graph to compare the total data (serialno) vs each of
the remaining five variables yearly. i.e to show the total data
(serialno) vs available data for one of the variables in the above
case temp axilla.

The above code plot count of temp_axilla yearly,how can I include
serialno to be part of the plot?

I have used
utils package

On Tue, Nov 12, 2013 at 11:53 AM, jwd <jwd at surewest.net> wrote:
> On Mon, 11 Nov 2013 18:02:19 +0300
> Keniajin Wambui <kiangati at gmail.com> wrote:
>> I am using R 3.0.2 on a 64 bit machine
>> I have a data set from 1989-2002. The data has four variables
>> serialno, date, admission ward, temperature and bcg scar.
>> serialno admin_ward date_admn bcg_scar temp_axilla yr
>> 70162    Ward2         11-Oct-89       y           38.9 1989
>> 70163     Ward1        11-Oct-91       y             37.2 1991
>> 70164     Ward2       11-Oct-92        n               37.3 1992
>> 70165     Ward1        11-Oct-93        y                38.9 1993
>> 70166     Ward1       11-Oct-94          y              37.7 1994
>> 70167      Ward1       11-Oct-95          y              40 1995
>> I want to do a bar graph of total data (serialno) vs *(data of one of
>> the variables) to show the available data vs total data over the years
>> i am using
>> gplot(dta, aes(temp_axilla, fill=admin_ward)) + geom_bar() +
>>   facet_grid(. ~ yr, scales = "free",margins=F) +
>> geom_histogram(binwidth=300)
>> But can include the serialno which shows the data. how can I achieve
>> this
> You really need to pay better attention somewhere.  There are six
> variables in your example table for instance, not four.  You state you
> want to do something with the serialno variable, but it is not used
> in your bit of code.  Also, given that serialno appears to be
> unique in your example, a bar graph would be singularly uninformative.
> You need to provide a better example of the data, and an actual example
> of the code you are trying to use, including the libraries you've
> loaded.
> jwdougherty
> ______________________________________________
> 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.

Mega Six Solutions
Web Designer and Research Consultant
Kennedy Mwai

More information about the R-help mailing list