Displaying 20 results from an estimated 10000 matches similar to: "hist.default documentation"
2006 Apr 05
1
hist function: freq=FALSE for standardised histograms
Dear All,
I am a undergraduate using R for the first time. It seems like an excellent
program and one that I look forward to using a lot over the next few years,
but I have hit a very basic problem that I can't solve.
I want to produce a standardised histogram, i.e. one where the area under
the graph is equal to 1. I look at the manual for the histogram function and
find this:
freq:
2006 Aug 16
0
Strange behavior with "hist" function filled with breaks and freq attribute
Hy all,
I give example code :
connexions_jours<-c(1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,6,6,7,7,7,7,7,7,7,7,8,8,8,12,15,19)
pas_de_groupe<-1
hist(connexions_jours,col="red",xlab="RĂ©partition du nombre de connexions par jours (sans
2005 Jun 01
3
histogramm?
Hello there!
When I do freq=F on hist, I get on the left a small number, what exactly
does that mean?
Thanks,
Martin
2003 Jan 08
1
Determining the break points by hist() leads to errors (PR#2432)
Hi,
if I dermine the break points using the hist() function and then try
to re-use these in a new histogram, R fails. Here is an example of the
problem:
##First, plot a histogram:
data(islands)
foo <- hist(islands,freq=T)
##Now, try plot it again, with the previously determined break points:
hist(islands,breaks=foo$breaks,freq=T)
##... this lead to the warning message:
Warning message:
2001 Mar 05
1
histogram of frequencies (PR#861)
Full_Name: Dr. Bernd Winkler
Version: 1.2.2
OS: Linux
Submission from: (NULL) (194.59.179.176)
Hi all,
having updated to version 1.2.2 last week I experienced some strange behaviour
of
the hist function.
I want to plot a histogram of frequencies resp. counts, for example poisson
random numbers, on a predefined and fixed x scale
> hist(rpois(500, 2), breaks=0:10)
But instead of the
2000 Nov 17
2
hist() and density
There were some questions about hist() a couple of days ago which
triggered this post. My question/suggestion is about the y-axis in hist.
There are reasons to prefer making the y-axis density=relative
frequency/bin width. One reason is that the height of the plot does not
depend on the bin width; another is that if your histogram is in density
then you can easily superimpose a smooth theoretical
2009 Jul 26
2
problems hist() and density
Hello,
I have a problem with the hist() function and showing densities. The
densities sum to 50 and not to 1! I use R version 2.9.1 (2009-06-26) and
I load the seqinR library.
My data is the following vector:
[1] 0.1400000 0.2000000 0.2200000 0.2828283 0.1600000 0.1600000
0.3600000
[8] 0.1600000 0.2200000 0.2600000 0.2000000 0.3000000 0.2200000
0.2342342
[15] 0.1800000 0.2200000 0.1600000
2006 Aug 25
1
How to get back POSIXct format after calculating with hist() results
Hi,
I have a casting/formatting question on hist.POSIXt:
The histogram plot from POSIXct works perfect (with help of Prof. Ripley
-thanks!).
When processing the hist(plot=FALSE) output and then plotting the
results over the x-axis (bins) coming from hist(), I lose the date/time
labels, getting instead integers displayed.
Trying to cast the $breaks with as.POSIXct gives silly results with
2004 Nov 26
2
hist and truehist
Hello!
Up to now I have been using hist() to display the distributions.
Howevere, I noteiced strange numbers on y (vertical) axis, if I used
probability = T or freq = F option. I thought it is a bug and launched
the R-bug system and found some posts on that matter. Brian Ripley
responded to one, that one should look at truehist() for that. Ok I can
use truehist() if I want to see the ratios
1998 Nov 16
2
hist()
Going over my old notes, I realised that hist() has changed since the
earlier versions of R, in that the intervals are now
left-open,right-closed rather than the opposite. This is a change in
the direction of S-plus compatibility, but I wonder how sensible it
really is.
The main problem is with ages, where you'd naturally take age 17 as
representing something between 17 and 18, but:
>
2011 Jun 09
1
histogram - density on y axis and restriction to interval [0, 1]
Hello,
To indicate probability densities instead of counts on a histogram, I
specify freq = FALSE.
However, I expect that summing all top y coordinates over all the
intervals of the histogram will provide 1.
1)
v <- c(0.2885, 0.2988, 0.3139, 0.2615, 0.3179, 0.3163, 0.2583, 0.3052,
0.2527, 0.3147, 0.3235, 0.2408, 0.2480, 0.3108, 0.3577, 0.2829, 0.2694,
0.3275, 0.3314, 0.2639, 0.3076,
1998 Jan 07
0
hist(.) -- S compatibility : [a,b) versus (a,b] and ....
Looking at Albrech Gebhardt's bug report to R-help (Dec.23)
and proposal for improvement,
I've been also trying several examples and comparing results with S-plus.
Note that we have decided to NOT be fully compatible to S with our hist(.)
function since we found S to be really `wrong' and `unuseful':
S: - The value returned by hist(.) depends on plot=T or plot=F
R: - We return a
2005 Nov 02
2
breaks in hist()
Dear listers,
A quick question about breaks in hist().
The histogram is highly screwed to the right, say, the range of the vector is [0, 2], but 95% of the value is squeezed in the interval (0.01, 0.2). My question is : how to set the breaks then make the histogram look even?
Thanks in advance,
Leaf
2009 Feb 16
1
Adjusting the Axis in a histogram to the prespecified breaks
Hello
I tried a few searches on hist, histogram, equidist and space (space=0 was
mentioned in one contribution), but none of that so far worked. It also says
in the help "##-- For non-equidistant breaks, counts should NOT be graphed
unscaled:" - which is precisely what I am looking for, but I cannot find it.
I want to make a histogram using breaks which are spaced exponentially and
in
2001 May 07
1
unexpected breaks in hist
Hello R-list,
I've been using hist to plot histograms of some data, but I get variable
numbers of bins. I understood from reading the help file that breaks will
set the number of bins. Please correct me if I'm wrong.
I'm plotting measures from subsets of a larger data set. Depending on the
data subset the number of bins varies despite having set breaks to 5 in
all cases.
See
2008 Dec 26
1
histogramm$density
hello,
i am using the hist function with classified values. The class breaks are >1, so
histogram$density is != 1.
How to plot the histogram with freq=FALSE and the real class density values.
I used:
> h2 = hist(value, breaks = breaks_vector)
> h2$density = round(h2$counts/sum(h2$counts), 2)
> h2$intensities = h2$density
> plot(h2, freq=F)
but this isn't the best way, i
2008 May 19
2
How hist() decides breaks?
Hi Folks,
I'd like to know how hist() decides how many cells to use
when it ignores my "suggestion" to use say 'hist(...,breaks=50)'.
More specifically, I have the results of 10000 simulations,
each returning an 8-vector, therefore 8 variables each with
10000 values. Some of these 8 have somewhat skew distributions.
Say one of these 8 variables is X.
I ask for H <-
2006 Feb 17
1
How to change the number of bins in "hist" function?
Hi all,
I am doing histogram using the "hist" function. For some reason, the
histogram does not look good... is there a way I can change the number of
bins, and/or change the way that data gets binned... so that I can obtain a
better looking histogram?
Thanks a lot!
[[alternative HTML version deleted]]
2009 Jun 04
3
Understanding R Hist() Results...
Think I'm missing something to understand what is going on with hist(...)
http://n2.nabble.com/What-is-going-on-with-Histogram-Plots-td3022645.html
For my example I count 7 unique years, however, on the histogram there only 6. It looks like the bin to the left of the tic mark on the x-axis represents the number of entries for that year, i.e. Frequency.
I guess it looks like the bin for
2002 Dec 04
1
Getting Break Points From Hist Function?
Is there any way to extract the break points from a hist function as a
vector so I can later use them for a cut function?
The ultimate goal is to make a frequency table of the data with the same
break points that were used in the histogram.
Thank you in advance.
-Brian
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.