Description Usage Arguments Author(s) References Examples
A function to display a dialog box with simulation parameters.
1 | ViewParameters(tkl, tkr)
|
tkl |
An instance of tkcombobox |
tkr |
An instance of tkradiobutton |
Claudia Martinez-Araneda <cmartinez@ucsc.cl>
Dalgaard's Peter (2002) Rnews: The Newsletter of the R Project, Vol. 3.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | ViewParameters <- function(tkl,tkr){
rb<- tclvalue(tkr)
ll<- as.numeric(tclvalue(tcl(tkl,"getvalue")))
msg<-paste("")
if (rb == 1) #all outer weights equal
{
if (as.integer(ll)==0)
{
msg<-paste(msg,"path.coef <- c(0.5,0.4,0.3,0,0.3,0,0.3,0,0)\n")
msg<-paste(msg,"wei.ex <- matrix (c(0.63,0.63,\n\t\t
0.63,0.63,\n\t\t
0.63,0.63),3,2,byrow=TRUE)\n")
msg<-paste(msg,"wei.en <- matrix(c(0.63,0.63),1,2,byrow=TRUE),3,2,byrow=TRUE)")
}
if (as.integer(ll)==1)
{
msg<-paste(msg,"path. coef <- c(0.5,0.4,0.3,0,0.3,0,0.3,0,0)\n")
msg<-paste(msg,"wei.ex <- matrix (c(0.42,0.42,0.42,0.42,\n\t\t
0.42,0.42,0.42,0.42,\n\t\t
0.42,0.42,0.42,0.42),3,4,byrow=TRUE)\n")
msg<-paste(msg,"wei.en <- matrix(c(0.42,0.42,0.42,0.42),1,4,byrow=TRUE)\n")
}
if (as.integer(ll)==2)
{
msg<-paste(msg,"path. coef <- c(0.5,0.4,0.3,0,0.3,0,0.3,0,0)\n")
msg<-paste(msg,"wei.ex <- matrix (c(0.35,0.35,0.35,0.35,0.35,0.35,\n\t\t
0.35,0.35,0.35,0.35,0.35,0.35,\n\t\t
0.35,0.35,0.35,0.35,0.35,0.35),
3,6,byrow=TRUE),3,2,byrow=TRUE)\n")
msg<-paste(msg,"wei.en <- matrix(c(0.35,0.35,0.35,0.35,0.35,0.35),
1,6,byrow=TRUE)")
}
if (as.integer(ll)==3)
{
msg<-paste(msg,"path. coef <- c(0.5,0.4,0.3,0,0.3,0,0.3,0,0)\n")
msg<-paste(msg,"wei.ex <- matrix (c(0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,\n\t\t
0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,\n\t\t
0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3),
3,8,byrow=TRUE)\n")
msg<-paste(msg,"wei.en <- matrix(c(0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3),
1,8,byrow=TRUE)")
}
}else{#all outer weights different
if (as.integer(ll)==0)
{
msg<-paste(msg,"path.coef <- c(0.5,0.4,0.3,0,0.3,0,0.3,0,0)\n")
msg<-paste(msg,"wei.ex <- matrix(c(0.8,0.4,\n\t\t
0.4,0.8,\n\t\t0.1,0.9),3,2,byrow=TRUE)\n")
msg<-paste(msg,"wei.en <- matrix(c(0.4,0.8),1,2,byrow=TRUE)")
}
if (as.integer(ll)==1)
{
msg<-paste(msg,"path. coef <- c(0.5,0.4,0.3,0,0.3,0,0.3,0,0)\n")
msg<-paste(msg,"wei.ex <- matrix(c(0.2,0.3,0.5,0.7\n\t\t
0.2,0.4,0.6,0.5\n\t\t
0.3,0.5,0.7,0.2),3,4,byrow=TRUE)\n")
msg<-paste(msg,"wei.en <- matrix(c(0.2,0.3,0.5,0.5),1,4,byrow=TRUE)\n")
}
if (as.integer(ll)==2)
{
msg<-paste(msg,"path. coef <- c(0.5,0.4,0.3,0,0.3,0,0.3,0,0)\n")
msg<-paste(msg,"wei.ex <- matrix(c(0.5,0.3,0.4,0.3,0.5,0.1,\n\t\t
0.2,0.4,0.6,0.4,0.2,0.3,\n\t\t
0.3,0.6,0.2,0.3,0.4,0.2),3,6,byrow=TRUE)\n")
msg<-paste(msg,"wei.en <- matrix(c(0.5,0.3,0.4,0.3,0.5,0.1),1,6,byrow=TRUE)")
}
if (as.integer(ll)==3) {
msg<-paste(msg,"path. coef <- c(0.5,0.4,0.3,0,0.3,0,0.3,0,0)\n")
msg<-paste(msg,"wei.ex <- matrix(c(0.3,0.3,0.4,0.3,0.4,0.3,0.2,0.3,\n\t\t
0.3,0.3,0.4,0.3,0.2,0.3,0.4,0.2,\n\t\t
0.4,0.5,0.4,0.3,0.2,0.1,0.3,0.2),
3,8,byrow=TRUE)\n")
msg<-paste(msg,"wei.en <- matrix(c(0.3,0.3,0.4,0.3,0.4,0.3,0.2,0.3),
1,8,byrow=TRUE)")
}
}
tkmessageBox(title="Fixed Parameters", message=paste(msg, "\n Distribution = Normal"),
icon="info", type="ok")
}#End ViewParameters
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.