Re: [R] function

From: <ctu_at_bigred.unl.edu>
Date: Sun, 01 Jun 2008 01:10:27 -0500

I wrote a function and I hope this helps b<-c(1,2,3,4);lambda<-c(0.3,0.4,0.5,0.6) m<-c(0.10,0.11,0.12,0.13);t<-c(7,8,9,10) N=4
Y<-matrix(data=NA,nrow=4, ncol=1)
for (i in 1:N){

     y=b*(1-exp(lambda*(t^m)))
     Y<-matrix(data=y, nrow=4, ncol=1)
     Y<-as.numeric(Y)
     sim<-data.frame(t, Y);plot(sim,xlab="age", ylab="response", col="red")
}

Chunhao

Quoting admin <dahman31_at_gmail.com>:

> hi i have to make my function
> y=b*(1-exp(lambda*(t^m))
> and my data are in excel file with names:
> Year /b/lambda/m
> and t is an age in another file calls pcb
> could u help me please to calculate all y for all years please
> i can make this step by step but i want an program for having all y and plot
> them in the same windows with legend could u help me please thank u
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 02 Jun 2008 - 05:03:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 02 Jun 2008 - 05:30:36 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive