similar to: R-beta: histogram

Displaying 20 results from an estimated 20000 matches similar to: "R-beta: histogram"

2004 Aug 19
3
probability histogram question
Hello, all; I get an unexpected result when trying to plot a probability histogram with R1.9.1 on windows xp: #with the following code: > x <- runif(100,0,1) > hist(x) > hist(x, freq=F) > h <- hist(x, freq=F) > summary(h) # Length Class Mode #breaks 11 -none- numeric #counts 10 -none- numeric #intensities 10 -none- numeric #density 10
2003 Mar 27
1
Deprecated component in plot.histogram (PR#2696)
Hi everyone, As "intensities" is deprecated as a synonym for "density" in the output of hist it would be a good idea to replace its occurence with "density" in plot.histogram, where we currently have y <- if (freq) x$counts else x$intensities Note that, to add to the confusion, x$density is also referred to in plot.histogram. Cheers, Jonathan.
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
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
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
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:
2009 Apr 22
1
converting histogram to barchart
Hi list, After a lot of tweaking i have managed to create a histogram with an overlaying density plot. The histogram shows a sample of birth weights of babies and the density plot shows birth weights from a much larger reference populaton. My data is divided in 0.1 Kg bins so in the code below binweigh=0.1. The trouble with the current graph is that it is not very clear since the density plot
2011 May 24
1
histogram with density
Hello All,* *I want to draw a histogram with density curve. * *For that simply i created a data called*"x" *and i used the function called * hist(x, col = "blue", freq = FALSE),** *from this function i got a histogram*. *After that , i tried this function* ** lines(density(x), col = "red", lwd = 2 ) *but i could not get the density curve. So, Again i used
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,
2007 Jun 19
2
Histogram
Hello, I am using the following codes to plot a histogram and density line for x. For the density line, I just want it to show the two tails, eg, for x larger than 0.05 ans smaller than -0.05 hist (x, seq(-0.1,0.1,0.01),freq = FALSE) lines (density(x,bw="SJ"), x> 0.05 & x< (-0.05), col = "red") But is does not work, can anyone give me some advice? -- View this
2001 Aug 29
1
bug in histogram rendering (PR#1080)
Full_Name: Leslea J. Lehoucq Version: 1.3.0 OS: Solaris 7 Submission from: (NULL) (134.253.26.10) When one creates a histogram with the freq=FALSE (i.e. plot the density on the Y-axis), the density values are off by a factor of 10. For instance, a bin in which 50% of the plotted values fall is marked 0.05, not 0.50, on the Y-axis. Instead of the density summing to 1.0, it sums to 0.1.
2009 May 09
2
Histogram frequencies with a normal pdf curve overlay
Dear List, When I plot a histogram with 'freq=FALSE' and overlay the histogram with a normal pdf curve, everything looks as expected, as follows: x <- rnorm(1000) hist(x, freq=FALSE) curve(dnorm(x), add=TRUE, col="blue") What do I need to do if I want to show the frequencies (freq=TRUE) with the same normal pdf overlay, so that the plot would still look the same? Regards,
2008 Aug 07
2
histogram - freq=FALSE - density computation
Hi, I don't understand what hist(x, freq=FALSE) does. At first I thought it would be just the relative frequencies instead of the absolute frequencies, by just computing "frequencies / n" in every category. But with a small dataset the y-values (densities) don't sum to one. Is there a way to get the histogram doing that? Or what is the idea of this density-computation?
2009 Dec 09
3
Plotting frequency curve over histogram
Hello, This is a problem for which there seem to be several solutions online, but not really. My question was about plotting a curve over the histogram. All the previous posts and messages talk about generating a *density histogram*using (freq=F) and then plotting the density curve. However, I find that that seriously distorts my data and the plot becomes confounding to the viewer. I was
2011 Jul 14
2
Add a density line to a cumulative histogram - second try
Hi list, this is my second try for first post on this list (I tried to post via email and nothing appeared in my email-inbox, so now I try to use the nabble-web-interface) - I hope that you will only have to read one post in your inbox! Okay, my question ... I was able to plot a histogram and add the density()-line to this plot. I was able to plot a cumulative form of this histogram. Yet, I was
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 10
3
Multiple density curves
Hi, I am new to R...a recent convert from SAS. I have a dataset that looks like this: SEQ A1 A2 A 532.5 554.5 B 25.5 35.5 C 265.2 522.2 D 245.55 521.56 E 546.52 141.52 F 243.25 32.56 G 452.55 635.56 H 15.14 16.54 I 543.4 646.56 J 54.4 654.5 K 646.5 64.54 L 645.4 614.46 M 646.54 634.46 I want to make a histogram
2011 Jan 13
3
Question about histogram
Dear list, I'm new to R, please bear with my silly questions. I'm trying to get an understanding of why the results I get from a call to hist() are not as I thought I would get. When I use the parameter freq=FALSE, I think the plot will contain bars that none of them is larger than 1, because they're probabilities. But for my code, the bars exceeded 1. The actual data seems
2007 Jun 01
2
tapply histogram
Dear members, I would like to pass the histogram settings to each subset of the dataframe, and generate a multiple figures graph. First, can anyone tell me how to generate a multiple figures environment? I am trying mfrow=c(2,4) and nothing appears. Secondly, I want to pass the following function in tapply() hist(x, freq=FALSE) lines(density(x), col="red") rug(x) how can I manage
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