Le mer. 23 juil. à 14:29, Angelo Scozzarella a écrit :
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
It depends
Doesn't it now? PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html and provide commented,
minimal, self-contained, reproducible code.
On Thu, Jul 17, 2008 at 8:26 AM, Xin [EMAIL PROTECTED] wrote:
Dear All:
I am trying to plot a series of data using histogram plot.
Dear List,
Say, we generate data like this-
dat-rnorm(1000,1,2)
hist(dat)
How do i make the histogram, say, red (col = 2) before X = dat = 0, and rest
say, green (col = 3) beyond X = dat = 0 in R?
The resulting histogram could be like this
http://ehsan.karim.googlepages.com/histogram.JPG
Here is something that is close:
x - rnorm(1)
y - hist(x, plot=FALSE)
plot(y, col=ifelse(y$mid0,'red','green'))
On Thu, Jul 17, 2008 at 5:13 AM, Mohammad Ehsanul Karim
[EMAIL PROTECTED] wrote:
Dear List,
Say, we generate data like this-
dat-rnorm(1000,1,2)
hist(dat)
How do i
On Thu, Jul 17, 2008 at 5:13 PM, Mohammad Ehsanul Karim
[EMAIL PROTECTED] wrote:
Dear List,
Say, we generate data like this-
dat-rnorm(1000,1,2)
hist(dat)
library(ggplot)
qplot(dat, geom=histogram, colour = factor(dat 0))
Hadley
--
http://had.co.nz/
Dear All:
I am trying to plot a series of data using histogram plot. But I want to
change the default of setting for histogram plot. For example, I want to set
frequency plot starting with zero.
Many Thanks
Xin
[[alternative HTML version deleted]]
Subject: [R] Histogram with two colors depending on condition
Dear List,
Say, we generate data like this-
dat-rnorm(1000,1,2)
hist(dat)
How do i make the histogram, say, red (col = 2) before X =
dat = 0, and rest say, green (col = 3) beyond X = dat = 0 in R?
The resulting histogram could
Given a data frame with a continuous variable and a factor. I would like to
generate a histogram of the continuous variable, where each bar is filled
with different colors according to the percentage of factor values falling
into this region of the continuous variable.
I looked into packages
: dinsdag 8 juli 2008 13:23
Aan: r-help@r-project.org
Onderwerp: [R] Histogram with colors according to factor
Given a data frame with a continuous variable and a factor. I would like
to
generate a histogram of the continuous variable, where each bar is
filled
with different colors according
No; thanks for your try, but this is not what I want.
Here each bar has one single color. I would like to render each bar with
several colors according to the distribution of a factor.
I now learned that this is called stacked histogram (damned Excel). In
the following entry
Given a data frame with a continuous variable and a factor. I would like to
generate a histogram of the continuous variable, where each bar is filled
with different colors according to the percentage of factor values falling
into this region of the continuous variable.
How exactly do you want
Victor Homar wrote:
Dear R users and helpers,
I'm trying to find an example of a histogram plot as an inset (upper
right or left corner) of another histogram.
Anyone has an example of that?
Thanks for your help,
Víctor.
Hi,
You can use the histogram function from the lattice package
Hi Paul,
Thanks for the answer. I temporarily did it with the subplot function
from the TeachingDemos package but I like this version much better.
Best,
Victor.
Paul Hiemstra wrote:
Victor Homar wrote:
Dear R users and helpers,
I'm trying to find an example of a histogram plot as an inset
Dear R users and helpers,
I'm trying to find an example of a histogram plot as an inset (upper
right or left corner) of another histogram.
Anyone has an example of that?
Thanks for your help,
Víctor.
--
---
Víctor Homar
Hello everyone,
I am trying to plot a histogram from the following code:
dat-read.table(file=C:\\Documents and Settings\\Owner\\My
Documents\\Yeast\\Yeast.txt,header=T,row.names=1)
file.show(file=C:\\Documents and Settings\\Owner\\My
Documents\\Yeast\\Yeast.txt)
x-dat[2,23:46]
It is hard to respond without reproducible examples. Do
str(dat[2,23:46]) and see what it reports. My guess is that one of
the columns is not numeric. Find out which one it is, fix it and then
try 'hist' again.
On Fri, Jun 13, 2008 at 10:21 AM, Paul Adams [EMAIL PROTECTED] wrote:
Hello
Paul Adams wrote:
Hello everyone,
I am trying to plot a histogram from the following code:
dat-read.table(file=C:\\Documents and Settings\\Owner\\My
Documents\\Yeast\\Yeast.txt,header=T,row.names=1)
file.show(file=C:\\Documents and Settings\\Owner\\My
Documents\\Yeast\\Yeast.txt)
Hi,
please someone correct me, but
On 13/06/2008, 07:21, [EMAIL PROTECTED] wrote:
dat-read.table(file=C:\\Documents and Settings\\Owner\\My
Documents\\Yeast\\Yeast.txt,header=T,row.names=1)
Check mode and class of dat. read.table provided you with a dataframe
of, essentially, string data.
jim holtman wrote:
It is hard to respond without reproducible examples. Do
str(dat[2,23:46]) and see what it reports. My guess is that one of
the columns is not numeric. Find out which one it is, fix it and then
try 'hist' again.
No, this will be wrong whatever the data are. The problem
Hi
I consider myself not a complete beginner in R, however an elegant
solution to this problem stumps me. I have a fairly long time series of
6 or so points, I need to gather the data to create a histogram of
the length of continuous zero periods in a data set.
So image the data looks like
On 6/10/2008 9:23 AM, Creighton, Sean wrote:
Hi
I consider myself not a complete beginner in R, however an elegant
solution to this problem stumps me. I have a fairly long time series of
6 or so points, I need to gather the data to create a histogram of
the length of continuous zero periods
Dear Friends,
I am doing a rather simple histogram on a vector of data, MR. I set
breaks for the intervals:
hist(MR,breaks=c(0, 2.9, 5.9, 8.9, 11.9,14.9, 17.9, 20.9))
My question is, how do I change the labels on the tick marks? I have
looked at ?hist and can't find a clue...
Thanks in
Lawrence,
use hist(..., axes=F)
then put your own axis on with axis(1,...)
Example:
y-rnorm(200)
hist(y,axes=F)
axis(2)
axis(1, at=seq(-3,3,1))
Steve E
Lawrence Hanser [EMAIL PROTECTED] 06/09/08 7:02 AM
Dear Friends,
I am doing a rather simple histogram on a vector of data, MR. I set
breaks
Hi r-expert,
I would like to plot histogram using frequency not density.
But I got the following warning.
obs.hist -
hist(jan_data2[,4],right=FALSE,breaks=c(0,5,10,15,20,100),freq=TRUE,
+ xlab=Rain amt (mm),ylim=c(0,3000),
+ main=Frequency of observed, Jan (1901-1990),
CSIRO Laboratories
PO Box 120, Cleveland, 4163
AUSTRALIA
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roslina Zakaria
Sent: Friday, 16 May 2008 4:12 PM
To: R help forum
Subject: [R] histogram
Hi r-expert,
I would like to plot histogram using frequency
Thanks a lot Deepayan. Could you please inform me what update are you
referring to, and give me some very vague sense when it might happen (within
weeks, months, or years)?
Many thanks
Ola
2008/5/8 Deepayan Sarkar [EMAIL PROTECTED]:
On 5/8/08, Ola Caster [EMAIL PROTECTED] wrote:
Dear help
Sorry for spamming the list...
I noticed that if you first produce a date histogram with the hist()
function, like this:
basic.histogram - hist(my.data$date, breaks = months, plot = FALSE)
and then try to transfer the breaks from that histogram to a lattice
equivalent, like this:
On 5/9/08, Ola Caster [EMAIL PROTECTED] wrote:
Sorry for spamming the list...
I noticed that if you first produce a date histogram with the hist()
function, like this:
basic.histogram - hist(my.data$date, breaks = months, plot = FALSE)
and then try to transfer the breaks from that
Dear help list,
Is it possible to draw lattice histograms (i.e. use the histogram() function
and not the hist() function) with objects of class Date?
I've tried solutions like
histogram(~date, data=my.data, breaks=months)
but it doesn't seem to work.
Any suggestions are welcome.
Many thanks
Dear R-expert,
For histogram function, can we get the table of bin and frequency like in
excel, together with the histogram?
Therefore, we can check the number of data included.
Thank you so much for your attention and help.
On 9/05/2008, at 12:04 PM, Roslina Zakaria wrote:
Dear R-expert,
For histogram function, can we get the table of bin and frequency
like in excel, together with the histogram?
Therefore, we can check the number of data included.
Thank you so much for your attention and help.
?hist
On Thu, 8 May 2008, Roslina Zakaria wrote:
Dear R-expert,
For histogram function, can we get the table of bin and frequency like in
excel, together with the histogram?
Therefore, we can check the number of data included.
Thank you so much for your attention and help.
Easy one: just use the
On 09-May-08 00:12:46, David Scott wrote:
On Thu, 8 May 2008, Roslina Zakaria wrote:
Dear R-expert,
For histogram function, can we get the table of bin and
frequency like in excel, together with the histogram?
Therefore, we can check the number of data included.
Thank you so much for your
Hi all,
Why not only?
set.seed(54321)
X - 5*rnorm(500)
hist(X,label=TRUE,ylim=c(0,200))
Thanks,
Jorge
On Thu, May 8, 2008 at 8:26 PM, Ted Harding [EMAIL PROTECTED]
wrote:
On 09-May-08 00:12:46, David Scott wrote:
On Thu, 8 May 2008, Roslina Zakaria wrote:
Dear R-expert,
For
Hi!
I'm having a trouble changing font size of histogram label.
I have tried help(hist), but I couldn't find anything explain how to fix
label's font size.
Could you help me please?
Thank you.
_
Going green? See the top 12 foods
I think that you can edit the source code of histogram for this:
myhist - getS3method(plot, histogram)
body(myhist)[9] -
parse(text = c(capture.output(body(myhist)[9])[-6],
} else labels, adj = c(0.5, -0.5), ...)))
r - hist(islands, plot = F)
myhist(r, labels = T, cex =
Here's an example to make the text 18 point. You can set ps=6 to make small
text.
x=rnorm(100)
opar=par(ps=18) # Make text 18 point
hist(x)
opar
Rob Baer
- Original Message -
From: Sue Lee [EMAIL PROTECTED]
To: r-help@r-project.org
Sent: Monday, April 14, 2008 2:35 PM
Subject: [R
hi,
library(lattice)
x-c(-1,-1,-1,0,0,0,0,1,1,2)
rng-range(x)
histogram(x,endpoints=c(rng[1]-0.5,rng[2]+0.5),nint=length(unique(x)))
instead of contiguous bins, i'd like spaces between them to indicate
that the data is discrete, or even better, line segments positioned at
integer values.
i
You might consider something based on the concept of:
y - table( x)
plot( as.numeric(names(y)) , y, type='h')
-Don
At 2:59 PM -0400 3/27/08, [EMAIL PROTECTED] wrote:
hi,
library(lattice)
x-c(-1,-1,-1,0,0,0,0,1,1,2)
rng-range(x)
Thanks!
Yes, but I also want to be able to condition easily hence
histogram(...), not plot
-Original Message-
From: Don MacQueen [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2008 3:55 PM
To: Rogard, Erwann RD/US/EXT; r-help@r-project.org
Subject: Re: [R] histogram for integer
If I understand:
barplot(x)
axis(1)
On 06/03/2008, Hyunchul Kim [EMAIL PROTECTED] wrote:
Hi, all
I drew a barplot with
barplot(data1, beside=TRUE)
and then, I want to labels with hist() like x-axis ticks.
How can I do this?
Thanks in advance,
Hyunchul
Hi, all
I drew a barplot with
barplot(data1, beside=TRUE)
and then, I want to labels with hist() like x-axis ticks.
How can I do this?
Thanks in advance,
Hyunchul
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
On 2/11/08, willem vervoort [EMAIL PROTECTED] wrote:
Dear R-help list,
I am trying to construct a lattice histogram using 3 factors.
My dataframe looks like this: (simulating a waterbalance over
groundwater with different salinities)
s days modelECEC_max
0.4 1A
Dear R-help list,
I am trying to construct a lattice histogram using 3 factors.
My dataframe looks like this: (simulating a waterbalance over
groundwater with different salinities)
s days modelECEC_max
0.4 1A 10 9
0.42 2A 10 9
0.44 3
Thanks Deepayan, that did the trick
Willem
On Feb 12, 2008 9:46 AM, Deepayan Sarkar [EMAIL PROTECTED] wrote:
On 2/11/08, willem vervoort [EMAIL PROTECTED] wrote:
Dear R-help list,
I am trying to construct a lattice histogram using 3 factors.
My dataframe looks like this: (simulating a
Kumar M
Verzonden: woensdag 6 februari 2008 11:19
Aan: r-help@r-project.org
Onderwerp: [R] Histogram/Bar plot graph
Hi,
I have the following data:
Myvalues
Gene ES MEF Embryo ESHyp
1 GeneA -0.38509507 0.00 1.6250 1.7039921
2 GeneB0.06262914 0.00 1.6250 -0.272033
On Feb 6, 2008 2:35 AM, ONKELINX, Thierry [EMAIL PROTECTED] wrote:
You'll need to transform your dataset in a long format first.
library(ggplot2)
n - 5
MyValues - data.frame(Gene = factor(LETTERS[seq_len(n)]), ES =
rnorm(n), MEF = rnorm(n), Embrio = rnorm(n), EShyp = rnorm(n))
MyValuesMelt
On Jan 18, 2008 4:49 PM, [EMAIL PROTECTED] wrote:
Dear list,
I have a categorical variable in a data.frame that I would like to
plot using a histogram to show number of events. Values are 0, 1 and
some NAs. I can´t make the hist() function to
1) include a column with the number of NAs
2)
Dear list,
I have a categorical variable in a data.frame that I would like to
plot using a histogram to show number of events. Values are 0, 1 and
some NAs. I can´t make the hist() function to
1) include a column with the number of NAs
2) have the x axis to be categorical, I always get 0, 0.2,
Typical plots with vertical bars are not histograms. Consider barplot
or plot(*, type = h) for such bar plots. . But no worry, I've mixed
them up myself a number of times.
Or you can use ggplot2, which will do the right thing regardless of
whether you have continuous or categorical data:
On 1/11/2008 8:55 AM, Brian Nguyen wrote:
Hi, I've had some trouble figuring out how to produce a histogram in R
directly given a frequency table or relative frequency table. I've looked
through the documentation and mailing list, and have only found information
on producing histograms
Hi, I've had some trouble figuring out how to produce a histogram in R directly
given a frequency table or relative frequency table. I've looked through the
documentation and mailing list, and have only found information on producing
histograms given the original data set. Any help would be
-project.org
Subject: [R] Histogram with different colors for different portions
Dear Rusers,
I would like to color different sections of a histogram different colors.
I have an example that was done by brute force given below. Has anyone
implemented something like this in general? If not, any
Dear Rusers,
I would like to color different sections of a histogram different colors.
I have an example that was done by brute force given below. Has anyone
implemented something like this in general? If not, any suggestions/pointers
on how to write a general function to do so would be most
Hi
I want to plot a histogram (not cumulative!) as a step-function.
Any idea how achieve this?
Thank you
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
On Thu, 15 Nov 2007, Hakim Tafer wrote:
Hi
I want to plot a histogram (not cumulative!) as a step-function.
Any idea how achieve this?
Thank you
Well if I understand you correctly you can do this.
x-rnorm(100)
par(mfrow=c(2,1))
hist(x)
histRes - hist(x,plot=FALSE)
xvals - histRes$breaks
Jim Lemon wrote:
Hi Paul,
It looks like you have a 1548 bar histogram, which means that you
can't even resolve the bars on the standard display, much less
annotate them.
umm yes but I know that I only want to see everything from 0 : 150 so
it's ends up only being 300bar's which I agree is
Hi Paul,
Why do you want to do that? Maybe you could publish table along side
your graph if you want people to be able to read the raw numbers.
Hadley
On 10/16/07, H. Paul Benton [EMAIL PROTECTED] wrote:
Dear all,
Just a quick one, hopefully. I have a histogram made from the method
Dear all,
Just a quick one, hopefully. I have a histogram made from the method
'hist()'. How do I get labels on the bars? Such that the bars will have
the x axis on the bar, not the frequency of the point but the number of
the point itself. To make a quick summary, I want the the numbers from
301 - 359 of 359 matches
Mail list logo