Displaying 20 results from an estimated 20000 matches similar to: "binning data"
2009 Nov 06
2
Binning of integers with hist() function odd results (PR#14046)
Full_Name: Gerald Guglielmo
Version: 2.8.1 (2008-12-22)
OS: OSX Leopard
Submission from: (NULL) (131.225.103.35)
When I attempt to use the hist() function to bin integers the behavior seems
very odd as the bin boundary seems inconsistent across the various bins. For
some bins the upper boundary includes the next integer value, while in others it
does not. If I add 0.1 to every value, then the
2008 Aug 19
1
Histogram binning
I am trying to produce frequencies in defined intervals however I can't seem
to figure out how to get R to bin my data the way I want it to.
I have several thousand lengths of fish that I want to be binned as follows:
Ex.
Length Bin
209 200
219 210
431 430
727 720
That is, bins with any length equal to or greater than the lower
2009 Oct 28
3
structural equation modeling
Dear R-help,
I am interested in using structural equation modeling.
Just getting started with it, but I'm looking for suggestions for packages.
As an aside, what's the best way for looking for packages at CRAN?
--
Robert Terwilliger
Biomedical Physicist
Laboratory of Neurocognitive Development
Western Psychiatric Institute and Clinic
University of Pittsburgh Medical Center
Loeffler
2010 Oct 27
1
trouble with histograms
Hi,
I have tab-delimited data with an unequal number of entries per column, of
the sort:
A B C
1 2 2
3 4 1
5 2 2
6 2
5 2
3
6
2
I would like to make a histogram of the frequencies of each represented
number in a "stacked" histogram, where you can see the contribution of each
group (A, B or C) to the total height of the bar, and each bar labeled with
the
2010 Sep 22
3
Extracting bins and frequencies from frequency table
Dear R users,
I would like to great a frequency table from raw data and then access
the classes/bins and
their respective frequencies separately. Here the code to create the
frequency tables:
x1 <- c(1,5,1,1,2,2,3,4,5,3,2,3,6,4,3,8)
t1 <- table(x1)
print(t1[1])
Its easy to plot this, but how do I actually access the frequencies
alone and the bins alone?
Basically I am looking to get:
2006 Jun 08
3
Re-binning histogram data
Hi,
Short Version:
Is there a function to re-bin a histogram to new, broader bins?
Long version: I'm trying to create a histogram, however my input-data is
itself in the form of a fine-grained histogram, i.e. numbers of counts
in regular one-second bins. I want to produce a histogram of, say,
10-minute bins (though possibly irregular bins also).
I suppose I could re-create a data set as
2008 Feb 11
2
Questions about histograms
Hello
I'm doing some experiments with the various histogram functions and I
have a two questions about the "prob" option and binning.
First, here's a simple plot of my data using the default hist()
function:
> hist(data[,1], prob = TRUE, xlim = c(0, 35))
http://go.sneakymustard.com/tmp/hist.jpg
My first question is regarding the resulting plot from hist.scott() and
2009 Nov 07
0
Binning of integers with hist() function odd results (P (PR#14047)
On 06-Nov-09 23:30:12, gug at fnal.gov wrote:
> Full_Name: Gerald Guglielmo
> Version: 2.8.1 (2008-12-22)
> OS: OSX Leopard
> Submission from: (NULL) (131.225.103.35)
>
> When I attempt to use the hist() function to bin integers the behavior
> seems
> very odd as the bin boundary seems inconsistent across the various
> bins. For
> some bins the upper boundary
2009 Nov 07
0
Binning of integers with hist() function odd results (P (PR#14048)
Hi,
Thank you for responding quickly and explaining the behavior. By
adding "include.lowest=TRUE,right=FALSE" and manually including breaks
that resolved the simple test case. Next I updated my more complex
data set, which already had manually defined breaks, and that resolved
my issues there too. I have now gone in and updated all my functions
which use hist() so I
2009 Aug 20
2
Histogram problem
I'm trying to create a histogram from the following code, but my data keeps
adding the Num vector and plotting that. My data in the CSV file is just
one vector. Does anyone know why?
Thanks
Conrad
SPXdf = data.frame(read.csv(file = "SPX.csv", header = TRUE, sep = ",", dec
= ".", fill = TRUE))
Max = max(SPXdf[,2])
Min = min(SPXdf[,2])
Count =
2012 May 20
2
Histograms with bin proportions on the y-axis
I have what is probably a simple problem. I have a data file from an MCMC
Bayes estimation problem that is a vector of 500,000 numeric values (just
one variable) ranging from 100,000 to 700,000. I need to display the
histogram of this data in a high quality graphic for a figure in a journal
publication. I want 100 bins so as to display a reasonable complete and
smooth histogram, and I need the
2008 May 20
2
hist clarification
Can someone help me with a misunderstanding I'm having with hist? I
expected, from the example below, that the number of bins would always be 10
and the length of the counts array the same. According to the help section
'breaks' can be a integer indicating the number of bins. From the example
below, the number of bins (length of the counts array) varies. Am I wrong in
expecting the
2005 Mar 10
1
Transparent colors OR two series on one histogram
Hi,
I want to be able to plot a single histogram of a measured trait with
trait values from two conditions on the same histogram to allow easy
comparison.
I have previously done this in excel by plotting the two series on a
single bargraph having calculated frequencies in bins. You then get one
condition plotted immediately to the right of the other. I hope that
makes sense?
I don't
2007 Sep 17
3
Histogram with colors
Is there a simple way to plot a histogram with colors?
For example, suppose I generate random points in the
N(2,1) distribution:
x <- rnorm(100000, mean = 2, sd = 1)
Now I would like to plot the histogram:
hist(x)
but I would like to show the bars with x < 0 in red, and the
bars with x >= 0 in lightgreen. Is there any simple way to
do it?
I think I can do it in two steps:
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
2004 Jun 21
2
frequencies
See ?hist
For example
hist(rnorm(100),plot=F,breaks=-3:3)$counts
Regards
Wayne
-----Original Message-----
From: Silvia Kirkman [mailto:silviakirkman@yahoo.com]
Sent: 21 June 2004 14:01
To: r-help@stat.math.ethz.ch
Subject: [R] frequencies
Hi
I have a set of fish lengths (cm) which I'd like to
have divided into bins as specified by myself. I want
to classify my bins as:
0<=x<0.5
2004 May 25
5
Histogram
Dear all,
I have a surprising problem with the representation of frequencies in a
histogram.
Consider, for example, the R code:
b<-rnorm(2000,3.5,0.3)
hist(b,freq=F)
When I plotted the histogram, I expected that values in the y-axis (the
probability) varied between 0 and 1. Instead, they varied within the
range 0-1.3.
Have you got any suggestion for obtaining a correct graph with
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
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:
2008 Feb 26
4
"Raw" histogram plots
Hello
I need to plot a histogram, but insted of using bars, I'd like to plot
the data points. I've been doing it like this so far:
h <- hist(x, plot = F)
plot(y = x$counts / sum(x$counts),
x = x$breaks[2:length(x$breaks)],
type = "p", log = "xy")
Sometimes I want to have a look at the "raw" data (avoiding any kind of
binning). When x