Commit e6b1659d authored by Yong Liu's avatar Yong Liu

fix spelling

parent 18fda65b
......@@ -5822,7 +5822,7 @@ compareDataExport <- function(comparedScript, len, ...){
gseparator(container=p1_windowGroup)
nm2_windowButtonGroup = ggroup(container=p1_windowGroup)
addSpring(nm2_windowButtonGroup)
gbutton("Caculate", container=nm2_windowButtonGroup,
gbutton("Calculate", container=nm2_windowButtonGroup,
handler=function(h,...) {
if( (length(selTab[]) != 1 | any(is.na(selTab[]))) || (length(selTab1[])<1 | any(is.na(selTab1[])))) {
gmessage("You need to select one depdendent variable and at least one independent variable!", title="Information", icon="info", parent=lrDialog)
......@@ -5833,7 +5833,7 @@ compareDataExport <- function(comparedScript, len, ...){
curr_lm = lm(formula = as.formula(form), data =data)
orig_R2 = summary(orig_lm)$r.squared
curr_R2 = summary(curr_lm)$r.squared
svalue(outputlabel) <- paste("The goodness of fit ratio is:\norig_R2 : curr_R2 = ", round(orig_R2/curr_R2,2), ":1", sep="")}
svalue(outputlabel) <- paste("<span weight=\"bold\" size=\"medium\">The goodness of fit ratio is:</span>\norig_R2 : curr_R2 = ", round(orig_R2/curr_R2,2), " : 1", sep="")}
,
error=function(e){
svalue(outputlabel) <- paste("please choose other dependent variables. error:\n", e, "")
......@@ -5843,13 +5843,13 @@ compareDataExport <- function(comparedScript, len, ...){
gbutton("Close ", container=nm2_windowButtonGroup, handler=function(h,...) { dispose(lrDialog) })
gseparator(container=p1_windowGroup)
outputGroup = ggroup(container=p1_windowGroup, expand=TRUE)
outputlabel = glabel("", container=outputGroup)
outputlabel = glabel("", container=outputGroup, markup=TRUE)
}
}
spearmanTest <- function(sdcObject, step, ...) {
if(existd("sdcObject") == FALSE){
gmessage("There is no dataset loaded for Spearman Test!", "No Dataset!",icon="warning")
if(existd("sdcObject") == FALSE || length(ActiveSdcObject()@numVars) == 0) {
gmessage("There is no dataset loaded or no numerical variable for Spearman Test!", "No Dataset!",icon="warning")
} else{
lrDialog <- gwindow("Test for Association", parent=window, width=600, height=400)
......@@ -5936,7 +5936,7 @@ compareDataExport <- function(comparedScript, len, ...){
gseparator(container=p1_windowGroup)
nm2_windowButtonGroup = ggroup(container=p1_windowGroup)
addSpring(nm2_windowButtonGroup)
gbutton("Caculate", container=nm2_windowButtonGroup,
gbutton("Calculate", container=nm2_windowButtonGroup,
handler=function(h,...) {
if(length(selTab[]) != 1 | any(is.na(selTab[]))) {
gmessage("You have to select only one variable!", title="Information", icon="info", parent=lrDialog)
......@@ -5944,7 +5944,7 @@ compareDataExport <- function(comparedScript, len, ...){
tryCatch({
cor.S = cor.test(sdcObject@origData[,selTab[]], data[,selTab[]], method = svalue(methodSel))
rho= cor.S$estimate
svalue(outputlabel) <- paste("statistic=", cor.S$statistic, "\n","p=", cor.S$p.value, "\n", c("The cor is:", "The tau is:", "The rho is:")[grep(svalue(methodSel), c("pearson", "kendall", "spearman"))], rho, sep="")}
svalue(outputlabel) <- paste("<span weight=\"bold\" size=\"medium\">Test for association between current data and original data is:</span>","\nstatistic = ", cor.S$statistic, "\n","p = ", cor.S$p.value, "\n", c("The cor is : ", "The tau is:", "The rho is:")[grep(svalue(methodSel), c("pearson", "kendall", "spearman"))], rho, sep="")}
,
error=function(e){
svalue(outputlabel) <- paste("error:\n", e, "")
......@@ -5954,7 +5954,7 @@ compareDataExport <- function(comparedScript, len, ...){
gbutton("Close ", container=nm2_windowButtonGroup, handler=function(h,...) { dispose(lrDialog) })
gseparator(container=p1_windowGroup)
outputGroup = ggroup(container=p1_windowGroup, expand=TRUE)
outputlabel = glabel("", container=outputGroup)
outputlabel = glabel("", container=outputGroup, markup=TRUE)
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment