[R] looking for a more efficient R code.

2006-06-26 Thread Taka Matzmoto
=1) plot(X, sum of the four linear functions) I started with a function for summing summing - function(a,b) {temp -0; for (i in 1:length(a)) temp - temp + a[i]*X+b[i] } plot(X, summing(a,b)) I am a R beginner. I am looking for a more efficient R code. Any help or advice will be appreciated

Re: [R] looking for a more efficient R code.

2006-06-26 Thread Daniel Nordlund
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Taka Matzmoto Sent: Monday, June 26, 2006 5:21 PM To: r-help@stat.math.ethz.ch Subject: [R] looking for a more efficient R code. Dear R-users I have four simple linear models, which are all

Re: [R] looking for a more efficient R code.

2006-06-26 Thread jim holtman
- function(a,b) {temp -0; for (i in 1:length(a)) temp - temp + a[i]*X+b[i] } plot(X, summing(a,b)) I am a R beginner. I am looking for a more efficient R code. Any help or advice will be appreciated. Taka, __ R-help@stat.math.ethz.ch mailing list

Re: [R] looking for a more efficient R code.

2006-06-26 Thread Gardar Johannesson
started with a function for summing summing - function(a,b) {temp -0; for (i in 1:length(a)) temp - temp + a[i]*X+b[i] } plot(X, summing(a,b)) I am a R beginner. I am looking for a more efficient R code. Any help or advice will be appreciated. Taka