Re: [R] shift and pop equivalent in R

2010-04-20 Thread Xie Chao
Thanks Barry for the code sample, and Thanks Duncan for the clarification. Both replies help a lot! Best Regards, Xie Chao On Wed, Apr 21, 2010 at 2:50 AM, Barry Rowlingson wrote: > On Tue, Apr 20, 2010 at 7:03 PM, Xie Chao wrote: >> Dear All, >> >> I am wondering is th

[R] shift and pop equivalent in R

2010-04-20 Thread Xie Chao
Dear All, I am wondering is there any shift (or pop or push or unshift) equivalent in R? For example, shift(x) # should return x[1], and x becomes x[-1] Thanks a lot. Best Regards, Xie Chao __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] qplot(ggplo2): axis label sizes/colors

2010-03-23 Thread Xie Chao
http://had.co.nz/stat405/lectures/21-themes.pdf On Wed, Mar 24, 2010 at 1:22 AM, milton ruser wrote: > Dear all, > > How can I change the size and the color of axis? > I would like that the xlab to be larger, xvalues to be > larger, and xvalues in black instead of grey. > > x=runif(10) > y=runif(

Re: [R] ggplot2: Changing colour scheme for bar plot filling?

2010-03-12 Thread Xie Chao
", "discrete", 19) Error in get(paste("Scale", firstUpper(scale), sep = "")) : object 'Scale19' not found Thanks a lot! Xie Chao > > baptiste > > On 10 March 2010 10:31, Johannes Graumann wrote: >> Indeed. Thank you. Is there a global switch a

Re: [R] ggplot2 / time series with different scales

2010-02-04 Thread Xie Chao
you can use facet_wrap: df <- melt(df, id=c('time', 'sid')) ggplot(df, aes(time, value, colour=sid)) + geom_line(data = subset(df, variable=='sales')) + geom_point(data = subset(df, variable=='price')) + facet_wrap(~variable, ncol=1, scales=&#x

[R] binomial distribution

2008-06-27 Thread Xie Chao
Hi all, I am a biological student and need your help in statistics. I have two sets of binomial distributed numbers: {a1, a2, ..., an} and {b1, b2, ..., bn}. How can I get the distribution of the ratios of the two sets of numbers {a1/b1, a2/b2, ..., an/bn}? Is there a formula to transform the di