similar to: Modified Histogram functions

Displaying 20 results from an estimated 20000 matches similar to: "Modified Histogram functions"

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
1997 Dec 23
0
R-beta: bug in hist() (0.60/0.61)
I discovered a bug in hist(). Try the following: x<-c(-5,-4,-4,-4,-3,-3,-3,-3,-2,-2,0,0,0,0,1,1,1,3,3,5,6) # Note that sum(x)<0: sum(x) # [1] -13 hist(x) # looks ok hist(x,freq=F) # negative bars !! # and finally this gives not 1: sum(hist(x,plot=F)$rel.freqs) # [1] -0.8076923 The reason is, that "sum(x)" is used instead of "length(x)" in the following line near
2000 Mar 23
1
Some "new" stuff for hist.R
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-201145637-953833073=:7710 Content-Type: TEXT/PLAIN; charset=US-ASCII Dear all, I've been hacking on histograms the past couple of days. I wanted to do two things, add
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
2009 Jun 30
1
(no subject)
Hi Group, I've a vector of 1000 numeric values for which I want to draw a histogram. I've read this vector into R with no variable name.I mean only the 1000 values, which makes V1 the name of the variable by default?? Then I tried > hist(V1, breaks = "Sturges", +      freq = NULL, probability = !freq, +      include.lowest = TRUE, right = TRUE, +      density = NULL, angle =
2012 Mar 13
1
multi-histogram plotting
I have a vector x: table(x) 2 3 4 5 6 7 8 9 10 11 12 13 14 45547 11835 4692 2241 1386 820 593 425 298 239 176 158 115 15 16 17 18 19 20 21 22 23 24 25 26 27 94 88 76 67 47 46 40 20 30 22 20 33 14 28 29 30 31 32 33 34 35 36
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 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
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
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,
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
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.
2003 Jan 25
7
Plotting coloured histograms...
Hi, I am having some trouble trying to plot a histogram in more than one colour. What I want to do is, plot two vectors in the same histogram, but with different colours, for instance: > x <- rnorm(1000,20,4); > y <- rnorm(1000,10,2); Then I'd like to have x and y ploted on the same hist (I can do that already doing w <- c(x,y) then hist(w)) but the bars
2007 Mar 08
2
Using logarithmic y-axis (density) in a histogram
Hi, I am searching for a possibility to display a logarithimic y-axis in a histogram. With plot that's easy (e.g. plot(1:10, log="y") but for histograms this does not work the same way: I tried hist(rnorm(1000), freq=FALSE, seq(-4, 4, .5), ylim=c(0.001, 0.5), log="y") Which gives the expected histogram but also warnings for my log="y" command
1998 Jul 03
1
R-beta: histogram
Can someone please tell me to make a density histogram? hist makes one with count or relative frequency on the y-axis. I want the density, which is (rel freq)/(bin width) In the help I see: intensities: values f^(x[i]), as estimated density values. If `all(diff(breaks) == 1)', they are the relative frequencies `counts/n' and in general satisfy
2011 Dec 31
1
Histogram omitting/collapsing groups
I have two large datasets (156K and 2.06M records). Each row has the hour that an event happened, represented by an integer from 0 to 23. R's histogram is combining some data. Here's the command I ran to get the histogram: > histinfo <- hist(crashes$hour, right=FALSE) Here's histinfo: > histinfo $breaks ?[1] ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 10 11 12 13 14 15 16 17 18 19 20 21
2009 Jun 22
2
Help needed: Fraction for Histogram > 1 ???
I have been trying to draw histogram for my manscript and found some strange things that I could not figure out why. Using the same code listed below I have successfully draw histograms for a few figures with fraction labeled on Y axis less than 1 (acturally between 0 to 0.1). But one dataset gives the Y axis label 0 to 5 as fraction. This is not true, as fraction are less than 1, although the
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
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
2001 Dec 05
3
Histograms per coding variable
Dear all I have a dataset that looks like: fr.wt site 1 4400 glen 2 235 glen 3 225 glen ' ' ' ' ' ' ' ' ' 82 550 glen 83 550 kom 84 550 kom ' ' ' ' ' ' ' ' ' 191 820 kom 192 2000 soet ' ' ' ' ' ' I need to do a series of histograms for each of the codes, levels or factors in