Re: [R] problem in loop using windows executable

2014-10-29 Thread Jeff Newmiller
My suggestion is that you provide a reproducible example, as the Posting Guide requests. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

[R] problem in loop using windows executable

2014-10-29 Thread Pedro Segurado
Dear all, I am trying to develop a R script that basically uses a loop that includes 5 main steps: (1) it runs a windows executable file outside R that requires a set of *.txt files using the shell function (Note: I have tried system and system(shhQuote()) and the problem remains), (2) it imports

Re: [R] Problem in loop

2012-03-22 Thread Petr PIKAL
Hi > > Dear R users > I want change the entries in a matrix. I did a matrix > > > > A=0 1 5 > > .3 0 0 > > 0 .5 0 > > > > A1<-A > > > A2<-A*0.90 > A2 > > 12 3 > > 1 0.00 0.90 4.5 > > 2 0.27 0.00 0.0 > > 3 0.00 0.45 0.0 > > > > I need replace elements one by one

[R] Problem in loop

2012-03-20 Thread Fidel Maximiano Peña Ramos
Dear R users I want change the entries in a matrix. I did a matrix A=0 1 5 .3 0 0 0 .5 0 A1<-A A2<-A*0.90 A2 12 3 1 0.00 0.90 4.5 2 0.27 0.00 0.0 3 0.00 0.45 0.0 I need replace elements one by one in a loop I tried the following using package POPBIO, total <-ma

Re: [R] problem in loop

2009-09-02 Thread Scott Sherrill-Mix
I'm not too familiar with geese but it looks like the summary(fit)$correlation would be a dataframe. Maybe try getting the first (or whatever row you're interested in): ... corr_gee<-summary(fit)$correlation[1,1] se_corrgee<-summary(fit)$correlation[1,2] est[i,]<-c(corr_gee, se_corrgee) ... Scott

Re: [R] problem in loop

2009-09-02 Thread milton ruser
Hi there, and how about this: nsim<-500 est<-NULL for(i in 1:nsim){ fit <- geese(x ~ trt, id=subject, data=data_gee, family=binomial, corstr="exch", scale.fix=TRUE) . corr_gee<-summary(fit)$correlation[1] se_corrgee<-summary(fit)$correlation[2] est<-data.frame(rbind(est,cbind(corr_gee

[R] problem in loop

2009-09-02 Thread Seunghee Baek
Hi R-users, I have a problem for updating the estimates of correlation coefficient in simulation loop. I want to get the matrix of correlation coefficients (matrix, name: est) from geese by using loop(500 times) . I used following code to update, nsim<-500 est<-matrix(ncol=2, nrow=nsim) for(i in