similar to: normalized frequency histogram

Displaying 20 results from an estimated 3000 matches similar to: "normalized frequency histogram"

2007 Nov 28
1
Histograms and Sturges rule
Dear All, According to the Sturges rule, the number of classes of a histogram is the closest integer to 1 + logb(n,base=2) where n is the number of observations. The function hist(), by default, uses the Sturges rule. However, the code x <- 1:200 hist(x) produces a histogram with 10 classes and not 9 classes as determined by the Sturges rule. What am I missing? Thanks in advance, Paul
2010 Jul 15
0
Histogram with two groups on the same graph (not on separate panels)
I have been trying to produce a histogram that has two groups (male and female snakes) on the same graph (either superimposed or each frequency bar appears side by side). I found a couple of functions for superimposed histogram written by other people. The below is the codes I used for my data containing a column of svl (body size; snout-vent length) and another column of sex (male or female).
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 <-
2010 Nov 19
1
Color Alaska in USA map
Hello: I have a problem when I tried to color the USA map with different colors. The following is my data (I only used the second column of data): alaska, 1, 2 Hawaii, 0, 0 USA, 5, 5 And here is my code: library("latticeExtra") library("mapproj") state<-read.table("C:\\usaclass.txt",sep=",") state
2005 May 24
1
Contingency tables from data.frames
Dear list, I'm trying to do a set of generic functions do make contingency tables from data.frames. It is just running "nice" (I'm learning R), but I think it can be better. I would like to filter the data.frame, i.e, eliminate all not numeric variables. And I don't know how to make it: please, help me. Below one of the my functions ('er' is a mention to EasieR,
2005 Jul 07
1
Tables: Invitation to make a collective package
Hi All, I would like to make an invitation to make a collective package with all functions related to TABLES. I know that there are many packages with these functions, the original idea is collect all this functions and to make a single package, because is arduous for the user know all this functions broadcast in many packages. So, I think that the original packages can continue with its
2005 Oct 20
1
having scaling problems with a histogram
Hello,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> I would like to create a histogram from a data collumn consisting of 4 classes (0; 0.05;0.5;25;75). Due to the difference in scale the classes 0;0.05 and 0.5 are displayed within one combined bin by default with the code:Hist(x, scale="percent",
2006 Nov 30
1
scaling y-axis to relative frequency in multiple histogram (multhist)
Hi, I'm plotting a multiple histogram using the function multhist {package plotrix}, something like: library(plotrix) mh <- list(rnorm(200, mean=200, sd=50), rnorm(200, mean=250, sd=50)) multhist(mh) In this graph y-axis represents the frequency of observations.... but I would like it to be scaled into relative frequencies, does anybody know how to do this with multhist or similar
2004 Mar 01
6
How to plot Histogram with frequence overlaid by distribution curve
Hi, I am facing the problem that I want to plot a histogram chart set freq to true and overlay with normal or weibull or exponential distribution curve. The sample code is shown as below: >samp<-c(-8.2262,-8.2262,-8.2262,-8.20209,-8.09294,-8.07321,-8.07321, -8.07321,-8.07175,-8.04948,-8.04948,-8.04948,-8.03848,-8.03848,
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 =
2011 Apr 22
1
histogram of dates
I can't seem to get a histogram of dates: tmt910% R --vanilla R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 ... > temp <- as.Date(1:200, origin="1970/01/01") > range(temp) [1] "1970-01-02" "1970-07-20" > hist(temp) Error in .Internal(inherits(x, what, which)) : 'x' is missing
2006 Nov 07
1
histogram bin width
hi all : i have the data below and then below that, i call the hist function three times using the Scott method for the widths of the bins. the bin width is different for the three histograms but I would like it to always be 0.05 regfardless of the data set being histogrammed. I'm sure there must be a manual way to do this which is fine with me. i tried breaks=0.05 but it wasn't happy
2006 Sep 29
2
X-axis labels in histograms drawn by the "truehist" function
Hi, I have a simple problem that I would appreciate getting some tips. I am using the "truehist" function within an "apply" call to plot multiple histograms. I can't figure out how to get truehist to use the column names of the matrix as the labels for the x-axis of the histograms. Here is a simple example: X <- matrix(runif(4000),ncol=4) colnames(X)
2011 Mar 03
3
Probabilities greather than 1 in HIST
Dear all, I am a newbie in R and could not find help on this problem. I am trying to plot an histogram with probabilities in the y axis. This is the code I am using: #TLC uniform n=30 mi=1; mx=6 nrep=1000 xbar=rep(0,nrep) for (i in 1:nrep) {xbar[i]=mean(runif(n,min=mi,max=mx))} hist(xbar,prob=TRUE,breaks="Sturges",xlim=c(1,6),main=paste("n =",n), xlab="Média",
2007 Apr 25
1
omit y=zero line in histogram
Dear all, hist ( ) plots a horizontal line at y=0 when the respective bin is empty. I can deal with this by modifying the hist object before plotting it (x$density[x$density == 0] <- NA), but I'm sure I've seen a more elegant way. Perhaps this was in truehist (MASS). I have looked but can't find it. Does anyone know? Best wishes Paul -- View this message in context:
2002 Mar 23
1
Normal behavior or bug?
>selectiris<-sample(1:5, 150, replace=T) > hist(selectiris, plot=TRUE) #freq=TRUE, breaks=5, etc all do the same thing >truehist(selectiris) Is the behavior of "hist" in this sample of code correct. On my system (Windows 2K, SP2) the first and second bars are pushed together, while the 3rd, 4th, and 5th bars are correctly positioned. The function "truehist"
2008 Oct 21
5
how to plot the histogram and the curve in the same graph
i want to plot the histogram and the curve in the same graph.if i have a set of data ,i plot the histogram and also want to see what distribution it was.So i want to plot the curve to know what distribution it like. -- View this message in context: http://www.nabble.com/how-to-plot-the-histogram-and-the-curve-in--the-same-graph-tp20082506p20082506.html Sent from the R help mailing list archive at
2009 May 12
1
lattice histogram for multiple variables : adjusting x axis
Hello all, I have a large data frame and I want to look at the distribution of each variable very quickly by plotting an individual histogram for each variable. I'd like to do so using lattice. Here is a small example using the iris data set: histogram(as.formula(paste("~",paste(colnames(iris[,!sapply(iris,is.factor)]),collapse="+"))),data=iris[,!sapply(iris,is.factor)])
2010 Apr 16
2
how to change the position of xlab in truehist?
Hi, I'm wondering how can I change the position of xlab in truehist. For example, the following code creats a histogram with 4 bins for my discrete data. I want each bin to be labelled as 0, 1, 2, or 3 in the middle, so that it's clear each bin corresponds to each of the discrete case. I was thinking of first delete xlab and then add marks myself, but it doesn't look like it's
2000 Sep 17
1
Weighted Histogram
Greetings, I'm having trouble finding a simple way to calculate a weighted histogram where there may be zero raw counts in a given interval. Given equal-length vectors of data 'data' and weights 'w', and breaks (intervals) for the histogram, I calculate a weighted histogram as follows (see MASS's 'truehist' for an unweighted histogram): bin <- cut(data,