[R] Connecting to MS Access database

2010-07-18 Thread Xin Ge
Hi All, Can anyone please suggest me from where should I start to learn about 'how to connect to access db' ? How if someone has some written code and I can go over that to understand and make necessary changes... any help would be highly appreciated, -- Xin Ge. [[altern

[R] panel.abline {lattice} help

2010-06-09 Thread Xin Ge
5) to (5, 5) I'm unable to control the length of these lines, can anyone please help me with this, I would highly appreciate any help. (I tried using panel.curve, but of no use) # Plotting code: library(lattice) bwplot(c ~ b, data = x, panel = function(...) { panel.abline(v=2.5,

[R] forest() in {metafor} :: edit labels

2010-05-26 Thread Xin Ge
> PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Xin Ge. [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] Multiple plots; single x(y) labels

2010-05-14 Thread Xin Ge
s", > > main = "", ylab="", xlab="") > plot(x <- sort(rnorm(67)), type = "s", main = > > "", ylab="", xlab="") > mtext("One x-label", side = 1, > > outer=TRUE) > mtext("One y-label&qu

Re: [R] Multiple plots; single x(y) labels

2010-05-13 Thread Xin Ge
uot;, xlab="") plot(4:7, 6:9, type = "s", main = "", ylab="", xlab="") Thanks in advance, Xin On Thu, May 13, 2010 at 1:10 PM, David Winsemius wrote: > > On May 13, 2010, at 12:59 PM, Xin Ge wrote: > > Hi David, >> >> Thanks fo

Re: [R] Multiple plots; single x(y) labels

2010-05-13 Thread Xin Ge
; determine the shared max and min for the y limits >> >> On May 13, 2010, at 12:04 PM, Xin Ge wrote: >> >> Hi All, >>> >>> Can anyone please help me with getting a single x and y-axis label while >>> plotting muliple plots. >>> >> > I

[R] Multiple plots; single x(y) labels

