similar to: (PR#8376 inconsistency between plot(hist(...)) and hist(...)

Displaying 20 results from an estimated 20000 matches similar to: "(PR#8376 inconsistency between plot(hist(...)) and hist(...)"

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
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:
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
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:
2003 Mar 08
2
hist() basic question
Hi, This is a very basic question, but I would like to undestand hist(). I thought that the hist( , freq=FALSE) should provide the relative frequencies (probabilities), and so they should sum 1, however: set.seed(2) ah <- hist(rnorm(100), freq=F) sum(ah$intensities) [1] 2 set.seed(2) bh <- hist(rlnorm(100), freq=F) sum(bh$intensities) [1] 0.4999996 I'm getting similar figures with
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
2013 Jan 22
3
density of hist(freq = FALSE) inversely affected by data magnitude
Hi, I have a couple of observations, a question or two, and perhaps a suggestion related to the plotting of density on the y-axis within the hist() function when freq=FALSE. I was using the function and trying to develop an intuitive understanding of what the density is telling me. After reading through this fairly helpful post:
2009 Aug 19
1
Fw: Hist & kernel density estimates
For the hist estimate >par(mex=1.3) >dens<-density(q) >options(scipen=4) > ylim<-range(dens$y) > h<-hist(q,breaks="scott",freq=FALSE,probability=TRUE, +? right=FALSE,xlim=c(9000,16000),ylim=ylim,main="Histogram of q(scott)") > lines(dens) >box() ? For the kernel estimate>options(scipen=4) > d <- density(q, bw =
2011 Dec 07
2
Hist and extra space
Hi everyone. I have an histogram like this one: http://imageshack.us/photo/my-images/442/dfsdfsdj.jpg/ I would like to remove the extra space under the histogram so it "touch" the x axis. Is it possible? Here's my code. hist(X, freq = F, col = 'gray', axes = FALSE) abline(v = cyano_euk_min, col = 'red', lty = 3, lw = 2) abline(v = cyano_euk_max, col =
2005 Jun 17
1
hist.default documentation
I think there are a couple of things in ?hist that are not quite as clear as they could be. (1) freq: logical; if 'TRUE', the histogram graphic is a representation of frequencies, the 'counts' component of the result; if 'FALSE', _relative_ frequencies ("probabilities"), component 'density', are plotted. Defaults to
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
2000 Jul 09
1
Modified Histogram functions
Dear all, I have done further modifications on the histogram functions that I reported earlier this year, and I hope this can be of use and perhaps included in the distribution. I have been using this stuff a couple of months myself, and while it is nothing sophisticated, it has it's applications. :-) I did a few small modifications today to make it a bit more compact. I have modified the
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,
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
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
2004 Aug 21
1
relative frequencies for hist()
I have problems getting a histogram with relative frequencies on the y-axis. Here is an example data set: > a <- c(4.626, 4.627, 4.627, 4.628, 4.629, 4.629, 4.630, 4.631, 4.632, 4.632) > d = hist(a,freq=F) > d$density [1] 299.9999 100.0000 200.0000 100.0000 100.0000 200.0000 The obtained densities are given by counts/(total n * bin width), with bin width being
2005 Jan 05
1
hist.POSIXt filled bars - axis color changes
Hi all, I'm plotting a histogram of dates and would like to shade the bars, e.g. hist(.leap.seconds,"years",col='gray',freq=T) -but the axis color also changes, how do I prevent that? thx in advance Janus [[alternative HTML version deleted]]
2008 Jan 31
1
Bug with hist() ?
Hi, Is this a bug from hist() ? The total density is greater than 1. > test [1] 0.05077802 -0.50585520 -0.98053648 -0.35513059 0.86767129 0.61736097 [7] 0.14264062 0.26243841 -0.41477782 0.64172618 0.87230953 -0.62570629 [13] 0.43596467 -0.93214106 -0.26781599 > h <- hist(test, freq = FALSE, main="Histogram of correlation", ylab = "Frequency", xlab =
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
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