search for: foo_reg

Displaying 2 results from an estimated 2 matches for "foo_reg".

2011 Feb 25
1
speed up process
Dear users, I have a double for loop that does exactly what I want, but is quite slow. It is not so much with this simplified example, but IRL it is slow. Can anyone help me improve it? The data and code for foo_reg() are available at the end of the email; I preferred going directly into the problematic part. Here is the code (I tried to simplify it but I cannot do it too much or else it wouldn't represent my problem). It might also look too complex for what it is intended to do, but my colleagues who a...
2011 Feb 28
0
Fwd: Re: speed up process
...uot;data.frame") mydata2<- mydata1[!(mydata1$species %in% c("thgel","alsen")),] mydata3<- mydata1[!(mydata1$species %in% c("thgel","alsen","poabe")),] mydata_list<- list(mydata1=mydata1, mydata2=mydata2, mydata3=mydata3) library(WRS) foo_reg<- function(dat, xvar, yvar, mycol, pos, name.dat){ tsts<- tstsreg(dat[[xvar]], dat[[yvar]]) tsts_inter<- signif(tsts$coef[1], digits=3) tsts_slope<- signif(tsts$coef[2], digits=3) abline(tsts$coef, lty=1, col=mycol) legend(x=pos, legend=c(paste("TSTS ",name.dat,&quot...