Tena koe
Possibly barplot() is what you are after.
?barplot
HTH
Peter Alspach
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of gina_alessa
Sent: Wednesday, 4 April 2012 9:08 a.m.
To: r-help@r-project.org
Subject: [R
intv = c('0-19','10-19','20-29','30-39')
cnts = c(0, 3117, 4500, 2330)
barplot(cnts, space=0, names = intv, xlab='Age Range', ylab = 'Counts',
main='My Histogram')
-Original Message-
From: gina_alessa
Sent: Tuesday, April 03, 2012 4:08 PM
To: r-help@r-project.org
Subject: [R
Hi all,
I am generating histograms with the following R script :
#!/usr/bin/Rscript
out_file = histo.png
png(out_file)
scan(values.csv) - myvalues
hist(myvalues, breaks = 50)
dev.off()
print(paste(Plot was saved in:, getwd()))
I want the histogram to have a larger number of breaks, but a
See below:
On Thu, Mar 29, 2012 at 10:05 AM, Vihan Pandey vihanpan...@gmail.com wrote:
Hi all,
I am generating histograms with the following R script :
#!/usr/bin/Rscript
out_file = histo.png
png(out_file)
scan(values.csv) - myvalues
hist(myvalues, breaks = 50)
dev.off()
On Mar 29, 2012, at 10:12 AM, Sarah Goslee wrote:
See below:
On Thu, Mar 29, 2012 at 10:05 AM, Vihan Pandey
vihanpan...@gmail.com wrote:
Hi all,
I am generating histograms with the following R script :
#!/usr/bin/Rscript
out_file = histo.png
png(out_file)
scan(values.csv) - myvalues
Thanks. How do you suggest I use the reference population? Sorry, I'm new
to R and just don't see it. If i can get a plot that is counts or density
relative to my reference data it would be ideal.
On Mon, Feb 6, 2012 at 1:12 AM, David Winsemius dwinsem...@comcast.netwrote:
On Feb 5, 2012,
On Feb 6, 2012, at 12:23 PM, Francis Keyes wrote:
Thanks. How do you suggest I use the reference population? Sorry,
I'm new to R and just don't see it. If i can get a plot that is
counts or density relative to my reference data it would be ideal.
It is difficult to specify how when we
Hi David,
I have 2 tables, each with several columns and rows of data. I am
only interested in the data from column 6, which contains values in
the range -PI to PI. I want to plot the data from tableD with the y
axis denoting percentage with respect to tableR. So if data points in
the break 2
On Feb 6, 2012, at 5:26 PM, Francis Keyes wrote:
Hi David,
I have 2 tables, each with several columns and rows of data. I am
only interested in the data from column 6, which contains values in
the range -PI to PI. I want to plot the data from tableD with the y
axis denoting percentage with
On Feb 6, 2012, at 9:46 PM, Francis Keyes wrote:
ok here are two 1-column data files. sample1 and sampleRef (the
reference distribution)
dat1 - read.table(file=~/Downloads/sample1)
datRef - read.table(file=~/Downloads/sampleRef)
str(dat1)
'data.frame': 11378 obs. of 1 variable:
$
With R and the hist function, is there a way to make a histogram in which
the y axis denotes propotion with respect to a separate sample dataset of
the same range instead of frequency?
[[alternative HTML version deleted]]
__
On Feb 5, 2012, at 8:31 PM, Francis Keyes wrote:
With R and the hist function, is there a way to make a histogram in
which
the y axis denotes propotion with respect to a separate sample
dataset of
the same range instead of frequency?
hist() returns an object with both counts and density.
I want to make a histogram in R of the data in attached excel file called
'cbt'. However, I need the histogram to show a separation for Group 1 and
Group 2, as in attached image.
How do I do this in R? I know how to make a histogram for a single group,
but how can I separate the 2 groups?
januari 2012 8:58
Aan: r-help@r-project.org
Onderwerp: [R] Histogram: plot by group
I want to make a histogram in R of the data in attached excel file called
'cbt'. However, I need the histogram to show a separation for Group 1 and Group
2, as in attached image.
How do I do this in R? I know how
I want to make a histogram in R of the data in attached excel file called
'cbt'. However, I need the histogram to show a separation for Group 1 and
Group 2, as in attached image.
How do I do this in R? I know how to make a histogram for a single group,
but how can I separate the 2 groups?
On Jan 1, 2012, at 07:40 , Joshua Wiley wrote:
If you just want a plot of the frequencies at each hour why not just call
barplot on the output of table? Histograms create bins and count in those,
which doesn't sound like what you're after.
Exactly. If what you want is a barplot, make a
On Sun, Jan 1, 2012 at 5:29 AM, peter dalgaard pda...@gmail.com wrote:
Exactly. If what you want is a barplot, make a barplot; histograms are for
continuous data. Just remember that you may need to set the levels
explicitly in case of empty groups: barplot(table(factor(x,levels=0:23))).
Hi Aren,
I was busy thinking about how to make what you wanted, and I missed
that you were working with hours from a day. That being the case, you
may think about a circular graph. The attached plots show two
different ways of working with the same data.
Cheers,
Josh
set.seed(10)
x -
This is helpful, although I can't seem to adapt it to my own data.
If I run your sample as is, I do get the nice graphs.
However, this doesn't work:
(Assume you already have a data frame dallas with 2057980 rows. It
has column offense_hour, and each row has a value between 0 and 23,
inclusive.)
Sorry, that was probably a really confusing example...too many xs
floating around.
set.seed(10)
rawdata - sample(0:23, 1, TRUE, prob = sin(0:23)+1)
## do theis step first for your data
tableddata - as.data.frame(table(rawdata))
## use these names in ggplot
colnames(tableddata)
Thanks. That did it!
And I get it now--in your original example, aes(x = x, y = Freq), x
refers to the column name in as.data.frame(table(x)), not the x
vector(?) you created.
Aren
On Sun, Jan 1, 2012 at 4:44 PM, Joshua Wiley jwiley.ps...@gmail.com wrote:
Sorry, that was probably a really
I have two large datasets (156K and 2.06M records). Each row has the
hour that an event happened, represented by an integer from 0 to 23.
R's histogram is combining some data.
Here's the command I ran to get the histogram:
histinfo - hist(crashes$hour, right=FALSE)
Here's histinfo:
histinfo
Hi,
I think you're not understanding quite what's going on with hist. Reread the
help, and take a look at this small example. The solution I'd use is the last
item.
x - rep(1:10, times=1:10)
table(x)
x
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
hist(x, plot=FALSE,
Here is a test I ran and looks fine, but then I created the data, so
it might have something to do with your data:
x - sample(0:23, 10, TRUE)
a - hist(x, breaks = 24)
a[1:5]
$breaks
[1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
$counts
[1] 8262 4114 4186
Fast fingers; notice that there is still a problem in the counts; I
was only looking at the last.
Happy New Year -- up too late.
On Sun, Jan 1, 2012 at 12:33 AM, jim holtman jholt...@gmail.com wrote:
Here is a test I ran and looks fine, but then I created the data, so
it might have something
If you just want a plot of the frequencies at each hour why not just call
barplot on the output of table? Histograms create bins and count in those,
which doesn't sound like what you're after.
Cheers,
Josh
On Dec 31, 2011, at 21:37, jim holtman jholt...@gmail.com wrote:
Fast fingers;
I have a dataframe in the general format:
chr1 0.5
chr1 0
chr1 0.75
chr2 0
chr2 0
chr3 1
chr3 1
chr3 0.5
chr7 0.75
chr9 1
chr9 1
chr22 0.5
chr22 0.5
where the first column is the chromosome location and the second column is
some value. What I'd like to do is have a histogram created for each chr
Hi,
On Mon, Oct 17, 2011 at 8:07 AM, a217 aj...@case.edu wrote:
I have a dataframe in the general format:
chr1 0.5
chr1 0
chr1 0.75
chr2 0
chr2 0
chr3 1
chr3 1
chr3 0.5
chr7 0.75
chr9 1
chr9 1
chr22 0.5
chr22 0.5
Using dput to give us some reproducible data would be even better.
Hi,
When using ggplot, take a look at facet_wrap and geom_histogram.
regards,
Paul
On 10/17/2011 12:14 PM, Sarah Goslee wrote:
Hi,
On Mon, Oct 17, 2011 at 8:07 AM, a217 aj...@case.edu wrote:
I have a dataframe in the general format:
chr1 0.5
chr1 0
chr1 0.75
chr2 0
chr2 0
chr3 1
Paul Hiemstra paul.hiemstra at knmi.nl writes:
Hi,
When using ggplot, take a look at facet_wrap and geom_histogram.
regards,
More specifically, try something along the lines of
d - data.frame(f=factor(paste(chr,rep(c(1,2,3,7,9,22),each=50),sep=)),
v=runif(300))
library(ggplot2)
Like others have suggested, I think ggplot2 is probably the best way
to go about this, but if you'd rather use base graphics (and you never
indicated how you felt about ggplot2), you could do something like
this with tapply:
fcts - letters[sample(9,1500,T)]
vals - rnorm(1500)
df -
where the first column is the chromosome location and the second column is
some value. What I'd like to do is have a histogram created for each chr
location (i.e. a separate histogram for chr1, chr2, chr3, chr7, chr9, and
chr22). I am just having a hard time getting everything to work out
Hey all,
I encountered a problem drawing a histogram.
You can view the picture here:
http://dl.dropbox.com/u/4836866/Bad_Histogramm.png
What happens:
the bars are drawn with different starting points, thus no straight zero-line
is there.
And bars are overlapping. (or sometimes apart from
On 11-09-06 6:29 PM, Berry Boessenkool wrote:
Hey all,
I encountered a problem drawing a histogram.
You can view the picture here:
http://dl.dropbox.com/u/4836866/Bad_Histogramm.png
This has been fixed in R-patched: see
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14628.
Duncan
Dear R-users,
I need to produce a histogram where for every breaks there are the mean of the
data.
I tried tu use the function hist(x, break=20 ... ) but this return the
numerosity for every breaks, not the mean.
Any hint?
Thanks in advance,
francesco
I do not believe your code (minimal as it is) would work: the correct
argument is breaks. More generally, do you really mean to say that hist(x,
breaks = 20) immediately returns the bin counts? It doesn't on my machine
and if you knew how to get the counts, you should be able to get the
midpoints
1447.518
1553.838 1649.231 1735.217 1850.617 1957.85
2031.329 2156.8 2247.55 2340.6 2822.1
Thank you very much.
francesco
From: michael.weyla...@gmail.com
Date: Tue, 23 Aug 2011 11:27:13 -0400
Subject: Re: [R] [r] histogram with mean for every break
To: nutini.france
Update: I have recreated an artificial distribution using uniform random
numbers
n - c(runif(Car[1],0,2), runif(Car[2],2,5),runif(Car[3],5,10),
runif(Car[4],10,20),
runif(Car[5],20,30), runif(Car[6],30,40), runif(Car[7],40,60),
runif(Car[8],60,200) )
The resulting density
Dear R user,
I am using UK census data on travel to work. The authorities have provided a
breakdown in each area by mode (car, bicycle etc.) and distance travelled (0
– 2 km, 2 – 5 km etc). Therefore, after processing, the data for Sheffield
look like this
Hello R-Help-Team,
I am doing a 3-way-nestedAnova and a very strange thing occurred. My
Two-sample Kolmogorov-Smirnov test (p=0.957) meet the requirement of
normal distribution, BUT if I have a look at the histogram it is
definitely not normally distributed. I never had something like that
On Aug 8, 2011, at 8:04 AM, Jörg Stephan wrote:
Hello R-Help-Team,
I am doing a 3-way-nestedAnova and a very strange thing occurred. My
Two-sample Kolmogorov-Smirnov test (p=0.957) meet the requirement
of normal distribution, BUT if I have a look at the histogram it is
definitely not
Hello R-Help-Team,
I am doing a 3-way-nestedAnova and a very strange thing occurred. My
Two-sample Kolmogorov-Smirnov test (p=0.957) meet the requirement of
normal distribution, BUT if I have a look at the histogram it is
definitely not normally distributed. I never had something like that
On Aug 8, 2011, at 10:00 AM, Jörg Stephan wrote:
Hello R-Help-Team,
I am doing a 3-way-nestedAnova and a very strange thing occurred. My
Two-sample Kolmogorov-Smirnov test (p=0.957) meet the requirement
of normal distribution, BUT if I have a look at the histogram it is
definitely not
Hi:
What is the connection between genot and cage? What is the purpose of
the levels fifteen, nine and fortyfive in eggs? Are these the numbers
of eggs per some type of batch whose total is 45?
Dennis
On Mon, Aug 8, 2011 at 7:00 AM, Jörg Stephan jogstep...@googlemail.com wrote:
Hello
Like most help forum users, I'm very new to R. I've been having this problem:
I started with a dataframe called fullData. With the subset command, I split
it into two separate dataframes, soloData and teamData.
The hist() function works when I use...
hist( subset(fullData,
DimmestLemming wrote:
hist(soloData$deaths)
I get the error, invalid number of 'breaks' .
Try
str(soloData$deaths)
or
head(soloData$deaths)
or
summary(soloData$Death)
There may be something wrong with you data.
Dieter
--
View this message in context:
Thanks! It was late, so this didn't occur to me, but I tried summary() and
all values were NA. The subset had resulted in a dataframe with 0 rows
somehow, but now that's fixed.
--
View this message in context:
On 09/06/11 16:39, nandini_bn wrote:
Hi Sam,This is exactly what I wanted. Could you please explain the code ? what
does 15, 0.65 and 0.25 stand for ?Nandini
Date: Wed, 8 Jun 2011 15:16:45 -0700
From: ml-node+3583766-897200094-233...@n4.nabble.com
To: nandini...@hotmail.com
Subject: Re:
this?
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Steven Kennedy
Sent: Thursday, June 09, 2011 3:28 AM
To: nandini_bn
Cc: r-help@r-project.org
Subject: Re: [R] Histogram
Have a look at:
http://addictedtor.free.fr/graphiques/thumbs.php
: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Steven Kennedy
Sent: Thursday, June 09, 2011 3:28 AM
To: nandini_bn
Cc: r-help@r-project.org
Subject: Re: [R] Histogram
Have a look at:
http://addictedtor.free.fr/graphiques/thumbs.php
One of the graph
,
This is exactly what I wanted. Could you please explain the code ? what does
15, 0.65 and 0.25 stand for ?
Nandini
Date: Wed, 8 Jun 2011 19:16:06 -0300
Subject: Re: [R] Histogram
From: rhelp.st...@gmail.com
To: nandini...@hotmail.com
CC: r-help@r-project.org
I think the command you
]
Sent: Thursday, June 09, 2011 5:58 PM
To: Anupam
Cc: Steven Kennedy; r-help@r-project.org
Subject: Re: [R] Histogram
It's difficult to understand what exactly you're looking for without seeing
an example, could you post a simple version? imgur.com is a website that
lets you quickly upload
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,
Did you read the help for hist?
freq: logical; if ‘TRUE’, the histogram graphic is a representation
of frequencies, the ‘counts’ component of the result; if
‘FALSE’, probability densities, component ‘density’, are
plotted (so that the histogram has a total area
Hello ,
I am trying to create a histogram in order to compare between two groups and
would like it to be similar to the figure attached. How can I generate this
using R ?
Thank you,
Nandini http://r.789695.n4.nabble.com/file/n3582448/5634-15977-1-PB.gif
--
View this message in context:
Hello ,
I am trying to create a histogram in order to compare between two groups and
would like it to be similar to the figure attached. How can I generate this
using R ?
Thank you,
Nandini
__
I think the command you want is barplot
x = rbinom(10,15,0.65)
y = rbinom(10,15,0.25)
barplot(rbind(x,y),beside=TRUE)
Sam
On Wed, Jun 8, 2011 at 10:14 AM, nandini_bn nandini...@hotmail.com wrote:
Hello ,
I am trying to create a histogram in order to compare between two groups and
would
Have a look at:
http://addictedtor.free.fr/graphiques/thumbs.php
One of the graph examples they have is exactly what you are after.
On Wed, Jun 8, 2011 at 11:14 PM, nandini_bn nandini...@hotmail.com wrote:
Hello ,
I am trying to create a histogram in order to compare between two groups and
Hi Sam,This is exactly what I wanted. Could you please explain the code ? what
does 15, 0.65 and 0.25 stand for ?Nandini
Date: Wed, 8 Jun 2011 15:16:45 -0700
From: ml-node+3583766-897200094-233...@n4.nabble.com
To: nandini...@hotmail.com
Subject: Re: Histogram
I think the command
On Tue, May 24, 2011 at 12:31 AM, Rekha chithralekh...@gmail.com wrote:
S . Am getting error still now if i use both version of the codes .
i have to call any library?
No. The code you've written here doesn't require loading any other R libraries.
Please copy and paste the exact code you've
On 2011-05-23 21:31, Rekha wrote:
S . Am getting error still now if i use both version of the codes .
i have to call any library?
Your code works fine for me, too, as it should.
Have you perhaps redefined the hist() function?
Do you get a histogram?
The error you quote would result if you
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
Hi,
On Mon, May 23, 2011 at 11:41 PM, Rekha chithralekh...@gmail.com wrote:
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
S . Am getting error still now if i use both version of the codes .
i have to call any library?
On Tue, May 24, 2011 at 9:22 AM, Steve Lianoglou
mailinglist.honey...@gmail.com wrote:
Hi,
On Mon, May 23, 2011 at 11:41 PM, Rekha chithralekh...@gmail.com wrote:
Hello All,*
*I want to
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
On Apr 22, 2011, at 12:31 PM, Terry Therneau wrote:
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)
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
Hi,
I am trying to do a Principal component analysis on histogram data.
Basically, I have a group of subjects and for each of them, I have a column
of bin-counts (vis-a-vis intervals) and a corresponding column of
frequencies (or normalized frequencies). The bin counts are the same for all
the
Hello Dhiman ,
I have never tried doing it on such data, so I am not sure how this
methodology applies or what covets it may hold.
However, R wise, it sounds to me like simply reusing the code here:
http://www.statmethods.net/advstats/factor.html
Would do the trick.
p.s: you wrote It would be
Hello,
Is there a function that returns the number of the bin (or quantile,
or percentile etc. etc.) that a value of a variable may belong to?
Tor example:
breaks-hist(variable, 18, plot=FALSE)
If the following breaks are
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85
the boundaries
x- rnorm(200)
hist(x, 18)
str(hist(x, 18))
List of 7
$ breaks : num [1:15] -3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 ...
$ counts : int [1:14] 3 1 8 12 34 35 40 30 18 11 ...
$ intensities: num [1:14] 0.03 0.01 0.08 0.12 0.34 ...
$ density: num [1:14] 0.03 0.01 0.08 0.12 0.34 ...
$
On Fri, May 14, 2010 at 10:55 AM, Research risk2...@ath.forthnet.gr wrote:
Is there a function that returns the number of the bin (or quantile, or
percentile etc. etc.) that a value of a variable may belong to?
Something like this should work:
dat - round(runif(20, 0, 100))
hist.dat -
On May 14, 2010, at 9:55 AM, Research wrote:
Hello,
Is there a function that returns the number of the bin (or
quantile, or percentile etc. etc.) that a value of a variable may
belong to?
Tor example:
breaks-hist(variable, 18, plot=FALSE)
If the following breaks are
5 10 15 20 25 30
On 27.04.2010 07:26, Tal Galili wrote:
trying setting
br = 40
inside the hist, and check if that helps...
(breaks won't do it for you either way)
Tal
No, the main problem is that a hist()ogram is used rather than a
barplot() which should be used
Uwe Ligges
-project.org
Subject: [R] Histogram not plotting correct breaks
Hi,
I'm using the hist function to plot the frequency of 21 variables, but
it
keeps starting the x-axis from 0 and adding variables 1 and 2 together
(all
other vairables have the correct frequencies). I suspect it adds 1 and
2
Hi,
I'm using the hist function to plot the frequency of 21 variables, but it
keeps starting the x-axis from 0 and adding variables 1 and 2 together (all
other vairables have the correct frequencies). I suspect it adds 1 and 2
together so that 0 can fit in with demarcations at intervals of 5.
trying setting
br = 40
inside the hist, and check if that helps...
(breaks won't do it for you either way)
Tal
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) |
===
Q2=c(
+ sample(10:19,8,T),
+ sample(20:24,15,T),
+ sample(25:29,25,T),
+ sample(30:39,18,T),
+ sample(40:49,12,T),
+ sample(50:64,7,T),
+ sample(65:89,5,T)
+ )
hist(Q2)
can give me a histogram,
however, how do i get a different
Subject: [R] histogram breaks
===
Q2=c(
+ sample(10:19,8,T),
+ sample(20:24,15,T),
+ sample(25:29,25,T),
+ sample(30:39,18,T),
+ sample(40:49,12,T),
+ sample(50:64,7,T),
+ sample(65:89,5,T)
+ )
hist(Q2)
can give me a histogram,
however, how
Santosh wrote:
Dear R gurus...
How do I control smoothing of a density plot in panel.densityplot when
using histogram?
Thanks much,
Santosh
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Thanks for your email... yes, I had tried that bw thing.. for some reason
it does not seem to work.. could not figure out where I am wrong...
Below is an example for your convenience.. you might notice that the density
plots appear to be a curve of connected segments. Changing breaks, nint or
bw
Santosh wrote:
Thanks for your email... yes, I had tried that bw thing.. for some
reason it does not seem to work.. could not figure out where I am wrong...
Below is an example for your convenience.. you might notice that the
density plots appear to be a curve of connected segments. Changing
On 2010-04-15 3:35, Santosh wrote:
Thanks for your email... yes, I had tried that bw thing.. for some reason
it does not seem to work.. could not figure out where I am wrong...
Below is an example for your convenience.. you might notice that the density
plots appear to be a curve of connected
yes.. that now works! thank you so much, Paul Peter!!
-santosh
On Thu, Apr 15, 2010 at 3:11 AM, Paul Hiemstra p.hiems...@geo.uu.nl wrote:
Santosh wrote:
Thanks for your email... yes, I had tried that bw thing.. for some
reason it does not seem to work.. could not figure out where I am
Dear R gurus...
How do I control smoothing of a density plot in panel.densityplot when
using histogram?
Thanks much,
Santosh
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Hi,
I have a simple task I can't figure out. I'd like to take
some measurements I made, e.g.:
year (y-axis)
1
2
3
4
5
6
counts (x-axis)
10
10
20
30
40
50
And then, make a barplot with the x-axis ticks (representing
the borders between years) between the bars.
However, barplot seems to
Hi, Nick!
plot(.., type=h, lwd=5, lend=3, xaxt=n)
axis(1, at=c(...))
is the way to start, after which you play with the code. For years.
Bob
On 3 April 2010 21:52, Nick Matzke mat...@berkeley.edu wrote:
Hi,
I have a simple task I can't figure out. I'd like to take some
measurements I
It might work to just say
barplot(table(...))
Kjetil
CC Or maybe even plot(table(...))
On Sat, Apr 3, 2010 at 5:14 PM, Bob O'Hara rni@gmail.com wrote:
Hi, Nick!
plot(.., type=h, lwd=5, lend=3, xaxt=n)
axis(1, at=c(...))
is the way to start, after which you play with the code.
Nevermind, I think I got it:
tempdata = data.frame(cbind(x,y))
xyplot(y ~ x, data=tempdata,
xlab=xlabel,
ylab=ylabel,
xlim=c(1.05* min(timebins), 0),
horizontal=FALSE,
col=gray,
scales=list(alternating=FALSE,
tck=c(1,0),
x=list(at=timebins,
labels=timebins)),
In a histogram , is it possible to have different colors?
Example. I generated
x - rnorm(100)
hist(x)
I want the histogram to have different colors based on the following condition
mean(x)+sd(x) with red color and mean(x) - sd(x) with red color as
well. The middle one with blue color.
On Mar 4, 2010, at 7:41 AM, Ashta wrote:
In a histogram , is it possible to have different colors?
Example. I generated
x - rnorm(100)
hist(x)
I want the histogram to have different colors based on the following
condition
mean(x)+sd(x) with red color and mean(x) - sd(x) with red
. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
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 Ashta
Sent: Thursday, March 04, 2010 5:42 AM
To: R help
Subject: [R] Histogram color
Dear all,
I want to use the histogtam as a density estimator, with the binwidths
calculated using scott's formula which is
binwidth = 3.49*ST.dev.*n^(-1/3)
for the following data (30 data points)
12-9-3-6-1-23-21-7-18-16-15-4-19-22-20-2-3-18-8-10-1-7-5-4-11-12-3-9-19-7
so first,I' ve tried this
On 05/02/2010 12:21 PM, maram salem wrote:
Dear all,
I want to use the histogtam as a density estimator, with the binwidths calculated using scott's formula which is
binwidth = 3.49*ST.dev.*n^(-1/3)
for the following data (30 data points)
Is this what you want:
singer1 - subset(singer, voice.part == Bass 1)
brks - seq(65, 75, 2)
histogram( ~ height, data = singer1, breaks = brks)
or, slightly different:
histogram( ~ height, data = singer1, breaks = brks,
scales = list(x = list(at = brks)))
-Peter Ehlers
anna wrote:
Hello everyone,
does anyone have an idea of how I display the breakpoints on the x label
when using the histogram funtion from lattice?
-
Anna Lippel
--
View this message in context:
http://n4.nabble.com/Histogram-function-from-lattice-package-tp1461735p1461735.html
Sent from the R help
Dear Baptiste,
Thanks a lot for the excellent example, which convinced me to start
studying ggplot2.
A trivial question: is there an easy way to generate a boxplot without
outliers?
Using R standard plotting facilities, this amounts to giving
outline=FALSE within boxplot.
Can I easily achieve
Dear All,
I am given 15 different data sets and I would like to generate a panel
showing all of them.
Each dataset will be presented either as a boxplot or as a histogram.
There are several possible ways to achieve this (as far as I know)
(1) using plot and mfrow()
(2) using lattice
(3) using
Hi,
Here is some artificial data followed by minimal ggplot2 and lattice examples,
makeUpData - function(){
data.frame(x=sample(letters[1:4], 100, repl=TRUE), y=rnorm(100))
}
datasets - replicate(15, makeUpData(), simplify=FALSE)
names(datasets) - paste(dataset, seq_along(datasets), sep=)
I forgot the base graphics way,
## divide the window in 4x4 cells
par(mfrow=n2mfrow(length(datasets)))
## loop over the list of datasets and plot each one
be.quiet - lapply(datasets, function(ii) boxplot(y~x, data=ii))
ggplot2 has a website with many examples,
http://had.co.nz/ggplot2/
as well
101 - 200 of 359 matches
Mail list logo