[R] rbugs on linux and wine

2008-04-20 Thread Alexander.Herr
Hi List, I trying an example from pumps{rbugs} with .Renviron in $HOME adjusted for my box: WINE="/usr/bin/wine", BUGS="/usr/local/bin/WinBugs14/winbugs.exe" data(pumps) pumps.data <- list(t = pumps$t, x = pumps$x, N = nrow(pumps)) pumps.model <- file.path(.path.package("rbugs"), "bugs/model",

Re: [R] Matched pairs with two data frames

2008-04-20 Thread Udo
David, tkanks für your comment, the code and the link. You are right: "arbitrary" is a better word than "exact" pair matching. I took the term "one-to-one exact matching" from the paper "MatchIt: Nonparametric Preprocessing for Parametric Causal Inference" (p. 6): http://gking.harvard.edu/matchit

Re: [R] Equivalent of intervals() in lmer

2008-04-20 Thread Dieter Menne
kedar nadkarni gmail.com> writes: > I have been trying to obtain confidence intervals for the fit after having > used lmer by using intervals(), but this does not work. intervals() is > associated with lme but not with lmer(). What is the equivalent for > intervals() in lmer()? ci in Gregory

Re: [R] Choice of notch size in R

2008-04-20 Thread Dieter Menne
Alex Reynolds u.washington.edu> writes: > Is there a way to modify the choice of notch size [1] in R's boxplot > routine from outlining a 5% significance region, to say 1% or lower? Not directly from boxplot, because it is hardwired to indirectly call fivenum, not quantile. Check bxp instea

Re: [R] Choice of notch size in R

2008-04-20 Thread Peter Dalgaard
Alex Reynolds wrote: > Is there a way to modify the choice of notch size [1] in R's boxplot > routine from outlining a 5% significance region, to say 1% or lower? > Not easily. If you look inside boxplots.stats you'll find the hardcoded constant 1.58, and the documentation has the following t

Re: [R] Stepwise logistic regression....take too long...

2008-04-20 Thread Prof Brian Ripley
On Sun, 20 Apr 2008, Marko Milicic wrote: > Dear R helpers, > > I'm trying to build logistic regression model large dataset 360 factors and > 850 observations. All 360 factors are known to be good predictors of outcome > variable but I have to find best model with maximum 10 factors. I tried to >

Re: [R] Matched pairs with two data frames

2008-04-20 Thread ukoenig
Thank´s a lot, Patrick! That´s what I was looking for... Zitat von Patrick Connolly <[EMAIL PROTECTED]>: > On Wed, 16-Apr-2008 at 11:58AM +0200, Udo wrote: > > > |> I only "need" line 1, 6 and 9. To show this, > |> I added "needed" by hand. > |> > |>age school out1 out2 needed > |> 1

Re: [R] Re ad From EXCEL

2008-04-20 Thread Petr PIKAL
Hi there is also a direct copy option In Excel select a portion of data you want to copy, preferably with header and press Ctrl-C Open R issue read.delim("clipboard") For inverse transfer see ?write Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 20.04.2008 17:51:26: > > Than

Re: [R] representing binary data for Genetic Algorithm in R

2008-04-20 Thread esmail bonakdarian
Hello! > Dear Esmail, > > you really have to have a look at some introduction to R (e.g. > http://cran.r-project.org/doc/manuals/R-intro.pdf), but see the "Manual" > section in R website (http://www.r-project.org/). That would answer many > of your questions. point well taken, I am a bit

[R] How to do survival analysis with time-related IVs?

2008-04-20 Thread Tianxu
Hello folks, I am wondering how to do survival analysis with time-related IVs in R. For example, > > If we have time-related variables, such as the Overall Condition of 1990, 1991 etc., how can we include these variables in coxph model? > > > > If we can not use coxph model, do we need

Re: [R] Scaling in predict.prcomp

2008-04-20 Thread Gad Abraham
Prof Brian Ripley wrote: > On Sun, 20 Apr 2008, Gad Abraham wrote: > >> Hi, >> >> Say x.train is a matrix of covariates that I want to do PCA on, so I can >> do regression on its principal components, and x.test is a test set of >> the same covariates on which I want to evaluate the regression fit

[R] Choice of notch size in R

2008-04-20 Thread Alex Reynolds
Is there a way to modify the choice of notch size [1] in R's boxplot routine from outlining a 5% significance region, to say 1% or lower? Thanks, Alex [1] McGill, Tukey, and Larsen. "Variations of Box Plots", The American Statistician, Vol. 32, No. 1, 12-16. _

[R] Reg. consensus ranking

2008-04-20 Thread Mallika Veeramalai
Dear All, I have a list of models(1000) which have variable scores from 20 different method. I would like to rank models using consensus approach based on high scores from different methods.Is there any function available in R for this purpose? I will appreciate any pointers in this regard.

Re: [R] help me to debug this part of code?

2008-04-20 Thread francogrex
jinjin wrote: > > I am trying to solve the integration equation, for different values of K > from 4 to 25, the integration is with respect to u, > Here is the equation:gamma(k/2) / ( sqrt(k-1)*gamma((k-1)/2) ) * > integrate(f= (1+u^2/k-1)^(-k/2), lower=0, upper= sqrt(a^2*k/(k+1-a^2)) ) = >

[R] Stepwise logistic regression....take too long...

2008-04-20 Thread Marko Milicic
Dear R helpers, I'm trying to build logistic regression model large dataset 360 factors and 850 observations. All 360 factors are known to be good predictors of outcome variable but I have to find best model with maximum 10 factors. I tried to fit full model and use stepAIC function to get best mo

Re: [R] How to read last (incomplete) line from gzfile()?

2008-04-20 Thread Stephen Eglen
Prof Brian Ripley writes: > I realize I didn't give a solution: > > scan(con, "", sep="\n") > Thanks for this (and for correcting the help page); this works. I also found a workaround using read.table which also allows gzfile connections with an incomplete last line. Stephen _

[R] Attempting to sync x-axis labels with grid lines in lattice bwplot

2008-04-20 Thread Mark Coletti
I have created a lattice bwplot that suffers from axis label overplotting. The box plot contains grid lines, and I thought that only plotting the labels for corresponding vertical grid lines would not only cure the overplotting but also be more aesthetically pleasing. Unfortunately hours of porin

Re: [R] How to insert a vector or matrix into an existing matrix

2008-04-20 Thread David Winsemius
Gabor Csardi <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Hmm, my understanding is different, > > m <- matrix(sample(10*10), ncol=10) > m2 <- rbind( m[1:5,], 1:10, m[6:10,] ) > m3 <- cbind( m[,1:8], 1:10, m[,9:10] ) I read the question the same way and, in response to the part of the

Re: [R] Problem with object inside a function

2008-04-20 Thread Duncan Murdoch
On 20/04/2008 3:04 PM, Ronaldo Reis Junior wrote: > Em Dom 20 Abr 2008, Duncan Murdoch escreveu: >> On 20/04/2008 12:32 PM, Ronaldo Reis Junior wrote: >>> Em Dom 20 Abr 2008, Duncan Murdoch escreveu: On 20/04/2008 9:40 AM, Ronaldo Reis Junior wrote: > Hi all, > > I have a problem w

Re: [R] How to read last (incomplete) line from gzfile()?

2008-04-20 Thread Prof Brian Ripley
I realize I didn't give a solution: scan(con, "", sep="\n") should do it. On Sun, 20 Apr 2008, Prof Brian Ripley wrote: > On Sun, 20 Apr 2008, Stephen Eglen wrote: > >> Hi, >> >> I have some text files that do not have trailing \n on the last >> (incomplete) line; how do I read in the last lin

[R] Equivalent of intervals() in lmer

2008-04-20 Thread kedar nadkarni
Hi all, I have been trying to obtain confidence intervals for the fit after having used lmer by using intervals(), but this does not work. intervals() is associated with lme but not with lmer(). What is the equivalent for intervals() in lmer()? I could not get this information from the documentat

Re: [R] How to read last (incomplete) line from gzfile()?

2008-04-20 Thread Prof Brian Ripley
On Sun, 20 Apr 2008, Stephen Eglen wrote: > Hi, > > I have some text files that do not have trailing \n on the last > (incomplete) line; how do I read in the last line? > > e.g. here is a test case: [linux + R version 2.6.1 (2007-11-26) ] > > > z <- gzfile("short.gz", open="w") > cat("7\n5\n3", fi

[R] How to read last (incomplete) line from gzfile()?

2008-04-20 Thread Stephen Eglen
Hi, I have some text files that do not have trailing \n on the last (incomplete) line; how do I read in the last line? e.g. here is a test case: [linux + R version 2.6.1 (2007-11-26) ] z <- gzfile("short.gz", open="w") cat("7\n5\n3", file=z) close(z) z <- gzfile('short.gz') readLines(z) [1] "

Re: [R] Problem with object inside a function

2008-04-20 Thread Duncan Murdoch
On 20/04/2008 12:32 PM, Ronaldo Reis Junior wrote: > Em Dom 20 Abr 2008, Duncan Murdoch escreveu: >> On 20/04/2008 9:40 AM, Ronaldo Reis Junior wrote: >>> Hi all, >>> >>> I have a problem with an object inside a formula in a function that I >>> make. >>> >>> I create an object named qvartemp. This

Re: [R] Problem with object inside a function

2008-04-20 Thread Ronaldo Reis Junior
Em Dom 20 Abr 2008, Duncan Murdoch escreveu: > On 20/04/2008 9:40 AM, Ronaldo Reis Junior wrote: > > Hi all, > > > > I have a problem with an object inside a formula in a function that I > > make. > > > > I create an object named qvartemp. This object is OK, look the levels: > >> print(levels(qvart

Re: [R] representing binary data for Genetic Algorithm in R

2008-04-20 Thread Thibaut Jombart
Dear Esmail, you really have to have a look at some introduction to R (e.g. http://cran.r-project.org/doc/manuals/R-intro.pdf), but see the "Manual" section in R website (http://www.r-project.org/). That would answer many of your questions. >Hello all, > >I am trying to implement a simple Gene

Re: [R] Scaling in predict.prcomp

2008-04-20 Thread Prof Brian Ripley
On Sun, 20 Apr 2008, Gad Abraham wrote: > Hi, > > Say x.train is a matrix of covariates that I want to do PCA on, so I can > do regression on its principal components, and x.test is a test set of > the same covariates on which I want to evaluate the regression fit. I > would like the covariates to

Re: [R] Re ad From EXCEL

2008-04-20 Thread ermimi
Thank you Erich for you information, I will continue investigating about as read data from excel. Erich Neuwirth wrote: > > To transfer data from Excel to R you have a least 3 options. > RODBC is platform-independent. You can use it to read Excel files > on any platform where you have an ODBC dr

Re: [R] Problem with object inside a function

2008-04-20 Thread Duncan Murdoch
On 20/04/2008 9:40 AM, Ronaldo Reis Junior wrote: > Hi all, > > I have a problem with an object inside a formula in a function that I make. > > I create an object named qvartemp. This object is OK, look the levels: > >> print(levels(qvartemp)) > [1] "baixomedio" "alto" > > Now I create a new ob

Re: [R] Legend Clipping

2008-04-20 Thread Beck, Kenneth (STP)
Jim, Thanks for the tip, this did the trick. I knew it would be simple, too much documentation, too little time! -Original Message- From: Jim Lemon [mailto:[EMAIL PROTECTED] Sent: Sunday, April 20, 2008 5:20 AM To: Beck, Kenneth (STP) Cc: r-help@r-project.org Subject: Re: [R] Legend Clip

Re: [R] Problem with object inside a function

2008-04-20 Thread Ronaldo Reis Junior
Em Dom 20 Abr 2008, Ronaldo Reis Junior escreveu: > Hi all, > > I have a problem with an object inside a formula in a function that I make. > > I create an object named qvartemp. This object is OK, look the levels: > > print(levels(qvartemp)) > > [1] "baixomedio" "alto" > > Now I create a new objec

[R] representing binary data for Genetic Algorithm in R

2008-04-20 Thread esmail bonakdarian
Hello all, I am trying to implement a simple Genetic Algorithm. I am doing this in R since I want access to the statistical functions (eg lm) it provides. I'm not new to programming, or GAs, but I am totally new to R (the package and the language), and I am hoping someone could help with these qu

Re: [R] How to insert a vector or matrix into an existing matrix

2008-04-20 Thread Gabor Csardi
Hmm, my understanding is different, m <- matrix(sample(10*10), ncol=10) m2 <- rbind( m[1:5,], 1:10, m[6:10,] ) m3 <- cbind( m[,1:8], 1:10, m[,9:10] ) G. On Sun, Apr 20, 2008 at 10:21:47AM -0300, Henrique Dallazuanna wrote: > If I understand: > > m <- matrix(sample(10*10), ncol=10) > m[5:6, 8:9]

[R] Problem with object inside a function

2008-04-20 Thread Ronaldo Reis Junior
Hi all, I have a problem with an object inside a formula in a function that I make. I create an object named qvartemp. This object is OK, look the levels: > print(levels(qvartemp)) [1] "baixomedio" "alto" Now I create a new object with a new formula: > new.form <- as.formula(gsub(qvar,"qvarte

Re: [R] How to insert a vector or matrix into an existing matrix

2008-04-20 Thread Henrique Dallazuanna
If I understand: m <- matrix(sample(10*10), ncol=10) m[5:6, 8:9] <- 1:4 On 4/18/08, Ng Stanley <[EMAIL PROTECTED]> wrote: > Hi, > > Is there any functions to insert a vector or matrix into an existing matrix > say between row 5 and 6 or column 8 and 9, without creating a temporary > matrix ? >

Re: [R] R question for Stata users

2008-04-20 Thread Frank E Harrell Jr
Joe Trubisz wrote: > Hi... > > In Stata, there is the ability to display scatter plots with data > points at the same (x,y) > location, using the 'jitter' command of the twoway scatter stata > command. > > Anyone know of a way that I can do the equivalent thing in R? > > For non-Stata reader

Re: [R] Legend Clipping

2008-04-20 Thread Jim Lemon
Beck, Kenneth (STP) wrote: > ... > legend(0.5,0.5, legend = c("CPX","Home"), bty="n", > fill=c("blue","red"),lwd=1, cex=1, xjust=0.5, yjust=0.4); > Hi Kenneth, Try this: par(xpd=TRUE) legend(0.5,0.5, legend = c("CPX","Home"), bty="n", fill=c("blue","red"),lwd=1, cex=1, xjust=0.5, yjust=0.4); par

Re: [R] rgl snapshot

2008-04-20 Thread Duncan Murdoch
On 20/04/2008 12:33 AM, Mike Ryckman wrote: > Hello everyone, > > I know I can save a snapshot an rgl device, but currently it only appears to > do png format. Is there some way of exporting a high-quality picture more > fit for publication? There's also rgl.postscript. It uses the gl2ps libra

[R] PCA / PLS for serially correlated samples

2008-04-20 Thread steven wilson
Dear list members; Does anyone know if there is an R package that can perform PCA or PLS regression accounting for serial correlation (of the samples)? Thanks for any hint Steve __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Re ad From EXCEL

2008-04-20 Thread Erich Neuwirth
To transfer data from Excel to R you have a least 3 options. RODBC is platform-independent. You can use it to read Excel files on any platform where you have an ODBC driver for Excel installed. xlsReadWrite is available only on Windows. It has a function read.xls which reads data from Excel worksh

Re: [R] Feature selection

2008-04-20 Thread Ingmar Visser
leaps or regsubsets in the leaps package does subset regression which seems to be what you're looking for. hth, Ingmar On Apr 19, 2008, at 11:51 PM, Computer- programmer wrote: > > Dear R helpers, >I'm trying to fit a model for prediction, but I have 18 > variables to choose from. So, my