[R] Calling a procedure

Steven Yen @tyen @end|ng |rom ntu@edu@tw
Sun Sep 20 12:11:25 CEST 2020


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 call
list(a=a,b=b)
}

try(x=1.2,log.p=TRUE)$a
try(x=1.2,log.p=TRUE)$b



More information about the R-help mailing list