[R] histogram

jim holtman jholtman at gmail.com
Fri Jun 13 16:30:39 CEST 2008

It is hard to respond without reproducible examples.  Do
str(dat[2,23:46]) and see what it reports.  My guess is that one of
the columns is not numeric.  Find out which one it is, fix it and then
try 'hist' again.

On Fri, Jun 13, 2008 at 10:21 AM, Paul Adams <pma3622 at yahoo.com> wrote:
> Hello everyone,
> I am trying to plot a histogram from the following code:
> dat<-read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt",header=T,row.names=1)
> file.show(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt")
> x<-dat[2,23:46]
> y=mean(x,trim=0,na.rm=T)
> colMeans(dat[2,23:46])
> boxplot(dat[2,23:46])
> hist(dat[2,23:46])
> The box plot is fine but the histogram keeps giving me the error that x
> must be numeric.I am not sure what is wrong here with the instructions
> for the histogram plot.
> Any help would be appreciated
> Paul
>        [[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.

Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

More information about the R-help mailing list