Thanks to all for educating me about procedures and argument. Those were
very helpful!!
On 2020/9/21 上午 12:26, Bert Gunter wrote:
> Argument passing is fundamental, even more so when you write your own
> functions, which any half-serious R user will want to do. What has
> heretofore been discus
Argument passing is fundamental, even more so when you write your own
functions, which any half-serious R user will want to do. What has
heretofore been discussed in this thread is not the whole story (e.g. there
are ... arguments and functions as binary operators, among other things).
See section
Hi Steven: Rui's detailed explanation was great. The way I think of it is,
if you don't
want to send the variables in with the same order as the formal
arguments, then you
better name them as you send them in.
On Sun, Sep 20, 2020 at 7:23 AM Steven Yen wrote:
> Thanks. So, to be safe, al
Thanks. So, to be safe, always a good idea to give the argument, e.g.,
q=1.96, log.p=FALSE, skipping mean=0 and sd=1 if not needed. Thanks.
pnorm(q=1.96, log.p = FALSE)
On 2020/9/20 下午 06:36, Rui Barradas wrote:
> Hello,
>
> You are making a confusion between
>
> 1. the formal argument log.p
> 2
Hello,
You are making a confusion between
1. the formal argument log.p
2. the variable log.p
In the function body, log.p is a variable that exists in the function's
frame, not the formal argument of pnorm.
The first and the 3rd calls that follow output the same value.
try(x = 1.2, log.p = TR
Can someone tell me a proper call to a procedure, in this case, pnorm.
In what follows, I had expected a = b, but they are not equal. What are
wrong with first call and second call? Thank you!
try<-function(x,log.p=FALSE){
a<-pnorm(x,log.p) # first call
b<-pnorm(x,log.p=log.p) # second ca
6 matches
Mail list logo