Re: [R] histogram

From: Erik Iverson <>
Date: Fri, 13 Jun 2008 09:33:31 -0500

Paul Adams 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)
>"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])

Check what the class of your object is

class(dat[2, 23:46])

may be a data.frame. If so, you can try to convert accordingly (see ?as.numeric)

Erik mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri 13 Jun 2008 - 15:14:27 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 13 Jun 2008 - 16:30:44 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive