Re: [R] DEfining and plotting the sum of two functions

2013-05-20 Thread arun
Hi, Try: H<-function(x) H1(x)+H2(x)  H1(2) [#1] 4 H2(2) #[1] 7  H(2) #[1] 11 A.K. - Original Message - From: Honest Chipoyera To: "r-help@r-project.org" Cc: Sent: Monday, May 20, 2013 8:09 AM Subject: [R] DEfining and plotting the sum of two functions I have two f

Re: [R] DEfining and plotting the sum of two functions

2013-05-20 Thread Berend Hasselman
On 20-05-2013, at 14:09, Honest Chipoyera wrote: > I have two functions H1(x) and H2(x) defined separately and I wish to create > a new function H(x) which is the sum of the two functions. I also need to > plot the three functions using the command "curve". With the aid of the > example prog

[R] DEfining and plotting the sum of two functions

2013-05-20 Thread Honest Chipoyera
I have two functions H1(x) and H2(x) defined separately and I wish to create a new function H(x) which is the sum of the two functions. I also need to plot the three functions using the command "curve". With the aid of the example program below, can you please explain how I can do that in R. H