Description Usage Arguments Details Value Note Author(s) References See Also Examples
~~ A concise (1-5 lines) description of what the function does. ~~
1 |
par |
~~Describe |
lb |
~~Describe |
ub |
~~Describe |
cons |
~~Describe |
x |
~~Describe |
y |
~~Describe |
keep |
~~Describe |
np |
~~Describe |
ex |
~~Describe |
~~ If necessary, more details than the description above ~~
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
...
~~further notes~~
~Make other sections like Warning with Warning .... ~
~~who you are~~
~put references to the literature/web site here ~
~~objects to See Also as help
, ~~~
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function(par,lb=0,ub=1,cons=rep.int(1,4),x,y=NULL,keep=1:2,np=2,ex=exg){
if(max(par<=lb)!=0|max(par>=ub)!=0){return(NA);}
par1<-par2<-rep.int(NA,4); par1[keep]<-par2[keep]<-par[1:np];
par2[keep][cons[keep]>0]<-par[(np+1):length(par)];
env1<-list(a=par1[1],b=par1[2],c=par1[3],s=par1[4],x=x);
env2<-list(a=par2[1],b=par2[2],c=par2[3],s=par2[4],x=y);
out<-sum(eval(ex,envir=env1))+sum(eval(ex,envir=env2));
if(!is.na(out) & is.finite(out) & out < -50){return(out);}else{return(NA);}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.