[R] more on bwplot problem

James Rome jamesrome at gmail.com
Fri Apr 16 21:44:20 CEST 2010


Alas, no one answered my last post about my problem of doing bwplot.

I think  my problem is related to the fact that there is a value missing
in my data:
 levels(as.factor(gdf$OnHour))
 [1] "0"  "1"  "2"  "4"  "5"  "6"  "7"  "8"  "9"  "10" "11" "12" "13"
"14" "15"
[16] "16" "17" "18" "19" "20" "21" "22" "23"

Notice that "3" is missing.

But I really needthe plot on an x-axis going from 0-23 for every hour
because different data sets are missing different hours, and I need to
be able to compare the plots.

To convert OnHour (an integer) to a factor, I did
mdf$OnHFact = factor(mdf$OnHour, levels=seq(0,23),
labels=as.character(seq(0,23)), exclude=NULL, ordered=TRUE)

So, how do I get bwplot to skip the missing 3 am data value and put the
boxes on their correct locations?

Thanks,
Jim



More information about the R-help mailing list