[R] Help on Histogram ~ Barplot
David Winsemius
dwinsemius at comcast.net
Wed May 27 19:14:06 CEST 2015
On May 27, 2015, at 2:28 AM, Shivi82 wrote:
> Hello All,
> I need help on creating a histogram for one of my data. The data is as below
> (sample):
> MFST_WT Hours PROCESS Month Weekday Day of the Month
> 6,828 13 INBOUND Mar Fri 13
> 2,504 16 INBOUND Mar Fri 27
> 20 16 INBOUND Mar Fri 27
> 10,262 16 INBOUND Mar Fri 27
> 2,500 17 INBOUND Mar Fri 13
> 3,938 16 INBOUND Feb Thu 26
> 798 10 INBOUND Feb Sat 14
> 5,439 15 INBOUND Feb Mon 16
>
What I'm seeing here is the likelihood that the data object has been input incorrectly (or is a mess in the original file?) There appear to be commas in what would presumably be a numeric column and a column name with spaces in it. There is also misregistration of some lines of data possible with tab-characters that were eaten by Nabble's interface. If you want help under these circumstances you should either respond with the first 20 lines of the original data file posted through a mail-client bypassing Nabble or post dput( head(objname, 20))
> This data has these columns and total rows are 45000.
> Now I need to group the data and create a bar plot based on total weight on
> a monthly basis. The code I have used is:
> barplot(mwlc$MFST_WT, names.arg = mwlc$Month, las=2, ylim=c(0,10000), col
> ="red",
> border="orange", main="Monthly Weight")
> but this is showing an error. Please suggest.
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Help-on-Histogram-Barplot-tp4707739.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list