Dear All,

I am getting this error: Error in boxplot$Month : object of type 'closure'
is not subsettable

The following is the codes i am using to produce the boxplot I need for
this daily rainfall data.

## reading the data
rm(list=ls(all=TRUE))
Bungoma=read.csv("/home/fredo/Documents/Maseno/Data/Bungoma_2.csv")
attach(Bungoma)
head(Bungoma)
tail(Bungoma)
summary(Bungoma)
# removing missing values
Bungoma <- na.omit(Bungoma)
summary(Bungoma)
###### split the data by month and boxplot for 0.85mm as the threshold
box_plot=Bungoma[Bungoma$Rain>0.85,]
head(box_plot)
bungoma_boxplot=split(box_plot$Rain,box_plot$Month)
head(bungoma_boxplot)
boxplot(bungoma_boxplot,
names=c("J","F","M","A","M","J","J","A","S","O","N","D"),width =
table(boxplot$Month))
title(main="Boxplot of Rain for each month")

Any idea is welcome on how I can make it and overcome the error. Thanks.

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to