[R] histogram breaks

2010-04-16 Thread casperyc

===
Q2=c(
+ sample(10:19,8,T),
+ sample(20:24,15,T),
+ sample(25:29,25,T),
+ sample(30:39,18,T),
+ sample(40:49,12,T),
+ sample(50:64,7,T),
+ sample(65:89,5,T)
+ )


hist(Q2)

can give me a histogram,

however, how do i get a different 'breaks'?

i want to be break down into the intervals
as my 'sample'?

i.e. the 1st interval is 10:19
   2nd  20:24
  3rd25:29

as the Q2

Thanks!

casper
-- 
View this message in context: 
http://n4.nabble.com/histogram-breaks-tp2013487p2013487.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


Re: [R] histogram breaks

2010-04-16 Thread Daniel Malter
?hist shows you the options

-
cuncta stricte discussurus
-
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of casperyc
Sent: Friday, April 16, 2010 3:56 PM
To: r-help@r-project.org
Subject: [R] histogram breaks


===
Q2=c(
+ sample(10:19,8,T),
+ sample(20:24,15,T),
+ sample(25:29,25,T),
+ sample(30:39,18,T),
+ sample(40:49,12,T),
+ sample(50:64,7,T),
+ sample(65:89,5,T)
+ )


hist(Q2)

can give me a histogram,

however, how do i get a different 'breaks'?

i want to be break down into the intervals
as my 'sample'?

i.e. the 1st interval is 10:19
   2nd  20:24
  3rd25:29

as the Q2

Thanks!

casper
-- 
View this message in context:
http://n4.nabble.com/histogram-breaks-tp2013487p2013487.html
Sent from the R help mailing list archive at Nabble.com.

__
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.

__
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.