Re: [R] Editing a function

2010-02-28 Thread Dieter Menne
Ben Bolker wrote: > > (2) [long term] develop your code in a text editor (Tinn-R, emacs, > R source code editor accessible from the menu ...) and cut & paste > or source() as necessary. > Which I consider the only real solution. From many tutorials, one gets the impression that the purel

Re: [R] Editing a function

2010-02-27 Thread David Winsemius
On Feb 27, 2010, at 11:15 PM, Ben Bolker wrote: learner1978 gmail.com> writes: I am beginner to R. I have written a function: f= function(n=100,p=0.5){ X=rbinom(100,n,p) (mean(X)-n*P)/sqrt(n*p*(1-p)) } But I made a mistake by typing "P" instead of "p". How do I edit this function and im

Re: [R] Editing a function

2010-02-27 Thread Ben Bolker
learner1978 gmail.com> writes: > > > I am beginner to R. > > I have written a function: > > f= function(n=100,p=0.5){ > X=rbinom(100,n,p) > (mean(X)-n*P)/sqrt(n*p*(1-p)) > } > > But I made a mistake by typing "P" instead of "p". How do I edit this > function and improve my mistake. Two an

[R] Editing a function

2010-02-27 Thread learner1978
I am beginner to R. I have written a function: f= function(n=100,p=0.5){ X=rbinom(100,n,p) (mean(X)-n*P)/sqrt(n*p*(1-p)) } But I made a mistake by typing "P" instead of "p". How do I edit this function and improve my mistake. If I use edit(f) it opens an edit window where I am able to change th