Hi:
To make a more legible ordering of the plots, it might be a good idea to
make m$L1 an
ordered factor rather than a character variable:
m$L1 - ordered(m$L1, levels = paste('dataset', 1:15, sep = ''))
# Lattice
bwplot(value ~ x | L1, data = m, as.table = TRUE)
# ggplot2
ggplot(m)+
Hi everybody,
well, I definitely don't understand anything.
Why the hist function with freq=FALSE gives such a strange result???
R - c(-1.10, 0.79, -1.17, -0.53, -0.26, -0.22, 0.29, -0.26, -0.26, 0.39)
hist(R, freq=FALSE, breaks=10)
Thanks everybody
[[alternative HTML version
Trafim rdapam...@gmail.com wrote
well, I definitely don't understand anything.
Why the hist function with freq=FALSE gives such a strange result???
R - c(-1.10, 0.79, -1.17, -0.53, -0.26, -0.22, 0.29, -0.26, -0.26, 0.39)
hist(R, freq=FALSE, breaks=10)
The total AREA has to equal 1, which
PM
To: r-help@r-project.org
Subject: [R] Histogram probabilities 1 !!!
Hi everybody,
well, I definitely don't understand anything.
Why the hist function with freq=FALSE gives such a strange result???
R - c(-1.10, 0.79, -1.17, -0.53, -0.26, -0.22, 0.29, -0.26, -0.26, 0.39)
hist(R, freq
.
Guo-Hao Huang
--
From: Trafim rdapam...@gmail.com
Sent: Wednesday, December 02, 2009 7:35 PM
To: r-help@r-project.org
Subject: [R] Histogram probabilities 1 !!!
Hi everybody,
well, I definitely don't understand anything
Dear all,
I cannot find a function which would allow drawing hist and density on the
same graph.
x - seq(1,40,1)
y - 2*x+1+5*rnorm(length(x))
hist(y,freq = FALSE)
plot(density(y))
thanks a lot for the help
[[alternative HTML version deleted]]
On 30-Nov-09 11:09:12, Trafim wrote:
Dear all,
I cannot find a function which would allow drawing hist and density
on the same graph.
x - seq(1,40,1)
y - 2*x+1+5*rnorm(length(x))
hist(y,freq = FALSE)
plot(density(y))
thanks a lot for the help
plot() initiates a completely new plot,
Thanks a lot Ted!
I use R help but also cannot find how to expand the graph, i.e. sometimes
the top of it is cut for some reason. Maybe there are some limits imposed on
y axes, but cannot find it.
On Mon, Nov 30, 2009 at 12:27 PM, Ted Harding
ted.hard...@manchester.ac.ukwrote:
On 30-Nov-09
Trafim,
If you are plotting more than one variables on the same plot e.g. by using
the lines() or points() function, then the limits of the X and Y axes are
set based on the first variable you plot. So, you would have to set the xlim
and ylim to the limits of the variable with the widest range,
Chek the topic Second y-axis --- alternative to par(new= which was
discussed recently - in that one, there are a few examples, how that can be
achieved.
Essentially, you have to make sure, that the xlims of the hist() and
plot(density()) are the same, and you have to use the par(new=TRUE) (or
I plot only
hist(y,freq = FALSE)
lines(density(y))
and the graph of density goes higher then hist, but i didn't find any lim
parameter for y axes for lines command.
Thanks a lot
On Mon, Nov 30, 2009 at 1:51 PM, Hrishi Mittal hrishimit...@gmail.comwrote:
Trafim,
If you are plotting more
Trafim,
If you are plotting more than one variables on the same plot
e.g. by using the lines() or points() function, then the limits
of the X and Y axes are set based on the first variable you plot.
So, you would have to set the xlim and ylim to the limits of the
variable with the widest
Dear all,
I cannot find a function which would allow drawing hist and density on the
same graph.
x - seq(1,40,1)
y - 2*x+1+5*rnorm(length(x))
hist(y,freq = FALSE)
plot(density(y))
thanks a lot for the help
[[alternative HTML version deleted]]
-project.org]
Namens Trafim
Verzonden: maandag 30 november 2009 12:01
Aan: r-help@r-project.org
Onderwerp: [R] Histogram and Density on the the same graph
Dear all,
I cannot find a function which would allow drawing hist and density on
the same graph.
x - seq(1,40,1)
y - 2*x+1+5*rnorm(length(x))
hist(y
On Mon, Nov 30, 2009 at 12:01:12PM +0100, Trafim wrote:
Dear all,
I cannot find a function which would allow drawing hist and density on the
same graph.
x - seq(1,40,1)
y - 2*x+1+5*rnorm(length(x))
hist(y,freq = FALSE)
plot(density(y))
The package descr has the function histkdnc()
On 10/13/2009 10:06 PM, Dmitry Gospodaryov wrote:
Dear R developers,How I can build a histogram from matrix:
0 0.5 1
0.25 34 43 65
1 23 35 54
4 22 29 42
10 21 22 29
20 15 17 20
(first string is represented names of columns,
first column is represented names of rows)
where names of columns
Dear R developers,How I can build a histogram from matrix:
0 0.5 1
0.25 34 43 65
1 23 35 54
4 22 29 42
10 21 22 29
20 15 17 20
(first string is represented names of columns,
first column is represented names of rows)
where names of columns should be x-axis labels; respectively
to this, I want
see ?hist
On Tue, Oct 13, 2009 at 1:06 PM, Dmitry Gospodaryov
gospodar...@rambler.ru wrote:
Dear R developers,How I can build a histogram from matrix:
0 0.5 1
0.25 34 43 65
1 23 35 54
4 22 29 42
10 21 22 29
20 15 17 20
(first string is represented names of columns,
first column is
On second thought,
You'll have to reorganize your data first, and then check the function
histogram() in the package lattice.
cheers
On Wed, Oct 14, 2009 at 12:43 AM, joris meys jorism...@gmail.com wrote:
see ?hist
On Tue, Oct 13, 2009 at 1:06 PM, Dmitry Gospodaryov
gospodar...@rambler.ru
Hi all,
I have a question about hist()
1)
t1 - hist(c(1,2,3,4,5))
t1
$breaks
[1] 1 2 3 4 5
$counts
[1] 2 1 1 1
why is there 2 counts for 1? And should the counts be '1 1 1 1 1' ?
Is there any other function to count frequency of discrete data?
Thanks.
-k
[[alternative HTML
For simply counting frequency of discrete data, table , xtabs, and ftable will
work.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Khanh Nguyen
Sent: Thursday, October 08, 2009 2:47 PM
To: r-help@r-project.org
Subject: [R
Change the breaks argument:
t1 - hist(1:5, 0:5)
t1$counts
On Thu, Oct 8, 2009 at 4:47 PM, Khanh Nguyen kngu...@cs.umb.edu wrote:
Hi all,
I have a question about hist()
1)
t1 - hist(c(1,2,3,4,5))
t1
$breaks
[1] 1 2 3 4 5
$counts
[1] 2 1 1 1
why is there 2 counts for 1? And should
On Oct 8, 2009, at 3:47 PM, Khanh Nguyen wrote:
Hi all,
I have a question about hist()
1)
t1 - hist(c(1,2,3,4,5))
t1
$breaks
[1] 1 2 3 4 5
$counts
[1] 2 1 1 1
why is there 2 counts for 1? And should the counts be '1 1 1 1 1' ?
It depends on the way the bins are defined.
Had you forced
On 9/10/2009, at 8:47 AM, Khanh Nguyen wrote:
Hi all,
I have a question about hist()
1)
t1 - hist(c(1,2,3,4,5))
t1
$breaks
[1] 1 2 3 4 5
$counts
[1] 2 1 1 1
why is there 2 counts for 1?
RTFM --- include.lowest = TRUE and right = TRUE by default.
And should the counts be '1 1
Or the right argument:
t1 - hist(1:5, right=false)
t1[1:2]
$breaks
[1] 1 2 3 4 5
$counts
[1] 1 1 1 2
The issue has to do with what hist() does with the points that fall
right on the break points.
-Ista
On Thu, Oct 8, 2009 at 3:58 PM, Henrique Dallazuanna www...@gmail.com wrote:
Change the
Henrique Dallazuanna wrote:
Change the breaks argument:
t1 - hist(1:5, 0:5)
t1$counts
On Thu, Oct 8, 2009 at 4:47 PM, Khanh Nguyen kngu...@cs.umb.edu wrote:
Hi all,
I have a question about hist()
1)
t1 - hist(c(1,2,3,4,5))
t1
$breaks
[1] 1 2 3 4 5
$counts
[1] 2 1 1 1
why is there 2
I see !
Thank you everyone for the responses.
-k
On Thu, Oct 8, 2009 at 4:55 PM, David Scott d.sc...@auckland.ac.nz wrote:
Henrique Dallazuanna wrote:
Change the breaks argument:
t1 - hist(1:5, 0:5)
t1$counts
On Thu, Oct 8, 2009 at 4:47 PM, Khanh Nguyen kngu...@cs.umb.edu wrote:
Hi
Hi
R does what you said to it it shall do!
Without **reproducible** code and explanation what you did, what you get
and what you **expect** to get it would be quite complicated task to
understand what your code actually do.
e.g. this
for (i in 1:Count){
for (j in 1:Count2){
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
Hi,
I'm drawing two histograms in the same plot.However, my point of comparison
is the difference in their x coordinates.But my problem is one histogram is
much taller than the other.How can I get them both to the same height?
--
Rajesh.J
[[alternative HTML version deleted]]
Hey, Rajesh
I bit light on detail here. Being a mind reader is not an R-help
prerequisite. However since I have been working on histograms today and
you've just posted a question using ggplot, let me guess that its ggplot you
are refering to. Then here is an example, which you can find in my
Hallo,
How can I have the control of the width of each bin in the histogram?
I would like to plot my data modifying the number and the width of the bins.
Is there a good pdf or manual where i can learn to use the plot/hist in R
very well?
I find the help not always clear
Thanks a lot
Ale
--
aledanda wrote:
Hallo,
How can I have the control of the width of each bin in the histogram?
I would like to plot my data modifying the number and the width of the bins.
Is there a good pdf or manual where i can learn to use the plot/hist in R
very well?
See
?hist
and its argument breaks.
On 7/3/09, aledanda danda.ga...@gmail.com wrote:
Hallo,
How can I have the control of the width of each bin in the histogram?
I would like to plot my data modifying the number and the width of the bins.
Is there a good pdf or manual where i can learn to use the plot/hist in R
very
-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of aledanda
Sent: Friday, July 03, 2009 9:55 AM
To: r-help@r-project.org
Subject: [R] Histogram
Hallo,
How can I have the control of the width of each bin in the histogram?
I would like to plot my data
On 18/06/09 06:38, Shreyasee wrote:
Hi,
I have a dataset and calculated the time difference between two time
variables.
The output is somewhat like *1/29/2324 1:57:39 AM.*
That is not a time difference you have calculated.
(x-difftime(2009-12-31 12:00,2009-01-01 08:45))
# Time difference
Hi,
The dataset has four time variables.
Each variable has data in 1/6/2006 12:58:55 PM format.
I applied the subtraction function (=E2-D2) for calculating difference
between variable1 and variable2 for each record.
I copied those values and pasted in another column using Paste special -
values
On 18/06/09 07:34, Shreyasee wrote:
Hi,
The dataset has four time variables.
Each variable has data in 1/6/2006 12:58:55 PM format.
I applied the subtraction function (=E2-D2) for calculating difference
between variable1 and variable2 for each record.
I copied those values and pasted in
Hi,
I have a dataset and calculated the time difference between two time
variables.
The output is somewhat like *1/29/2324 1:57:39 AM.*
I want to plot a histogram for this variable. When I gave *hist()* command
it returned an error saying *Error in hist.default(num) : 'x' must be
numeric*
Can
S. Nunes wrote:
Hi all,
I am doing some explorations using a dataset with the following
structure (id, value, flag).
For instance:
a, 2.2, 1
b, 3.0, 1
c, 2.9, 0
d, 3.1, 1
...
I have plotted a standard histogram using a simple command like:
hist(data$value)
My question:
I would like to
Hi,
Thanks for the contribution. I tested the code but I got a couple or errors.
I'll try to debug these in the next days.
Maybe there is a simpler approach to what I am trying to do.
I have a bunch of measures and a column with the success of the case (1/0).
I simply want to evaluate my
Hi all,
I am doing some explorations using a dataset with the following
structure (id, value, flag).
For instance:
a, 2.2, 1
b, 3.0, 1
c, 2.9, 0
d, 3.1, 1
...
I have plotted a standard histogram using a simple command like:
hist(data$value)
My question:
I would like to superimpose a line
Hi all,
I am doing some explorations using a dataset with the following
structure (id, value, flag).
For instance:
a, 2.2, 1
b, 3.0, 1
c, 2.9, 0
d, 3.1, 1
...
I have plotted a standard histogram using a simple command like:
hist(data$value)
My question:
I would like to superimpose a line
Sent: Saturday, May 09, 2009 11:04 AM
To: ted.hard...@manchester.ac.uk
Cc: r-help@r-project.org
Subject: Re: [R] Histogram frequencies with a normal pdf curve overlay
Thank you!
On Sat, May 9, 2009 at 11:31 AM, Ted Harding
ted.hard...@manchester.ac.uk wrote:
On 09-May-09 16:10:42, Jacques
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
On 09-May-09 16:10:42, Jacques Wagnor wrote:
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
Thank you!
On Sat, May 9, 2009 at 11:31 AM, Ted Harding
ted.hard...@manchester.ac.uk wrote:
On 09-May-09 16:10:42, Jacques Wagnor wrote:
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 -
Assuming a constant bin width, you need to multiply the density by
n*binwidth, where the bin width is (obviously!) the width of the
histogram bins.
Jacques Wagnor jacques.wag...@gmail.com 05/09/09 5:10 PM
Dear List,
When I plot a histogram with 'freq=FALSE' and overlay the histogram
with a
Hi everyone,
I have a 'basic' issue and hope someone has a bit of code to solve it. I
have two populations plotted as histograms on the same figure. Basically I want
to add the moving average (based on hist) for both populations on my graph. I'm
also interested in the x coordinate of the curves
Vallat Morgan morgan.vallat at epfl.ch writes:
I have a 'basic' issue and hope someone has a bit of code to solve it. I
have two populations plotted as histograms on the same figure. Basically I
want to add the moving average
(based on hist) for both populations on my graph. I'm also
Hello dear R-community,
I have been trying to figure out a way to generate histograms of a numeric
variable observed in different entities ('individual' below). Each one of this
entities is classified as A or B (according to the pseudo-code below):
variable-sample(rep(1:10,10))
On Thu, Apr 2, 2009 at 3:16 PM, Judith Flores jur...@yahoo.com wrote:
Hello dear R-community,
I have been trying to figure out a way to generate histograms of a numeric
variable observed in different entities ('individual' below). Each one of
this entities is classified as A or B
Dear R users,
I would like to draw some histograms as seen in the page whose address I
wrote below. I searched through the web a lot and I found a page which
describes how I can do it for older versions of R. For newer versions they
recommend to install the package R.basics in R.clusters but this
-
Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Namens evrim akar
Verzonden: woensdag 25 maart 2009 15:40
Aan: r-help@r-project.org
Onderwerp: [R] histogram plots with many different samples
Dear R users,
I would like to draw some histograms as seen in the page whose
Google for
R.classes bundle
which will get you to the appropriate page on the author's site where
you can download and install it. Installing the bundle will install
a number of packages including R.basic which contains plot.histogram.
On Wed, Mar 25, 2009 at 10:40 AM, evrim akar
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of evrim akar
Sent: Wednesday, March 25, 2009 8:40 AM
To: r-help@r-project.org
Subject: [R] histogram plots with many different samples
Dear R users
-
project.org] On Behalf Of evrim akar
Sent: Wednesday, March 25, 2009 8:40 AM
To: r-help@r-project.org
Subject: [R] histogram plots with many different samples
Dear R users,
I would like to draw some histograms as seen in the page whose address
I
wrote below. I searched through the web a lot
Check out: ggplot2 (http://had.co.nz/ggplot2/)
This R library is also good at developing histograms.
Good luck.
--- On Wed, 3/25/09, evrim akar evrim.a...@gmail.com wrote:
From: evrim akar evrim.a...@gmail.com
Subject: [R] histogram plots with many different samples
To: r-help@r
Hello. I have what I'm sure is a very simple question. Hopefully someone
can help. I can't seem to find the maximum height of a histogram. In
matlab it would be simple to say max(hist(x, 100)), but this doesn't seem to
work in R. Any input would be greatly appreciated.
Brendan
Brendan Cusick wrote:
Hello. I have what I'm sure is a very simple question. Hopefully someone
can help. I can't seem to find the maximum height of a histogram. In
matlab it would be simple to say max(hist(x, 100)), but this doesn't seem to
work in R. Any input would be greatly appreciated.
Jim, you are a genius. Thanks for the help.
Brendan
On Sun, Feb 1, 2009 at 5:44 AM, Jim Lemon j...@bitwrit.com.au wrote:
Brendan Cusick wrote:
Hello. I have what I'm sure is a very simple question. Hopefully someone
can help. I can't seem to find the maximum height of a histogram. In
-project.org
Subject: [R] Histogram for grouped data in R
I have grouped data in this format
Size -- Count
0-10 -- 15
10-20 -- 25
20-50 -- 10
50-100 -- 5
I've been trying to find a way to set this up with the proper histogram
heights, but can't seem to figure it out. So any help would be much
From: r-help-boun...@r-project.org on behalf of Vincent Goulet
Sent: Fri 1/23/2009 10:36 AM
To: darthgervais
Cc: r-help@r-project.org
Subject: Re: [R] Histogram for grouped data in R
Le ven. 23 janv. à 08:55, darthgervais a écrit :
I have grouped data
The category widths are not equal. Surely, what you mean is:
x - c(15,25,rep(10/3,3),rep(5/5, 5))
names(x) - c('0-10','10-20','','20-50',rep('',3), '50-100', '', '')
barplot(x,space=0, xlab='Size', ylab='Count', border = NA,
col=c(1,2, rep(3,3), rep(4,5)))
:-)
Jon Anson
Jorge Ivan Velez
I have grouped data in this format
Size -- Count
0-10 -- 15
10-20 -- 25
20-50 -- 10
50-100 -- 5
I've been trying to find a way to set this up with the proper histogram
heights, but can't seem to figure it out. So any help would be much
appreciated!
--
View this message in context:
Le ven. 23 janv. à 08:55, darthgervais a écrit :
I have grouped data in this format
Size -- Count
0-10 -- 15
10-20 -- 25
20-50 -- 10
50-100 -- 5
I've been trying to find a way to set this up with the proper
histogram
heights, but can't seem to figure it out. So any help would be much
Hi,
Try this:
x-c(15,25,10,5)
names(x)-c('0-10','10-20','20-50','50-100')
barplot(x,space=0,xlab='Size',ylab='Count',col=1:4)
See ?barplot for more information.
HTH,
Jorge
On Fri, Jan 23, 2009 at 8:55 AM, darthgervais darthgerv...@yahoo.ca wrote:
I have grouped data in this format
Size
Bars are corresponding to bins, and the bin-width for lines is 0;
please tell me what is the frequency at a fixed point (rather than
over an interval)?
Regards,
Yihui
--
Yihui Xie [EMAIL PROTECTED]
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage:
Hi,
I know how to plot an histogram and how to add a density line.
But how can I plot only the density line without the bars?
Is there a way to say the hist() function not to plot bars, but a
density line instead?
__
R-help@r-project.org mailing
plot(density(x))
Regards,
Yihui
--
Yihui Xie [EMAIL PROTECTED]
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China
On Thu, Oct 16,
Am 16.10.2008 um 17:12 schrieb Yihui Xie:
plot(density(x))
Regards,
Yihui
--
Thanks!
Is there also a way to plot the frequency-bars (not the density) as
lines instead of bars?
__
R-help@r-project.org mailing list
I *presume* this is the windows() device in a current version of R, but
you failed to tell us almost any of the information requested in the
posting guide.
If so, you are seeing how Windows GDI copying operations work: if the
region to be copied goes off-window, they clip the region
Thankyou for your response.
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: 14 October 2008 12:09
To: Keith Ponting
Cc: [EMAIL PROTECTED]; r-help@r-project.org
Subject: Re: [R] histogram loses top row with alpha transparency under
Windows
I *presume* this is the windows() device
Richard.Cotton wrote:
The rectangles being drawn extend higher than the top of the panel.
(Your y
axis ranges from 0 to 50, but the bars go up to 100.)
Thankyou - I can also make the bars on the lower panels vanish by
tinkering with ylim.
In the top row of plots, depending upon the shape
k.ponting wrote:
Hello all.
Trying to use transparency for overlaid histogram plots I have come
across an interesting inconsistency, possibly a bug when running under
Windows. Originally noticed in R 2.7.1, it is still there in 2.8.0 beta.
library(lattice)
zz - function(n,alpha)
{
Hello all.
Trying to use transparency for overlaid histogram plots I have come
across an interesting inconsistency, possibly a bug when running under
Windows. Originally noticed in R 2.7.1, it is still there in 2.8.0 beta.
library(lattice)
zz - function(n,alpha)
{
ranges - NULL
for(ds in
On 8/10/2008, at 5:16 PM, Deepayan Sarkar wrote:
On 10/7/08, Rolf Turner [EMAIL PROTECTED] wrote:
I am trying to do a histogram lattice plot and I would like the
histogram to be filled with a different colour in each panel.
Note: I want every bar in each histogram to be the same colour,
On Wed, Oct 8, 2008 at 12:15 PM, Rolf Turner [EMAIL PROTECTED] wrote:
On 8/10/2008, at 5:16 PM, Deepayan Sarkar wrote:
On 10/7/08, Rolf Turner [EMAIL PROTECTED] wrote:
I am trying to do a histogram lattice plot and I would like the
histogram to be filled with a different colour in each
I am trying to do a histogram lattice plot and I would like the
histogram to be filled with a different colour in each panel.
Note: I want every bar in each histogram to be the same colour,
but that there should be different colours *between* histograms.
Can't seem to get this to work. I
On Tue, Oct 7, 2008 at 8:54 PM, Rolf Turner [EMAIL PROTECTED] wrote:
I am trying to do a histogram lattice plot and I would like the
histogram to be filled with a different colour in each panel.
Note: I want every bar in each histogram to be the same colour,
but that there should be
Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
801.408.8111
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
project.org] On Behalf Of Jörg Groß
Sent: Monday, September 29, 2008 2:06 PM
To: r-help@r-project.org
Subject: [R] histogram-like plot - multiple bars side
On 28/09/2008 10:02 PM, Jörg Groß wrote:
Hi,
I want to plot a binomial propability distribution.
I know how to generate the data;
x - seq(from=0, to=14, by=1)
y - dbinom(x, 14, 0.7, log = FALSE)
but what I don't know is how to plot this within a histogram like plot.
Because the
Jörg Groß wrote:
Hi,
I want to plot a binomial propability distribution.
I know how to generate the data;
x - seq(from=0, to=14, by=1)
y - dbinom(x, 14, 0.7, log = FALSE)
but what I don't know is how to plot this within a histogram like plot.
Because the histogram function only accepts
On Mon, Sep 29, 2008 at 04:02:05AM +0200, Jörg Groß wrote:
Hi,
I want to plot a binomial propability distribution.
I know how to generate the data;
x - seq(from=0, to=14, by=1)
y - dbinom(x, 14, 0.7, log = FALSE)
I tried:
plot(x,y, type=h)
but the bars are very thin -is
]
801.408.8111
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
project.org] On Behalf Of Philipp Pagel
Sent: Monday, September 29, 2008 5:40 AM
To: r-help@r-project.org
Subject: Re: [R] histogram-like plot with two variables
On Mon, Sep 29, 2008 at 04:02:05AM
Hi,
I found this example for producing multiple histograms;
require(plotrix)
l - list(rnorm(50),rnorm(50,sd=2),rnorm(50,mean=3))
multhist(l)
Now I want something like that, for creating multiple density
distributions (in one plot).
But I have two variables for one density distribution
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
project.org] On Behalf Of Jörg Groß
Sent: Monday, September 29, 2008 2:06 PM
To: r-help@r-project.org
Subject: [R] histogram-like plot - multiple bars side by side
Hi,
I found this example for producing multiple
Hi,
I want to plot a binomial propability distribution.
I know how to generate the data;
x - seq(from=0, to=14, by=1)
y - dbinom(x, 14, 0.7, log = FALSE)
but what I don't know is how to plot this within a histogram like plot.
Because the histogram function only accepts one variable.
Is
Try:
plot(x,y,type='s')
lines(x,y, type='h')
On Sun, Sep 28, 2008 at 10:02 PM, Jörg Groß [EMAIL PROTECTED] wrote:
Hi,
I want to plot a binomial propability distribution.
I know how to generate the data;
x - seq(from=0, to=14, by=1)
y - dbinom(x, 14, 0.7, log = FALSE)
but what I
Felipe wrote:
i calculated the density and wanna do something like this
separate in 0-19-29-39-49-59-69-79-99
and put in these spaces 8 densities .. 0.something
i have the frequency in % and divided already in 20 or 10 to get the density
i tried and tried..made breaks vector to separate but
i calculated the density and wanna do something like this
separate in 0-19-29-39-49-59-69-79-99
and put in these spaces 8 densities .. 0.something
i have the frequency in % and divided already in 20 or 10 to get the density
i tried and tried..made breaks vector to separate but couldn't put the
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
Is this what you want:
cuts - c(0,209,429,719,1500)
x - runif(1000,0,1447)
barplot(table(cut(x, breaks=cuts)))
On Tue, Aug 19, 2008 at 4:17 PM, Ben Cox [EMAIL PROTECTED] wrote:
I am trying to produce frequencies in defined intervals however I can't seem
to figure out how to get R to bin my
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
On 07/08/2008 6:55 PM, Jörg Groß wrote:
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
Hi,
how can I treat data organised in classes and frequencies?
Ex.
class frequency
20-23 9
23-25 7
26-28 5
29-31 5
32-34 3
Thanks
Angelo Scozzarella
I don´t know what you means by treat, but may be you want something like
my.df-read.table(stdin(), head=T, sep=,)
class,frequency
20-23,9
23-25,7
26-28,5
29-31,5
32-34,3
rownames(my.df)-my.df$class
barplot (my.df$frequency)
axis(1, 1:dim(my.df)[1], rownames(my.df))
Cheers,
miltinho astronauta
Try this:
with(x, barplot(frequency, names.arg = class))
On Wed, Jul 23, 2008 at 3:29 PM, Angelo Scozzarella
[EMAIL PROTECTED] wrote:
Hi,
how can I treat data organised in classes and frequencies?
Ex.
class frequency
20-23 9
23-25 7
26-28
Hi Angelo,
Look carefully at package vcd; and at log-linear models (+ glm(...,
family=poisson)). For overdispersion there are more advanced methods.
HTH, Mark.
Angelo Scozzarella wrote:
Hi,
how can I treat data organised in classes and frequencies?
Ex.
class frequency
Try see doBy package.
Below you have a code on brute force.
kind regards,
miltinho
brazil
===
number.of.records-20
my.df-data.frame(v1=sample(21:34,number.of.records, replace=T),
v2=runif(number.of.records), v3=runif(number.of.records))
my.df$v1-as.numeric(as.character(my.df$v1))
201 - 300 of 359 matches
Mail list logo