in
brackets))
Square brackets doesn't seem to work because I'm using them in and \n
operator is not working too. Any help would be highly appreciated, thanks,
Peng Cai
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https
this:
___
| |
| Plot |
|___ __|
1931 1932
Month: 01 04
# R code
require(lattice)
barchart(yield ~ year, data = barley,
stack=TRUE,
col=black,
ylim=c(0,85)
)
Can anyone help please, thanks in advance,
Peng Cai
[[alternative
region parameters for
lattice plots (though I'm aware of how to change these).
Thanks,
Peng Cai
On Wed, Mar 17, 2010 at 7:27 PM, Jim Lemon j...@bitwrit.com.au wrote:
On 03/18/2010 09:50 AM, Peng Cai wrote:
Hi All,
I need some help with adding text at the bottom of the graph (outside
Thanks Deepayan !
On Sun, Feb 28, 2010 at 2:08 PM, Deepayan Sarkar
deepayan.sar...@gmail.comwrote:
On Sat, Feb 27, 2010 at 8:14 PM, Peng Cai pengcaimaill...@gmail.com
wrote:
Thanks a lot Deepayan, one question:
Is it possible to place these barplots side-by-side instaed of super
= panel.superpose, panel.groups = panel.bwplot,
auto.key=list(space=right),
groups = year, scales=(x=list(rot=45)))
Thanks,
Peng
On Fri, Feb 26, 2010 at 3:51 AM, Deepayan Sarkar
deepayan.sar...@gmail.comwrote:
On Fri, Feb 26, 2010 at 8:30 AM, Peng Cai pengcaimaill...@gmail.com
wrote:
Hi
Hi All,
I'm trying to plot boxplot graph. I tried barchart with groups= option and
it worked fine. But when I try to generate same kind of graph using
bwplot(), groups= option doesn't seem to work. Though this works,
yield ~ variety | site * year
I'm thinking why groups= doesn't work in this
Hi All,
I'm trying to use expression() for y-label in plot(). I'm not able to write
Average(space)PM(subscript)10. I'm trying:
ylab=expression(Average PM[10])
and its not working, because of a space between Average and PM. Thanks,
Peng
[[alternative HTML version deleted]]
boxplot for publication. Having legend can help
because otherwise x-axis labels are repeated for each rectanglular box.
Thanks,
Peng Cai
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
Thanks Richard. Which function I should explore in HH package to get such
boxplot?
Peng
On Sat, Dec 19, 2009 at 6:06 PM, Richard M. Heiberger r...@temple.eduwrote:
The grouped boxplot is one of the features included in the HH package.
An example is posted on my site
Hi All,
I'm trying to write ug/m3 as y-label, with greek letter mu replacing u
AND 3 going as a power.
These commands works in general:
plot.new()
text(0.5, 0.5, expression(symbol(m)))
But, I'm sure about how to do it using barchart() from Lattice. Can anyone
help please?
Thanks,
Peng Cai
Hi Baptiste and Others,
Thanks for your help. I'm writing:
ylab=expression(Concentration(mu*g/m^3))
And its working fine, but is it possible to add a space between
Concentration and (mu*g/m^3).
Thanks again,
Peng Cai
On Wed, Dec 9, 2009 at 12:02 PM, baptiste auguie
baptiste.aug
Thanks, it worked!
On Wed, Dec 9, 2009 at 12:46 PM, baptiste auguie
baptiste.aug...@googlemail.com wrote:
barchart(1:2, ylab=expression(Concentration (*mu*g/m^3*)))
2009/12/9 Peng Cai pengcaimaill...@gmail.com:
Hi Baptiste and Others,
Thanks for your help. I'm writing:
ylab
alot,
Peng Cai
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal
Peng Cai wrote:
Hi,
I'm plotting grouped barplot using following code and data. I need help
with
re-ordering the labels.
1. On x-axis the factor AGE is grouped in order 0--4, 15--18,
5--14;
whereas I would like to have it in 0--4, 5--14, 15--18.
2. If I need to re-order RACE
, 2009 at 11:47 AM, Peng Cai pengcaimaill...@gmail.com wrote:
Thank you Uwe, Dennis, and Gary for your help. I have one more question:
I'm using pre-defined y-scales and trying to create grid lines.
As Female category has low sum value, its y-axis range from 0-150 whereas
Male ranges from 0-300
Hi,
I'm plotting grouped barplot using following code and data. I need help with
re-ordering the labels.
1. On x-axis the factor AGE is grouped in order 0--4, 15--18, 5--14;
whereas I would like to have it in 0--4, 5--14, 15--18.
2. If I need to re-order RACE variable. How can I do it assuming
Hi R Users,
I'm wondering how can I calculate two (or three) way sum of a variable. A
sample data is:
State Month Year Value
NC Jan 1996 1
NC Jan 1996 2
NC Feb 1997 2
NC Feb 1997 3
NC Mar 1998 3
NC Mar 1998 4
NY Jan 1996 4
NY Jan 1996 5
NY Feb 1997 5
NY Feb 1997 6
NY Mar 1998 6
NY Mar 1998 7
tapply(x$Value, list(x$State, x$Year, x$Month), sum)
, , Feb
1996 1997 1998
NC NA5 NA
NY NA 11 NA
, , Jan
1996 1997 1998
NC3 NA NA
NY9 NA NA
, , Mar
1996 1997 1998
NC NA NA7
NY NA NA 13
On Thu, Dec 3, 2009 at 1:50 PM, Peng Cai
Thanks David for your suggestions.
On Thu, Dec 3, 2009 at 2:03 PM, David Winsemius dwinsem...@comcast.netwrote:
On Dec 3, 2009, at 1:50 PM, Peng Cai wrote:
Hi R Users,
I'm wondering how can I calculate two (or three) way sum of a variable. A
sample data is:
State Month Year Value
NC
Also, can I control for number of decimal places printed. Like when I use
mean function. By default it shows upto 7 dec. Thanks!
On Thu, Dec 3, 2009 at 2:08 PM, Peng Cai pengcaimaill...@gmail.com wrote:
Thanks David for your suggestions.
On Thu, Dec 3, 2009 at 2:03 PM, David Winsemius
Thanks again!
On Thu, Dec 3, 2009 at 2:19 PM, David Winsemius dwinsem...@comcast.netwrote:
On Dec 3, 2009, at 2:14 PM, Peng Cai wrote:
Also, can I control for number of decimal places printed. Like when I use
mean function. By default it shows upto 7 dec. Thanks!
print(4.567891234
Try this:
both - merge(left, right, by.x=column1, by.y=column1)
left dataset
column1column2
121 12345
145 1675
167 2765
right datset
column1 column3
121abc
345lmn
167efg
HTH,
Peng
On Thu, Dec 3, 2009 at 2:47 PM, Ramya ramya.vict...@gmail.com wrote:
Hi R Users,
I'm using following data/code (data is attached also) to produce a stacked
barplot.
# Sample Data:
Names Col1 Col2 Col3
Row1 -20 40 -10
Row2 30 -20 40
Row3 30 10 -20
Row4 20 20 -10
# R Code:
dta-read.table(data.txt, header=TRUE, row.names=Names)
barchart(data.matrix(dta),
,
stack=TRUE,
par.settings = simpleTheme(col = 3:5),
auto.key=list(space=right),
border=NA,
scales = list(y = list(at = yScale))
)
Thanks,
Peng
On Wed, Dec 2, 2009 at 5:44 PM, Felix Andrews fe...@nfrac.org wrote:
2009/12/3 Peng Cai pengcaimaill...@gmail.com:
Hi R Users,
I'm
Got it thanks, (relation=free worked), more specifically
scales = list(relation=free, y = list(at = yScale))
On Wed, Dec 2, 2009 at 6:04 PM, Felix Andrews fe...@nfrac.org wrote:
2009/12/3 Peng Cai pengcaimaill...@gmail.com:
Hi Felix,
Thanks for your help. If I'm defining my own y-scales
Hi R Users,
I'm using following data/code (data is also attached) to produce a stacked
barplot.
*I need help with changing legend boxes, currently I'm using
rectangles=TRUE. Is it possible to get small squares instead -- may be
with a small gap between colored squares.* Currently there is no gap
Thanks David, it worked.
On Wed, Dec 2, 2009 at 7:34 PM, David Winsemius dwinsem...@comcast.netwrote:
On Dec 2, 2009, at 6:27 PM, Peng Cai wrote:
Hi R Users,
I'm using following data/code (data is also attached) to produce a stacked
barplot.
*I need help with changing legend boxes
= list(relation=free, rot=90, y = list(at = yScale))
Thanks,
Peng
On Wed, Dec 2, 2009 at 6:17 PM, Peng Cai pengcaimaill...@gmail.com wrote:
Got it thanks, (relation=free worked), more specifically
scales = list(relation=free, y = list(at = yScale))
On Wed, Dec 2, 2009 at 6:04 PM, Felix
Hi R Users,
I'm trying to plot a stacked barplot. Here is data:
Sample Col1 Col2 Col3
Row1 -2 4 -1
Row2 3 -2 4
Row3 3 5 -2
Row4 4 1 -1
I'm using following R code:
library(lattice)
dta-read.table(data.txt, header=TRUE, row.names=Sample)
barchart(data.matrix(dta),
horizontal=FALSE,
Hi R Users,
I am using following R code to plot a grouped boxplot. I'm hoping if I can
add MEAN to these boxplots. Data is copied below and attached as text file.
install.packages(ggplot2)
library(ggplot2)
dta-read.table(Sample.txt,header=T)
attach(dta)
p - ggplot(dta, aes(factor(month), nail))
as factor with 6 levels.
Please let me know if you have any further question,
Thanks,
Peng
DM
On Thu, Nov 26, 2009 at 1:00 PM, Peng Cai pengcaimaill...@gmail.comwrote:
Hi R Users,
I am using following R code to plot a grouped boxplot. I'm hoping if I
can
add MEAN to these boxplots
it seems more
interepretable.
HTH,
Dennis
On Thu, Nov 26, 2009 at 10:53 AM, Peng Cai pengcaimaill...@gmail.comwrote:
Hi R Users,
I'm trying to plot a stacked barplot. Here is data:
Sample Col1 Col2 Col3
Row1 -2 4 -1
Row2 3 -2 4
Row3 3 5 -2
Row4 4 1 -1
I'm using following R code
(like
-0.04, -0.02, 0, 0.02,...).
Can I change these too? Thanks!
Peng
On Thu, Nov 26, 2009 at 3:18 PM, Peter Ehlers ehl...@ucalgary.ca wrote:
Peng Cai wrote:
Hi R Users,
I'm trying to plot a stacked barplot. Here is data:
Sample Col1 Col2 Col3
Row1 -2 4 -1
Row2 3 -2 4
Row3 3 5 -2
Thanks a lot Peter! One more help, is there a similar function abline() for
barchart().
I'm trying to add a (light gray colored) horizontal lines, one for each
y-value.
Peng
On Thu, Nov 26, 2009 at 5:59 PM, Peter Ehlers ehl...@ucalgary.ca wrote:
Peng Cai wrote:
Hi Peter,
I'm not sure
Thanks David, I tried panel.abline(h=somevalue) -- both inside and outside
of barchart() function but its not working. Any suggestions?
Peng
On Thu, Nov 26, 2009 at 6:42 PM, David Winsemius dwinsem...@comcast.netwrote:
On Nov 26, 2009, at 6:12 PM, Peng Cai wrote:
Thanks a lot Peter! One
just suggested can solve this purpose? Thanks,
Peng
On Thu, Nov 26, 2009 at 7:09 PM, Peter Ehlers ehl...@ucalgary.ca wrote:
Peng Cai wrote:
Thanks David, I tried panel.abline(h=somevalue) -- both inside and outside
of barchart() function but its not working. Any suggestions?
Peng
Here's
PM2.5 Contribution (µg/m3),
xlab=Month,
box.ratio=2.5,
scales = list(y = list(at = myYscale)),
)
Thanks,
Peng
On Thu, Nov 26, 2009 at 7:23 PM, Peng Cai pengcaimaill...@gmail.com wrote:
Hi Again,
Before I start getting into what you just suggested, let me confirm if I
made my
)
panel.barchart(x,y,...)
},
scales = list(y = list(at = myYscale))
)
Thanks,
Peng
On Thu, Nov 26, 2009 at 7:23 PM, Peng Cai pengcaimaill...@gmail.comwrote:
Hi Again,
Before I start getting into what you just suggested, let me confirm if I
made my
was:
auto.key = list(space = 'right', rectangles=TRUE, points=FALSE)
-Peter Ehlers
Peng Cai wrote:
Hello Peter and David,
Thanks for your help. I have added what you suggested and its working
perfectly fine except:
When I add the panel function, the legend changes. In the sense without
39 matches
Mail list logo