2010-05-13 Thread Xin Ge
Hi All, Can anyone please help me with getting a single x and y-axis label while plotting muliple plots. Here is the code: par(mfcol=c(2,2)) plot(x <- sort(rnorm(7)), type = "s", main = "", ylab="", xlab="") plot(x <- sort(rnorm(27)), type = "s", main = "", ylab="", xlab="") plot(x <- sort(rnorm(

[R] Help: coxph() in {survival} package

2010-04-19 Thread Xin Ge
Hi All, I'm runnning coxph() on 90 different datasets (in a loop). 1. I'm wondering how can I get "log-likelihood" value from coxph() output. Currently I can only see following: Likelihood ratio test = Wald test = Score (logrank) test = 2. Once I have likelihood value, I would like to extract

Re: [R] finding weekly average...

2010-04-07 Thread Xin Ge
Thanks Dennis and Daniel for your reply! On Wed, Apr 7, 2010 at 12:24 PM, Daniel Malter wrote: > > Assume you have suitable "week" indicator and your data is stored in a > data.frame named "data." Then you get the weekly averages by > > #simulate data > week <- rep(1:52,each=7) > x <- week+rnorm

[R] finding weekly average...

2010-04-07 Thread Xin Ge
Hi All, I have a time series data with two continuous variables (say Var1 and Var2) for 4 years (***not continuous, do have some breaks because of missing data***). Something like this: Date Var1 Var2 12/01/2004 7 0 12/01/2004 0 0 12/01/2004 0 7 12/01/2004 7 0 12/01/2004 0 7 12/01/2004 0 7 12/02/

Re: [R] Three most useful R package

2010-03-24 Thread Xin Ge
- ggplot2 - lattice - reshape Request to R-team: Please make ggplot2 and reshape as default packages in R, they are really helpful! Thanks, Xin On Fri, Mar 5, 2010 at 10:48 PM, kMan wrote: > (1) - nlme, lattice, stats > (2) - a usable large-file/out of memory regression package that abstracts >

Re: [R] re-ordering x-lables using barchart()

2009-12-08 Thread Xin Ge
, scales = list(x = list(abbreviate = TRUE, rot=45, minlength = 5))) On Tue, Dec 8, 2009 at 10:35 PM, Xin Ge wrote: > Hi Gary, yes I'm using barchart() a lot these days... and was facing same > problem of re-ordering... > > > On Tue, Dec 8, 2009 at 10:28 PM, Gary Mil

Re: [R] re-ordering x-lables using barchart()

2009-12-08 Thread Xin Ge
Thanks David, it worked! On Tue, Dec 8, 2009 at 5:03 PM, David Winsemius wrote: > > On Dec 8, 2009, at 4:42 PM, Gary Miller wrote: > > Hi R Users, >> >> I'm trying to re-order the "site names" ("Waseca", "Morris", ...). I'm >> using >> following code: >> >> libarry(lattice) >> > > # slip this cod

Re: [R] Forest Plot

2009-12-08 Thread Xin Ge
Tel: +31 (0)43 388-2277 > School for Public Health and Primary Care Office Location: > Maastricht University, P.O. Box 616 Room B2.01 (second floor) > 6200 MD Maastricht, The Netherlands Debyeplein 1 (Randwyck) > > > Original Message > From: Xin Ge

[R] {Lattice} help.

2009-12-07 Thread Xin Ge
Hi All, I have a 4-dimensional data. I'm using barchart() function from lattice package. The R code and data are below - code includes one for stack=TRUE and other for stack=FALSE. I would like to present the data in another form which would be plotting Factor3 levels (P, Q, R, S) as two stacked

[R] R ANOVA question

2009-12-06 Thread Xin Ge
Hi All, I'm fitting an intercept ANOVA model using R. I'm using following contrast statement, so my first level is considered as base level. options(contrasts = c("contr.treatment", "contr.treatment")) My data has two factors are "Month" and "WeekDay". Due to default alphabetic ordering, the Mont

Re: [R] Forest Plot

2009-12-05 Thread Xin Ge
> Maastricht University, P.O. Box 616 Room B2.01 (second floor) > 6200 MD Maastricht, The Netherlands Debyeplein 1 (Randwyck) > ________ > From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On > Behalf Of Xin Ge [xingemaill.

[R] Forest Plot

2009-12-05 Thread Xin Ge
Hi All, I want to produce a similar "Forest Plot" as it is on the following link, but my data would be having only two columns (one for "Estimate" and other for "Std. Dev"). Can anyone suggest some function() {Package} which can take such file as an input and give following forest plot: http://bm

Re: [R] Help: barchart() {lattice}

2009-12-04 Thread Xin Ge
Thanks David, it worked! On Fri, Dec 4, 2009 at 10:36 PM, David Winsemius wrote: > > On Dec 4, 2009, at 10:17 PM, Xin Ge wrote: > > @ Francisco: Thanks, it worked. >> >> >> @ All: I'm able to change the colors of legend using following code: >> >

Re: [R] Help: barchart() {lattice}

2009-12-04 Thread Xin Ge
to make it look a bit better > > > print(p1, split=c(1,1,2,1), more=TRUE) > print(p2, split=c(2,1,2,1)) > > > I hope this helps, > > Francisco > > Francisco J. Zagmutt > Vose Consulting > 1643 Spruce St., Boulder > Boulder, CO, 80302 > USA > www.voseco

[R] Help: barchart() {lattice}

2009-12-04 Thread Xin Ge
Hi All, I'm trying par(mfrow(c(1,2))) with barchart(), but its not working. Can I display two or more barcharts on a same page using some other function? I'm using following code --- where barchart() part is taken from help manual. library(lattice) par(mfrow=c(1,2)) barchart(yield ~ variety | sit

Re: [R] (Grouped + Stacked) Barplot

2009-12-04 Thread Xin Ge
. > 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 Xin Ge > > Sent: Wednesday, December 02, 2009 8:2

Re: [R] (Grouped + Stacked) Barplot

2009-12-02 Thread Xin Ge
Hello David, Can you please explain a little more, I could not exactly got it. Thanks, Xin On Wed, Dec 2, 2009 at 10:50 PM, David Winsemius wrote: > > On Dec 2, 2009, at 10:25 PM, Xin Ge wrote: > > Hi All, >> >> I have googled and tried finding if someone has ever tri

[R] (Grouped + Stacked) Barplot

2009-12-02 Thread Xin Ge
Hi All, I have googled and tried finding if someone has ever tried producing (Grouped + Stacked) Barplot. I couldn't find one. My data needs to be reshaped, but once it is done it would be something like this: Factor1Factor2Factor3Value AXP10 AXQ20 AYP