s-news
[Top] [All Lists]

Re: use hist to plot frequency distribution

To: Thomas Jagger <tjagger@blarg.net>
Subject: Re: use hist to plot frequency distribution
From: yiwu ye <yiwu21111958@yahoo.com>
Date: Wed, 19 Oct 2005 18:04:35 -0700 (PDT)
Cc: s-news@lists.biostat.wustl.edu
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=5fGNBYY2sTu5Nsq4NSoigAdjsG2th9WI096c3fJKCmX2P3o03AV5tsIzqCeoE0FQ1rdUhZuqEWxuN72C+lT15KBEnQmIEvF2qSzmzd1z4d2JbBYpMODkJWOEFJQcHctly92GqViAS2Vxq0DLMSrMw3fVk3aOErfTHV5Piql/q44= ;
In-reply-to: <20051018063819.9A718276D8F@mail.blarg.net>
Many thanks to Thomas. His suggestion solved my
problem . Thanks, Again. Yiwu

--- Thomas Jagger <tjagger@blarg.net> wrote:

> Hello,
> Yiwu, 
> 
> You need to span the range of your data. 
> That is if 
> rx<-range(x) ## and your set of breaks is mybreaks
> then you get the error if
> 
> rx[1] < min(mybreaks)  || rx[2] > max(mybreaks)
> 
> returns T. So you might use 
> 
> if(rx[1] < min(mybreaks))
> mybreaks<-c(rx[1],mybreaks)
> if(rx[2] > max(mybreaks))
> mybreaks<-c(mybreaks,rx[2])
> 
> hist(x,breaks=mybreaks) #should work, but you might
> want better breaks
> 
> Tom
> 
> 
> Dr. Thomas Jagger
> Florida State University
> Department of Geography
> 
>  
>  
> -----Original Message-----
> From: s-news-owner@lists.biostat.wustl.edu
> [mailto:s-news-owner@lists.biostat.wustl.edu] On
> Behalf Of yiwu ye
> Sent: Monday, October 17, 2005 11:20 PM
> To: s-news@lists.biostat.wustl.edu
> Subject: [S] use hist to plot frequency distribution
> 
> Dear list,
> 
> When I use hist to plot frequency distribution with
> breaks like hist(x,breaks=breaks), an error message
> says "Problem in hist(x, breaks = breaks): breaks do
> not span the range of x. Use traceback() to see the
> call stack". Does anyone know how to solve this
> problem? Thanks for your help.
> Yiwu
> 
> 
> 
> 
> 
>               
> __________________________________ 
> Yahoo! Music Unlimited 
> Access over 1 million songs. Try it free.
> http://music.yahoo.com/unlimited/
>
--------------------------------------------------------------------
> This message was distributed by
> s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to
> s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
> 
>
--------------------------------------------------------------------
> This message was distributed by
> s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to
> s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
> 



        
                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

<Prev in Thread] Current Thread [Next in Thread>