From 7d0220f2387ad865b25a10185a91ad82b37c3b29 Mon Sep 17 00:00:00 2001 From: Bethan Clarke Date: Thu, 24 May 2018 12:00:44 +0100 Subject: [PATCH 1/9] correlations R-code --- instat/dlgColumnStats.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index 6dc20067e5b..0ec8afaecba 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -21,6 +21,7 @@ Public Class dlgColumnStats Private clsSummariesList As New RFunction Private bResetSubdialog As Boolean = False Private clsDefaultFunction As New RFunction + Private clsDataFrameFunction As New RFunction Public strDefaultDataFrame As String = "" Public strDefaultVariables() As String Public strDefaultFactors() As String @@ -102,16 +103,20 @@ Public Class dlgColumnStats clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False) clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False) + clsDataFrameFunction.SetRCommand("data.frame") + clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$calculate_summary") clsDefaultFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesList) 'Prevents an error if user chooses non count summaries with no columns to summarise clsDefaultFunction.AddParameter("silent", "TRUE") + clsDefaultFunction.AddParameter("x", clsRFunctionParameter:=clsDataFrameFunction) ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction) bResetSubdialog = True End Sub Public Sub SetRCodeForControls(bReset As Boolean) SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) + ucrReceiverSelectedVariables.AddAdditionalCodeParameterPair(clsDataFrameFunction, New RParameter("a", bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) End Sub Private Sub SetDefaultColumns() From 1e7b504c88ab233b4bb3b51ba94e2fab143edb5a Mon Sep 17 00:00:00 2001 From: Bethan Clarke Date: Fri, 25 May 2018 11:00:44 +0100 Subject: [PATCH 2/9] changes to sdgSummaries for correlations --- instat/dlgColumnStats.vb | 5 +- instat/sdgSummaries.Designer.vb | 43 +- instat/sdgSummaries.resx | 1767 +++++++++++-------------------- instat/sdgSummaries.vb | 14 + 4 files changed, 663 insertions(+), 1166 deletions(-) diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index 0ec8afaecba..980df883bbd 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -21,7 +21,6 @@ Public Class dlgColumnStats Private clsSummariesList As New RFunction Private bResetSubdialog As Boolean = False Private clsDefaultFunction As New RFunction - Private clsDataFrameFunction As New RFunction Public strDefaultDataFrame As String = "" Public strDefaultVariables() As String Public strDefaultFactors() As String @@ -103,20 +102,18 @@ Public Class dlgColumnStats clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False) clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False) - clsDataFrameFunction.SetRCommand("data.frame") + clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$calculate_summary") clsDefaultFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesList) 'Prevents an error if user chooses non count summaries with no columns to summarise clsDefaultFunction.AddParameter("silent", "TRUE") - clsDefaultFunction.AddParameter("x", clsRFunctionParameter:=clsDataFrameFunction) ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction) bResetSubdialog = True End Sub Public Sub SetRCodeForControls(bReset As Boolean) SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrReceiverSelectedVariables.AddAdditionalCodeParameterPair(clsDataFrameFunction, New RParameter("a", bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) End Sub Private Sub SetDefaultColumns() diff --git a/instat/sdgSummaries.Designer.vb b/instat/sdgSummaries.Designer.vb index 6d3098ce911..b4fe38de631 100644 --- a/instat/sdgSummaries.Designer.vb +++ b/instat/sdgSummaries.Designer.vb @@ -60,6 +60,9 @@ Partial Class sdgSummaries Me.grpNumeric = New System.Windows.Forms.GroupBox() Me.tbSummaries = New System.Windows.Forms.TabControl() Me.tbTwoVariables = New System.Windows.Forms.TabPage() + Me.grpMissing = New System.Windows.Forms.GroupBox() + Me.rdoPairwise = New System.Windows.Forms.RadioButton() + Me.rdoCompleteRows = New System.Windows.Forms.RadioButton() Me.grpRelationships = New System.Windows.Forms.GroupBox() Me.lblSecondVariable = New System.Windows.Forms.Label() Me.ucrChkn_distinct = New instat.ucrCheck() @@ -97,6 +100,7 @@ Partial Class sdgSummaries Me.ucrChkMc = New instat.ucrCheck() Me.ucrChkSkewness = New instat.ucrCheck() Me.ucrChkKurtosis = New instat.ucrCheck() + Me.ucrPnlMissing = New instat.UcrPanel() Me.ucrChkCovariance = New instat.ucrCheck() Me.ucrChkCorrelations = New instat.ucrCheck() Me.ucrSelectorSecondVariable = New instat.ucrSelectorByDataFrameAddRemove() @@ -119,6 +123,7 @@ Partial Class sdgSummaries Me.grpNumeric.SuspendLayout() Me.tbSummaries.SuspendLayout() Me.tbTwoVariables.SuspendLayout() + Me.grpMissing.SuspendLayout() Me.grpRelationships.SuspendLayout() Me.SuspendLayout() ' @@ -138,12 +143,12 @@ Partial Class sdgSummaries ' resources.ApplyResources(Me.rdoPercentage, "rdoPercentage") Me.rdoPercentage.Name = "rdoPercentage" - Me.rdoPercentage.TabStop = True Me.rdoPercentage.UseVisualStyleBackColor = True ' 'rdoNumber ' resources.ApplyResources(Me.rdoNumber, "rdoNumber") + Me.rdoNumber.Checked = True Me.rdoNumber.Name = "rdoNumber" Me.rdoNumber.TabStop = True Me.rdoNumber.UseVisualStyleBackColor = True @@ -303,6 +308,7 @@ Partial Class sdgSummaries ' 'tbTwoVariables ' + Me.tbTwoVariables.Controls.Add(Me.grpMissing) Me.tbTwoVariables.Controls.Add(Me.grpRelationships) Me.tbTwoVariables.Controls.Add(Me.lblSecondVariable) Me.tbTwoVariables.Controls.Add(Me.ucrSelectorSecondVariable) @@ -311,6 +317,29 @@ Partial Class sdgSummaries Me.tbTwoVariables.Name = "tbTwoVariables" Me.tbTwoVariables.UseVisualStyleBackColor = True ' + 'grpMissing + ' + Me.grpMissing.Controls.Add(Me.rdoPairwise) + Me.grpMissing.Controls.Add(Me.rdoCompleteRows) + Me.grpMissing.Controls.Add(Me.ucrPnlMissing) + resources.ApplyResources(Me.grpMissing, "grpMissing") + Me.grpMissing.Name = "grpMissing" + Me.grpMissing.TabStop = False + ' + 'rdoPairwise + ' + resources.ApplyResources(Me.rdoPairwise, "rdoPairwise") + Me.rdoPairwise.Name = "rdoPairwise" + Me.rdoPairwise.TabStop = True + Me.rdoPairwise.UseVisualStyleBackColor = True + ' + 'rdoCompleteRows + ' + resources.ApplyResources(Me.rdoCompleteRows, "rdoCompleteRows") + Me.rdoCompleteRows.Name = "rdoCompleteRows" + Me.rdoCompleteRows.TabStop = True + Me.rdoCompleteRows.UseVisualStyleBackColor = True + ' 'grpRelationships ' Me.grpRelationships.Controls.Add(Me.ucrChkCovariance) @@ -545,6 +574,11 @@ Partial Class sdgSummaries resources.ApplyResources(Me.ucrChkKurtosis, "ucrChkKurtosis") Me.ucrChkKurtosis.Name = "ucrChkKurtosis" ' + 'ucrPnlMissing + ' + resources.ApplyResources(Me.ucrPnlMissing, "ucrPnlMissing") + Me.ucrPnlMissing.Name = "ucrPnlMissing" + ' 'ucrChkCovariance ' Me.ucrChkCovariance.Checked = False @@ -559,6 +593,7 @@ Partial Class sdgSummaries ' 'ucrSelectorSecondVariable ' + Me.ucrSelectorSecondVariable.bDropUnusedFilterLevels = False Me.ucrSelectorSecondVariable.bShowHiddenColumns = False Me.ucrSelectorSecondVariable.bUseCurrentFilter = True resources.ApplyResources(Me.ucrSelectorSecondVariable, "ucrSelectorSecondVariable") @@ -628,6 +663,8 @@ Partial Class sdgSummaries Me.tbSummaries.ResumeLayout(False) Me.tbTwoVariables.ResumeLayout(False) Me.tbTwoVariables.PerformLayout() + Me.grpMissing.ResumeLayout(False) + Me.grpMissing.PerformLayout() Me.grpRelationships.ResumeLayout(False) Me.ResumeLayout(False) @@ -698,4 +735,8 @@ Partial Class sdgSummaries Friend WithEvents ucrChkLast As ucrCheck Friend WithEvents ucrChknth As ucrCheck Friend WithEvents ucrChkn_distinct As ucrCheck + Friend WithEvents grpMissing As GroupBox + Friend WithEvents rdoCompleteRows As RadioButton + Friend WithEvents ucrPnlMissing As UcrPanel + Friend WithEvents rdoPairwise As RadioButton End Class \ No newline at end of file diff --git a/instat/sdgSummaries.resx b/instat/sdgSummaries.resx index 1bd78e1d70d..c2ea0bc7bfe 100644 --- a/instat/sdgSummaries.resx +++ b/instat/sdgSummaries.resx @@ -117,114 +117,15 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - rdoPercentage - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbMissingOptions - - - 0 - - - rdoNumber - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbMissingOptions - - - 1 - - - lblPercentage - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbMissingOptions - - - 2 - - - lblNumber - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbMissingOptions - - - 3 - - - ucrNudPercentage - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbMissingOptions - - - 4 - - - ucrNudNumber - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbMissingOptions - - - 5 - - - - 4, 22 - - - - 3, 3, 3, 3 - - - 380, 422 - - - 4 - - - Missing Options - - - tbMissingOptions - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbSummaries - - - 3 - True + NoControl + 9, 46 @@ -339,104 +240,83 @@ 3 - - grpPosition - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbMore - - - 0 - - - grpProportionsPercentiles - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbMore + + 319, 66 - - 1 + + 50, 20 - - grpLocation + + 3 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ucrNudPercentage - - tbMore + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 2 + + tbMissingOptions - - grpScale + + 4 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 318, 66 - - tbMore + + 50, 20 - + 3 - - grpSkewness - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbMore - - - 4 - - - grpKurtosis + + ucrNudNumber - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMore + + tbMissingOptions - + 5 - + 4, 22 - + 3, 3, 3, 3 - + 380, 422 - - 1 + + 4 - - More + + Missing Options - - tbMore + + tbMissingOptions - + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tbSummaries - - 1 + + 3 + + + 295, 20 + + + 51, 20 + + + 13 ucrInputN @@ -450,6 +330,24 @@ 0 + + True + + + NoControl + + + 276, 24 + + + 16, 13 + + + 12 + + + n: + lblInputN @@ -462,6 +360,15 @@ 1 + + 16, 17 + + + 101, 20 + + + 10 + ucrChkFirst @@ -474,6 +381,15 @@ 2 + + 15, 43 + + + 101, 20 + + + 15 + ucrChkLast @@ -486,6 +402,15 @@ 3 + + 223, 22 + + + 41, 20 + + + 11 + ucrChknth @@ -522,35 +447,14 @@ 0 - - True - - - NoControl - - - 276, 24 - - - 16, 13 - - - 12 - - - n: - - - lblInputN - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 9, 41 - - grpPosition + + 75, 20 - - 1 + + 10 ucrChkProportion @@ -564,6 +468,15 @@ 0 + + 9, 67 + + + 67, 20 + + + 11 + ucrChkCount @@ -576,6 +489,15 @@ 1 + + 201, 52 + + + 101, 20 + + + 12 + ucrChkPercentage @@ -588,6 +510,15 @@ 2 + + 144, 52 + + + 51, 20 + + + 11 + ucrInputValue @@ -600,6 +531,18 @@ 3 + + + + + 87, 52 + + + 51, 25 + + + 10 + ucrInputComboTest @@ -612,6 +555,15 @@ 4 + + 86, 15 + + + 51, 20 + + + 0 + ucrInputPercentile @@ -624,6 +576,15 @@ 5 + + 9, 15 + + + 75, 20 + + + 9 + ucrChkPercentile @@ -660,6 +621,24 @@ 1 + + True + + + NoControl + + + 169, 23 + + + 91, 13 + + + 8 + + + Fraction Trimmed: + lblFractionTrimmed @@ -672,6 +651,15 @@ 0 + + 260, 19 + + + 50, 20 + + + 7 + ucrNudFraction @@ -684,6 +672,15 @@ 1 + + 9, 20 + + + 120, 20 + + + 6 + ucrChkTrimmedMean @@ -720,35 +717,14 @@ 2 - - True - - - NoControl - - - 169, 23 - - - 91, 13 - - - 8 - - - Fraction Trimmed: - - - lblFractionTrimmed - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 260, 24 - - grpLocation + + 76, 20 - - 0 + + 3 ucrChkQn @@ -762,6 +738,15 @@ 0 + + 260, 48 + + + 76, 20 + + + 4 + ucrChkSn @@ -774,6 +759,15 @@ 1 + + 9, 19 + + + 174, 20 + + + 0 + ucrChkCoefficientOfVariation @@ -786,6 +780,15 @@ 2 + + 9, 45 + + + 174, 20 + + + 1 + ucrChkMedianAbsoluteDeviation @@ -822,6 +825,15 @@ 3 + + 260, 19 + + + 76, 20 + + + 7 + ucrChkMc @@ -834,6 +846,15 @@ 0 + + 12, 19 + + + 174, 20 + + + 2 + ucrChkSkewness @@ -870,6 +891,15 @@ 4 + + 13, 16 + + + 120, 20 + + + 5 + ucrChkKurtosis @@ -906,80 +936,41 @@ 5 - - grpCommon + + 4, 22 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 3, 3, 3, 3 - - tbsum + + 380, 422 - - 0 + + 1 - - grpQuartiles + + More - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tbMore - - tbsum + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + tbSummaries + + 1 - - grpNotOrderedFactor - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbsum - - - 2 - - - grpNumeric - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbsum - - - 3 - - - 4, 22 - - - 3, 3, 3, 3 - - - 380, 422 - - - 0 - - - Summaries - - - tbsum - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 7, 75 - - tbSummaries + + 101, 20 - - 0 + + 16 ucrChkn_distinct @@ -993,6 +984,15 @@ 0 + + 232, 19 + + + 100, 20 + + + 2 + ucrChkNTotal @@ -1005,6 +1005,15 @@ 1 + + 232, 45 + + + 100, 20 + + + 3 + ucrChkMode @@ -1017,6 +1026,15 @@ 2 + + 7, 47 + + + 100, 20 + + + 1 + ucrChkNMissing @@ -1029,6 +1047,15 @@ 3 + + 7, 19 + + + 100, 20 + + + 0 + ucrChkNonMissing @@ -1065,6 +1092,15 @@ 0 + + 11, 19 + + + 100, 20 + + + 1 + ucrChkLowerQuartile @@ -1077,6 +1113,15 @@ 0 + + 235, 19 + + + 100, 20 + + + 0 + ucrChkUpperQuartile @@ -1113,6 +1158,15 @@ 1 + + 11, 45 + + + 100, 20 + + + 1 + ucrChkRange @@ -1125,6 +1179,15 @@ 0 + + 235, 19 + + + 100, 20 + + + 2 + ucrChkMaximum @@ -1137,6 +1200,15 @@ 1 + + 11, 19 + + + 100, 20 + + + 0 + ucrChkMinimum @@ -1173,6 +1245,15 @@ 2 + + 11, 71 + + + 100, 20 + + + 2 + ucrChkVariance @@ -1185,6 +1266,15 @@ 0 + + 235, 19 + + + 100, 20 + + + 3 + ucrChkMedian @@ -1197,6 +1287,15 @@ 1 + + 235, 47 + + + 122, 20 + + + 4 + ucrChkStdDev @@ -1209,6 +1308,15 @@ 2 + + 11, 19 + + + 100, 20 + + + 0 + ucrChkSum @@ -1221,6 +1329,15 @@ 3 + + 12, 45 + + + 100, 20 + + + 1 + ucrChkMean @@ -1257,89 +1374,239 @@ 3 - - ucrChkCovariance + + 4, 22 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 3, 3, 3, 3 - - grpRelationships + + 380, 422 - + 0 - - ucrChkCorrelations + + Summaries - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + tbsum - - grpRelationships + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + tbSummaries - - 6, 203 + + 0 - - 368, 55 + + True - - 3 + + NoControl - - Relationships + + 231, 19 - - grpRelationships + + 64, 17 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2 - - tbTwoVariables + + Pairwise - + + rdoPairwise + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMissing + + 0 - + True - + NoControl - - 237, 18 + + 13, 19 - - 69, 13 + + 116, 17 - + 1 - - 2nd Variable: + + Complete rows only - - lblSecondVariable + + rdoCompleteRows - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tbTwoVariables + + grpMissing - + 1 - - 10, 9 + + 6, 19 - - 0, 0, 0, 0 + + 338, 30 + + + 0 + + + ucrPnlMissing + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMissing + + + 2 + + + 6, 275 + + + 368, 55 + + + 4 + + + Missing + + + grpMissing + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbTwoVariables + + + 0 + + + 231, 19 + + + 101, 20 + + + 7 + + + ucrChkCovariance + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpRelationships + + + 0 + + + 13, 19 + + + 146, 20 + + + 16 + + + ucrChkCorrelations + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpRelationships + + + 1 + + + 6, 203 + + + 368, 55 + + + 3 + + + Relationships + + + grpRelationships + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbTwoVariables + + + 1 + + + True + + + NoControl + + + 237, 18 + + + 69, 13 + + + 1 + + + 2nd Variable: + + + lblSecondVariable + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbTwoVariables + + + 2 + + + 10, 9 + + + 0, 0, 0, 0 210, 180 @@ -1357,7 +1624,7 @@ tbTwoVariables - 2 + 3 True @@ -1426,7 +1693,7 @@ tbTwoVariables - 3 + 4 4, 22 @@ -1476,826 +1743,4 @@ 0 - - 7, 75 - - - 101, 20 - - - 16 - - - ucrChkn_distinct - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCommon - - - 0 - - - 232, 19 - - - 100, 20 - - - 2 - - - ucrChkNTotal - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCommon - - - 1 - - - 232, 45 - - - 100, 20 - - - 3 - - - ucrChkMode - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCommon - - - 2 - - - 7, 47 - - - 100, 20 - - - 1 - - - ucrChkNMissing - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCommon - - - 3 - - - 7, 19 - - - 100, 20 - - - 0 - - - ucrChkNonMissing - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCommon - - - 4 - - - 11, 19 - - - 100, 20 - - - 1 - - - ucrChkLowerQuartile - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpQuartiles - - - 0 - - - 235, 19 - - - 100, 20 - - - 0 - - - ucrChkUpperQuartile - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpQuartiles - - - 1 - - - 11, 45 - - - 100, 20 - - - 1 - - - ucrChkRange - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNotOrderedFactor - - - 0 - - - 235, 19 - - - 100, 20 - - - 2 - - - ucrChkMaximum - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNotOrderedFactor - - - 1 - - - 11, 19 - - - 100, 20 - - - 0 - - - ucrChkMinimum - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNotOrderedFactor - - - 2 - - - 11, 71 - - - 100, 20 - - - 2 - - - ucrChkVariance - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNumeric - - - 0 - - - 235, 19 - - - 100, 20 - - - 3 - - - ucrChkMedian - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNumeric - - - 1 - - - 235, 47 - - - 122, 20 - - - 4 - - - ucrChkStdDev - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNumeric - - - 2 - - - 11, 19 - - - 100, 20 - - - 0 - - - ucrChkSum - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNumeric - - - 3 - - - 12, 45 - - - 100, 20 - - - 1 - - - ucrChkMean - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNumeric - - - 4 - - - 295, 20 - - - 51, 20 - - - 13 - - - ucrInputN - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 0 - - - 16, 17 - - - 101, 20 - - - 10 - - - ucrChkFirst - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 2 - - - 15, 43 - - - 101, 20 - - - 15 - - - ucrChkLast - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 3 - - - 223, 22 - - - 41, 20 - - - 11 - - - ucrChknth - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 4 - - - 9, 41 - - - 75, 20 - - - 10 - - - ucrChkProportion - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 0 - - - 9, 67 - - - 67, 20 - - - 11 - - - ucrChkCount - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 1 - - - 201, 52 - - - 101, 20 - - - 12 - - - ucrChkPercentage - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 2 - - - 144, 52 - - - 51, 20 - - - 11 - - - ucrInputValue - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 3 - - - - - - 87, 52 - - - 51, 25 - - - 10 - - - ucrInputComboTest - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 4 - - - 86, 15 - - - 51, 20 - - - 0 - - - ucrInputPercentile - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 5 - - - 9, 15 - - - 75, 20 - - - 9 - - - ucrChkPercentile - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 6 - - - 260, 19 - - - 50, 20 - - - 7 - - - ucrNudFraction - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocation - - - 1 - - - 9, 20 - - - 120, 20 - - - 6 - - - ucrChkTrimmedMean - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocation - - - 2 - - - 260, 24 - - - 76, 20 - - - 3 - - - ucrChkQn - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpScale - - - 0 - - - 260, 48 - - - 76, 20 - - - 4 - - - ucrChkSn - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpScale - - - 1 - - - 9, 19 - - - 174, 20 - - - 0 - - - ucrChkCoefficientOfVariation - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpScale - - - 2 - - - 9, 45 - - - 174, 20 - - - 1 - - - ucrChkMedianAbsoluteDeviation - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpScale - - - 3 - - - 260, 19 - - - 76, 20 - - - 7 - - - ucrChkMc - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpSkewness - - - 0 - - - 12, 19 - - - 174, 20 - - - 2 - - - ucrChkSkewness - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpSkewness - - - 1 - - - 13, 16 - - - 120, 20 - - - 5 - - - ucrChkKurtosis - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpKurtosis - - - 0 - - - 231, 19 - - - 101, 20 - - - 7 - - - ucrChkCovariance - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpRelationships - - - 0 - - - 13, 19 - - - 146, 20 - - - 16 - - - ucrChkCorrelations - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpRelationships - - - 1 - - - 319, 66 - - - 50, 20 - - - 3 - - - ucrNudPercentage - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbMissingOptions - - - 4 - - - 318, 66 - - - 50, 20 - - - 3 - - - ucrNudNumber - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbMissingOptions - - - 5 - \ No newline at end of file diff --git a/instat/sdgSummaries.vb b/instat/sdgSummaries.vb index f7fca34343e..a093150f5f8 100644 --- a/instat/sdgSummaries.vb +++ b/instat/sdgSummaries.vb @@ -101,6 +101,10 @@ Public Class sdgSummaries ucrChkCovariance.SetParameter(New RParameter("summary_cov", 22), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_cov" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkCovariance.SetText("Covariance") + ucrPnlMissing.SetParameter(New RParameter("use", 5)) + ucrPnlMissing.AddRadioButton(rdoCompleteRows, Chr(34) & "complete.obs" & Chr(34)) + ucrPnlMissing.AddRadioButton(rdoPairwise, Chr(34) & "pairwise.complete.obs" & Chr(34)) + ucrReceiverSecondVariable.Selector = ucrSelectorSecondVariable ucrReceiverSecondVariable.SetMeAsReceiver() ucrReceiverSecondVariable.SetIncludedDataTypes({"numeric"}) @@ -245,6 +249,7 @@ Public Class sdgSummaries ucrChkLast.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) ucrChknth.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) ucrChkn_distinct.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrPnlMissing.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) If bReset Then tbSummaries.SelectedIndex = 0 @@ -285,4 +290,13 @@ Public Class sdgSummaries ' clsDefaultFunction.RemoveParameterByName("order_by") ' End If End Sub + + Private Sub ucrPnlMissing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlMissing.ControlValueChanged + If rdoPairwise.Checked Then + clsDefaultFunction.AddParameter("use", Chr(34) & "pairwise.complete.obs" & Chr(34)) + ElseIf rdoCompleteRows.Checked Then + clsDefaultFunction.AddParameter("use", Chr(34) & "complete.obs" & Chr(34)) + End If + End Sub + End Class \ No newline at end of file From ffa7a27e3cad2b7c4037cc74eba8842b01d1e22e Mon Sep 17 00:00:00 2001 From: Bethan Clarke Date: Fri, 25 May 2018 15:12:17 +0100 Subject: [PATCH 3/9] change made to proportion_calc function changes made to sdgSummaries Missing Options Tab included summary_trimmed_mean function and implented in sdgSummaries --- instat/sdgSummaries.Designer.vb | 609 +++++++++--------- instat/sdgSummaries.resx | 302 ++++----- instat/sdgSummaries.vb | 27 +- .../R/Backend_Components/summary_functions.R | 26 +- 4 files changed, 440 insertions(+), 524 deletions(-) diff --git a/instat/sdgSummaries.Designer.vb b/instat/sdgSummaries.Designer.vb index b4fe38de631..de9951f0164 100644 --- a/instat/sdgSummaries.Designer.vb +++ b/instat/sdgSummaries.Designer.vb @@ -40,74 +40,72 @@ Partial Class sdgSummaries Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(sdgSummaries)) Me.tbMissingOptions = New System.Windows.Forms.TabPage() - Me.rdoPercentage = New System.Windows.Forms.RadioButton() - Me.rdoNumber = New System.Windows.Forms.RadioButton() - Me.lblPercentage = New System.Windows.Forms.Label() - Me.lblNumber = New System.Windows.Forms.Label() Me.tbMore = New System.Windows.Forms.TabPage() Me.grpPosition = New System.Windows.Forms.GroupBox() + Me.ucrInputN = New instat.ucrInputTextBox() Me.lblInputN = New System.Windows.Forms.Label() + Me.ucrChkFirst = New instat.ucrCheck() + Me.ucrChkLast = New instat.ucrCheck() + Me.ucrChknth = New instat.ucrCheck() Me.grpProportionsPercentiles = New System.Windows.Forms.GroupBox() + Me.ucrChkProportion = New instat.ucrCheck() + Me.ucrChkCount = New instat.ucrCheck() + Me.ucrChkPercentage = New instat.ucrCheck() + Me.ucrInputValue = New instat.ucrInputTextBox() + Me.ucrInputComboTest = New instat.ucrInputComboBox() + Me.ucrInputPercentile = New instat.ucrInputTextBox() + Me.ucrChkPercentile = New instat.ucrCheck() Me.grpLocation = New System.Windows.Forms.GroupBox() Me.lblFractionTrimmed = New System.Windows.Forms.Label() + Me.ucrNudFraction = New instat.ucrNud() + Me.ucrChkTrimmedMean = New instat.ucrCheck() Me.grpScale = New System.Windows.Forms.GroupBox() + Me.ucrChkQn = New instat.ucrCheck() + Me.ucrChkSn = New instat.ucrCheck() + Me.ucrChkCoefficientOfVariation = New instat.ucrCheck() + Me.ucrChkMedianAbsoluteDeviation = New instat.ucrCheck() Me.grpSkewness = New System.Windows.Forms.GroupBox() + Me.ucrChkMc = New instat.ucrCheck() + Me.ucrChkSkewness = New instat.ucrCheck() Me.grpKurtosis = New System.Windows.Forms.GroupBox() + Me.ucrChkKurtosis = New instat.ucrCheck() Me.tbsum = New System.Windows.Forms.TabPage() Me.grpCommon = New System.Windows.Forms.GroupBox() - Me.grpQuartiles = New System.Windows.Forms.GroupBox() - Me.grpNotOrderedFactor = New System.Windows.Forms.GroupBox() - Me.grpNumeric = New System.Windows.Forms.GroupBox() - Me.tbSummaries = New System.Windows.Forms.TabControl() - Me.tbTwoVariables = New System.Windows.Forms.TabPage() - Me.grpMissing = New System.Windows.Forms.GroupBox() - Me.rdoPairwise = New System.Windows.Forms.RadioButton() - Me.rdoCompleteRows = New System.Windows.Forms.RadioButton() - Me.grpRelationships = New System.Windows.Forms.GroupBox() - Me.lblSecondVariable = New System.Windows.Forms.Label() Me.ucrChkn_distinct = New instat.ucrCheck() Me.ucrChkNTotal = New instat.ucrCheck() Me.ucrChkMode = New instat.ucrCheck() Me.ucrChkNMissing = New instat.ucrCheck() Me.ucrChkNonMissing = New instat.ucrCheck() + Me.grpQuartiles = New System.Windows.Forms.GroupBox() Me.ucrChkLowerQuartile = New instat.ucrCheck() Me.ucrChkUpperQuartile = New instat.ucrCheck() + Me.grpNotOrderedFactor = New System.Windows.Forms.GroupBox() Me.ucrChkRange = New instat.ucrCheck() Me.ucrChkMaximum = New instat.ucrCheck() Me.ucrChkMinimum = New instat.ucrCheck() + Me.grpNumeric = New System.Windows.Forms.GroupBox() Me.ucrChkVariance = New instat.ucrCheck() Me.ucrChkMedian = New instat.ucrCheck() Me.ucrChkStdDev = New instat.ucrCheck() Me.ucrChkSum = New instat.ucrCheck() Me.ucrChkMean = New instat.ucrCheck() - Me.ucrInputN = New instat.ucrInputTextBox() - Me.ucrChkFirst = New instat.ucrCheck() - Me.ucrChkLast = New instat.ucrCheck() - Me.ucrChknth = New instat.ucrCheck() - Me.ucrChkProportion = New instat.ucrCheck() - Me.ucrChkCount = New instat.ucrCheck() - Me.ucrChkPercentage = New instat.ucrCheck() - Me.ucrInputValue = New instat.ucrInputTextBox() - Me.ucrInputComboTest = New instat.ucrInputComboBox() - Me.ucrInputPercentile = New instat.ucrInputTextBox() - Me.ucrChkPercentile = New instat.ucrCheck() - Me.ucrNudFraction = New instat.ucrNud() - Me.ucrChkTrimmedMean = New instat.ucrCheck() - Me.ucrChkQn = New instat.ucrCheck() - Me.ucrChkSn = New instat.ucrCheck() - Me.ucrChkCoefficientOfVariation = New instat.ucrCheck() - Me.ucrChkMedianAbsoluteDeviation = New instat.ucrCheck() - Me.ucrChkMc = New instat.ucrCheck() - Me.ucrChkSkewness = New instat.ucrCheck() - Me.ucrChkKurtosis = New instat.ucrCheck() - Me.ucrPnlMissing = New instat.UcrPanel() + Me.tbSummaries = New System.Windows.Forms.TabControl() + Me.tbTwoVariables = New System.Windows.Forms.TabPage() + Me.grpRelationships = New System.Windows.Forms.GroupBox() Me.ucrChkCovariance = New instat.ucrCheck() Me.ucrChkCorrelations = New instat.ucrCheck() + Me.lblSecondVariable = New System.Windows.Forms.Label() Me.ucrSelectorSecondVariable = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverSecondVariable = New instat.ucrReceiverSingle() - Me.ucrNudPercentage = New instat.ucrNud() - Me.ucrNudNumber = New instat.ucrNud() Me.ucrButtonsSummaries = New instat.ucrButtonsSubdialogue() + Me.ucrChkIncludeMissingOpt = New instat.ucrCheck() + Me.ucrPnlMissingOptions = New instat.UcrPanel() + Me.rdoNumber = New System.Windows.Forms.RadioButton() + Me.rdoPercentage = New System.Windows.Forms.RadioButton() + Me.lblNumber = New System.Windows.Forms.Label() + Me.lblPercentage = New System.Windows.Forms.Label() + Me.ucrNudNumber = New instat.ucrNud() + Me.ucrNudPercentage = New instat.ucrNud() Me.tbMissingOptions.SuspendLayout() Me.tbMore.SuspendLayout() Me.grpPosition.SuspendLayout() @@ -123,46 +121,23 @@ Partial Class sdgSummaries Me.grpNumeric.SuspendLayout() Me.tbSummaries.SuspendLayout() Me.tbTwoVariables.SuspendLayout() - Me.grpMissing.SuspendLayout() Me.grpRelationships.SuspendLayout() Me.SuspendLayout() ' 'tbMissingOptions ' - Me.tbMissingOptions.Controls.Add(Me.rdoPercentage) - Me.tbMissingOptions.Controls.Add(Me.rdoNumber) - Me.tbMissingOptions.Controls.Add(Me.lblPercentage) - Me.tbMissingOptions.Controls.Add(Me.lblNumber) Me.tbMissingOptions.Controls.Add(Me.ucrNudPercentage) Me.tbMissingOptions.Controls.Add(Me.ucrNudNumber) + Me.tbMissingOptions.Controls.Add(Me.lblPercentage) + Me.tbMissingOptions.Controls.Add(Me.lblNumber) + Me.tbMissingOptions.Controls.Add(Me.rdoPercentage) + Me.tbMissingOptions.Controls.Add(Me.rdoNumber) + Me.tbMissingOptions.Controls.Add(Me.ucrPnlMissingOptions) + Me.tbMissingOptions.Controls.Add(Me.ucrChkIncludeMissingOpt) resources.ApplyResources(Me.tbMissingOptions, "tbMissingOptions") Me.tbMissingOptions.Name = "tbMissingOptions" Me.tbMissingOptions.UseVisualStyleBackColor = True ' - 'rdoPercentage - ' - resources.ApplyResources(Me.rdoPercentage, "rdoPercentage") - Me.rdoPercentage.Name = "rdoPercentage" - Me.rdoPercentage.UseVisualStyleBackColor = True - ' - 'rdoNumber - ' - resources.ApplyResources(Me.rdoNumber, "rdoNumber") - Me.rdoNumber.Checked = True - Me.rdoNumber.Name = "rdoNumber" - Me.rdoNumber.TabStop = True - Me.rdoNumber.UseVisualStyleBackColor = True - ' - 'lblPercentage - ' - resources.ApplyResources(Me.lblPercentage, "lblPercentage") - Me.lblPercentage.Name = "lblPercentage" - ' - 'lblNumber - ' - resources.ApplyResources(Me.lblNumber, "lblNumber") - Me.lblNumber.Name = "lblNumber" - ' 'tbMore ' Me.tbMore.Controls.Add(Me.grpPosition) @@ -186,11 +161,37 @@ Partial Class sdgSummaries Me.grpPosition.Name = "grpPosition" Me.grpPosition.TabStop = False ' + 'ucrInputN + ' + Me.ucrInputN.AddQuotesIfUnrecognised = True + Me.ucrInputN.IsMultiline = False + Me.ucrInputN.IsReadOnly = False + resources.ApplyResources(Me.ucrInputN, "ucrInputN") + Me.ucrInputN.Name = "ucrInputN" + ' 'lblInputN ' resources.ApplyResources(Me.lblInputN, "lblInputN") Me.lblInputN.Name = "lblInputN" ' + 'ucrChkFirst + ' + Me.ucrChkFirst.Checked = False + resources.ApplyResources(Me.ucrChkFirst, "ucrChkFirst") + Me.ucrChkFirst.Name = "ucrChkFirst" + ' + 'ucrChkLast + ' + Me.ucrChkLast.Checked = False + resources.ApplyResources(Me.ucrChkLast, "ucrChkLast") + Me.ucrChkLast.Name = "ucrChkLast" + ' + 'ucrChknth + ' + Me.ucrChknth.Checked = False + resources.ApplyResources(Me.ucrChknth, "ucrChknth") + Me.ucrChknth.Name = "ucrChknth" + ' 'grpProportionsPercentiles ' Me.grpProportionsPercentiles.Controls.Add(Me.ucrChkProportion) @@ -204,6 +205,53 @@ Partial Class sdgSummaries Me.grpProportionsPercentiles.Name = "grpProportionsPercentiles" Me.grpProportionsPercentiles.TabStop = False ' + 'ucrChkProportion + ' + Me.ucrChkProportion.Checked = False + resources.ApplyResources(Me.ucrChkProportion, "ucrChkProportion") + Me.ucrChkProportion.Name = "ucrChkProportion" + ' + 'ucrChkCount + ' + Me.ucrChkCount.Checked = False + resources.ApplyResources(Me.ucrChkCount, "ucrChkCount") + Me.ucrChkCount.Name = "ucrChkCount" + ' + 'ucrChkPercentage + ' + Me.ucrChkPercentage.Checked = False + resources.ApplyResources(Me.ucrChkPercentage, "ucrChkPercentage") + Me.ucrChkPercentage.Name = "ucrChkPercentage" + ' + 'ucrInputValue + ' + Me.ucrInputValue.AddQuotesIfUnrecognised = True + Me.ucrInputValue.IsMultiline = False + Me.ucrInputValue.IsReadOnly = False + resources.ApplyResources(Me.ucrInputValue, "ucrInputValue") + Me.ucrInputValue.Name = "ucrInputValue" + ' + 'ucrInputComboTest + ' + resources.ApplyResources(Me.ucrInputComboTest, "ucrInputComboTest") + Me.ucrInputComboTest.AddQuotesIfUnrecognised = True + Me.ucrInputComboTest.IsReadOnly = False + Me.ucrInputComboTest.Name = "ucrInputComboTest" + ' + 'ucrInputPercentile + ' + Me.ucrInputPercentile.AddQuotesIfUnrecognised = True + Me.ucrInputPercentile.IsMultiline = False + Me.ucrInputPercentile.IsReadOnly = False + resources.ApplyResources(Me.ucrInputPercentile, "ucrInputPercentile") + Me.ucrInputPercentile.Name = "ucrInputPercentile" + ' + 'ucrChkPercentile + ' + Me.ucrChkPercentile.Checked = False + resources.ApplyResources(Me.ucrChkPercentile, "ucrChkPercentile") + Me.ucrChkPercentile.Name = "ucrChkPercentile" + ' 'grpLocation ' Me.grpLocation.Controls.Add(Me.lblFractionTrimmed) @@ -218,6 +266,22 @@ Partial Class sdgSummaries resources.ApplyResources(Me.lblFractionTrimmed, "lblFractionTrimmed") Me.lblFractionTrimmed.Name = "lblFractionTrimmed" ' + 'ucrNudFraction + ' + Me.ucrNudFraction.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudFraction.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudFraction, "ucrNudFraction") + Me.ucrNudFraction.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudFraction.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudFraction.Name = "ucrNudFraction" + Me.ucrNudFraction.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrChkTrimmedMean + ' + Me.ucrChkTrimmedMean.Checked = False + resources.ApplyResources(Me.ucrChkTrimmedMean, "ucrChkTrimmedMean") + Me.ucrChkTrimmedMean.Name = "ucrChkTrimmedMean" + ' 'grpScale ' Me.grpScale.Controls.Add(Me.ucrChkQn) @@ -228,6 +292,30 @@ Partial Class sdgSummaries Me.grpScale.Name = "grpScale" Me.grpScale.TabStop = False ' + 'ucrChkQn + ' + Me.ucrChkQn.Checked = False + resources.ApplyResources(Me.ucrChkQn, "ucrChkQn") + Me.ucrChkQn.Name = "ucrChkQn" + ' + 'ucrChkSn + ' + Me.ucrChkSn.Checked = False + resources.ApplyResources(Me.ucrChkSn, "ucrChkSn") + Me.ucrChkSn.Name = "ucrChkSn" + ' + 'ucrChkCoefficientOfVariation + ' + Me.ucrChkCoefficientOfVariation.Checked = False + resources.ApplyResources(Me.ucrChkCoefficientOfVariation, "ucrChkCoefficientOfVariation") + Me.ucrChkCoefficientOfVariation.Name = "ucrChkCoefficientOfVariation" + ' + 'ucrChkMedianAbsoluteDeviation + ' + Me.ucrChkMedianAbsoluteDeviation.Checked = False + resources.ApplyResources(Me.ucrChkMedianAbsoluteDeviation, "ucrChkMedianAbsoluteDeviation") + Me.ucrChkMedianAbsoluteDeviation.Name = "ucrChkMedianAbsoluteDeviation" + ' 'grpSkewness ' Me.grpSkewness.Controls.Add(Me.ucrChkMc) @@ -236,6 +324,18 @@ Partial Class sdgSummaries Me.grpSkewness.Name = "grpSkewness" Me.grpSkewness.TabStop = False ' + 'ucrChkMc + ' + Me.ucrChkMc.Checked = False + resources.ApplyResources(Me.ucrChkMc, "ucrChkMc") + Me.ucrChkMc.Name = "ucrChkMc" + ' + 'ucrChkSkewness + ' + Me.ucrChkSkewness.Checked = False + resources.ApplyResources(Me.ucrChkSkewness, "ucrChkSkewness") + Me.ucrChkSkewness.Name = "ucrChkSkewness" + ' 'grpKurtosis ' Me.grpKurtosis.Controls.Add(Me.ucrChkKurtosis) @@ -243,6 +343,12 @@ Partial Class sdgSummaries Me.grpKurtosis.Name = "grpKurtosis" Me.grpKurtosis.TabStop = False ' + 'ucrChkKurtosis + ' + Me.ucrChkKurtosis.Checked = False + resources.ApplyResources(Me.ucrChkKurtosis, "ucrChkKurtosis") + Me.ucrChkKurtosis.Name = "ucrChkKurtosis" + ' 'tbsum ' Me.tbsum.Controls.Add(Me.grpCommon) @@ -255,103 +361,15 @@ Partial Class sdgSummaries ' 'grpCommon ' - Me.grpCommon.Controls.Add(Me.ucrChkn_distinct) - Me.grpCommon.Controls.Add(Me.ucrChkNTotal) - Me.grpCommon.Controls.Add(Me.ucrChkMode) - Me.grpCommon.Controls.Add(Me.ucrChkNMissing) - Me.grpCommon.Controls.Add(Me.ucrChkNonMissing) - resources.ApplyResources(Me.grpCommon, "grpCommon") - Me.grpCommon.Name = "grpCommon" - Me.grpCommon.TabStop = False - Me.grpCommon.Tag = "Common" - ' - 'grpQuartiles - ' - Me.grpQuartiles.Controls.Add(Me.ucrChkLowerQuartile) - Me.grpQuartiles.Controls.Add(Me.ucrChkUpperQuartile) - resources.ApplyResources(Me.grpQuartiles, "grpQuartiles") - Me.grpQuartiles.Name = "grpQuartiles" - Me.grpQuartiles.TabStop = False - Me.grpQuartiles.Tag = "Quartiles" - ' - 'grpNotOrderedFactor - ' - Me.grpNotOrderedFactor.Controls.Add(Me.ucrChkRange) - Me.grpNotOrderedFactor.Controls.Add(Me.ucrChkMaximum) - Me.grpNotOrderedFactor.Controls.Add(Me.ucrChkMinimum) - resources.ApplyResources(Me.grpNotOrderedFactor, "grpNotOrderedFactor") - Me.grpNotOrderedFactor.Name = "grpNotOrderedFactor" - Me.grpNotOrderedFactor.TabStop = False - Me.grpNotOrderedFactor.Tag = "All_but_unordered_Factor" - ' - 'grpNumeric - ' - Me.grpNumeric.Controls.Add(Me.ucrChkVariance) - Me.grpNumeric.Controls.Add(Me.ucrChkMedian) - Me.grpNumeric.Controls.Add(Me.ucrChkStdDev) - Me.grpNumeric.Controls.Add(Me.ucrChkSum) - Me.grpNumeric.Controls.Add(Me.ucrChkMean) - resources.ApplyResources(Me.grpNumeric, "grpNumeric") - Me.grpNumeric.Name = "grpNumeric" - Me.grpNumeric.TabStop = False - Me.grpNumeric.Tag = "Numeric" - ' - 'tbSummaries - ' - Me.tbSummaries.Controls.Add(Me.tbsum) - Me.tbSummaries.Controls.Add(Me.tbMore) - Me.tbSummaries.Controls.Add(Me.tbTwoVariables) - Me.tbSummaries.Controls.Add(Me.tbMissingOptions) - resources.ApplyResources(Me.tbSummaries, "tbSummaries") - Me.tbSummaries.Name = "tbSummaries" - Me.tbSummaries.SelectedIndex = 0 - ' - 'tbTwoVariables - ' - Me.tbTwoVariables.Controls.Add(Me.grpMissing) - Me.tbTwoVariables.Controls.Add(Me.grpRelationships) - Me.tbTwoVariables.Controls.Add(Me.lblSecondVariable) - Me.tbTwoVariables.Controls.Add(Me.ucrSelectorSecondVariable) - Me.tbTwoVariables.Controls.Add(Me.ucrReceiverSecondVariable) - resources.ApplyResources(Me.tbTwoVariables, "tbTwoVariables") - Me.tbTwoVariables.Name = "tbTwoVariables" - Me.tbTwoVariables.UseVisualStyleBackColor = True - ' - 'grpMissing - ' - Me.grpMissing.Controls.Add(Me.rdoPairwise) - Me.grpMissing.Controls.Add(Me.rdoCompleteRows) - Me.grpMissing.Controls.Add(Me.ucrPnlMissing) - resources.ApplyResources(Me.grpMissing, "grpMissing") - Me.grpMissing.Name = "grpMissing" - Me.grpMissing.TabStop = False - ' - 'rdoPairwise - ' - resources.ApplyResources(Me.rdoPairwise, "rdoPairwise") - Me.rdoPairwise.Name = "rdoPairwise" - Me.rdoPairwise.TabStop = True - Me.rdoPairwise.UseVisualStyleBackColor = True - ' - 'rdoCompleteRows - ' - resources.ApplyResources(Me.rdoCompleteRows, "rdoCompleteRows") - Me.rdoCompleteRows.Name = "rdoCompleteRows" - Me.rdoCompleteRows.TabStop = True - Me.rdoCompleteRows.UseVisualStyleBackColor = True - ' - 'grpRelationships - ' - Me.grpRelationships.Controls.Add(Me.ucrChkCovariance) - Me.grpRelationships.Controls.Add(Me.ucrChkCorrelations) - resources.ApplyResources(Me.grpRelationships, "grpRelationships") - Me.grpRelationships.Name = "grpRelationships" - Me.grpRelationships.TabStop = False - ' - 'lblSecondVariable - ' - resources.ApplyResources(Me.lblSecondVariable, "lblSecondVariable") - Me.lblSecondVariable.Name = "lblSecondVariable" + Me.grpCommon.Controls.Add(Me.ucrChkn_distinct) + Me.grpCommon.Controls.Add(Me.ucrChkNTotal) + Me.grpCommon.Controls.Add(Me.ucrChkMode) + Me.grpCommon.Controls.Add(Me.ucrChkNMissing) + Me.grpCommon.Controls.Add(Me.ucrChkNonMissing) + resources.ApplyResources(Me.grpCommon, "grpCommon") + Me.grpCommon.Name = "grpCommon" + Me.grpCommon.TabStop = False + Me.grpCommon.Tag = "Common" ' 'ucrChkn_distinct ' @@ -383,6 +401,15 @@ Partial Class sdgSummaries resources.ApplyResources(Me.ucrChkNonMissing, "ucrChkNonMissing") Me.ucrChkNonMissing.Name = "ucrChkNonMissing" ' + 'grpQuartiles + ' + Me.grpQuartiles.Controls.Add(Me.ucrChkLowerQuartile) + Me.grpQuartiles.Controls.Add(Me.ucrChkUpperQuartile) + resources.ApplyResources(Me.grpQuartiles, "grpQuartiles") + Me.grpQuartiles.Name = "grpQuartiles" + Me.grpQuartiles.TabStop = False + Me.grpQuartiles.Tag = "Quartiles" + ' 'ucrChkLowerQuartile ' Me.ucrChkLowerQuartile.Checked = False @@ -395,6 +422,16 @@ Partial Class sdgSummaries resources.ApplyResources(Me.ucrChkUpperQuartile, "ucrChkUpperQuartile") Me.ucrChkUpperQuartile.Name = "ucrChkUpperQuartile" ' + 'grpNotOrderedFactor + ' + Me.grpNotOrderedFactor.Controls.Add(Me.ucrChkRange) + Me.grpNotOrderedFactor.Controls.Add(Me.ucrChkMaximum) + Me.grpNotOrderedFactor.Controls.Add(Me.ucrChkMinimum) + resources.ApplyResources(Me.grpNotOrderedFactor, "grpNotOrderedFactor") + Me.grpNotOrderedFactor.Name = "grpNotOrderedFactor" + Me.grpNotOrderedFactor.TabStop = False + Me.grpNotOrderedFactor.Tag = "All_but_unordered_Factor" + ' 'ucrChkRange ' Me.ucrChkRange.Checked = False @@ -413,6 +450,18 @@ Partial Class sdgSummaries resources.ApplyResources(Me.ucrChkMinimum, "ucrChkMinimum") Me.ucrChkMinimum.Name = "ucrChkMinimum" ' + 'grpNumeric + ' + Me.grpNumeric.Controls.Add(Me.ucrChkVariance) + Me.grpNumeric.Controls.Add(Me.ucrChkMedian) + Me.grpNumeric.Controls.Add(Me.ucrChkStdDev) + Me.grpNumeric.Controls.Add(Me.ucrChkSum) + Me.grpNumeric.Controls.Add(Me.ucrChkMean) + resources.ApplyResources(Me.grpNumeric, "grpNumeric") + Me.grpNumeric.Name = "grpNumeric" + Me.grpNumeric.TabStop = False + Me.grpNumeric.Tag = "Numeric" + ' 'ucrChkVariance ' Me.ucrChkVariance.Checked = False @@ -443,141 +492,33 @@ Partial Class sdgSummaries resources.ApplyResources(Me.ucrChkMean, "ucrChkMean") Me.ucrChkMean.Name = "ucrChkMean" ' - 'ucrInputN - ' - Me.ucrInputN.AddQuotesIfUnrecognised = True - Me.ucrInputN.IsMultiline = False - Me.ucrInputN.IsReadOnly = False - resources.ApplyResources(Me.ucrInputN, "ucrInputN") - Me.ucrInputN.Name = "ucrInputN" - ' - 'ucrChkFirst - ' - Me.ucrChkFirst.Checked = False - resources.ApplyResources(Me.ucrChkFirst, "ucrChkFirst") - Me.ucrChkFirst.Name = "ucrChkFirst" - ' - 'ucrChkLast - ' - Me.ucrChkLast.Checked = False - resources.ApplyResources(Me.ucrChkLast, "ucrChkLast") - Me.ucrChkLast.Name = "ucrChkLast" - ' - 'ucrChknth - ' - Me.ucrChknth.Checked = False - resources.ApplyResources(Me.ucrChknth, "ucrChknth") - Me.ucrChknth.Name = "ucrChknth" - ' - 'ucrChkProportion - ' - Me.ucrChkProportion.Checked = False - resources.ApplyResources(Me.ucrChkProportion, "ucrChkProportion") - Me.ucrChkProportion.Name = "ucrChkProportion" - ' - 'ucrChkCount - ' - Me.ucrChkCount.Checked = False - resources.ApplyResources(Me.ucrChkCount, "ucrChkCount") - Me.ucrChkCount.Name = "ucrChkCount" - ' - 'ucrChkPercentage - ' - Me.ucrChkPercentage.Checked = False - resources.ApplyResources(Me.ucrChkPercentage, "ucrChkPercentage") - Me.ucrChkPercentage.Name = "ucrChkPercentage" - ' - 'ucrInputValue - ' - Me.ucrInputValue.AddQuotesIfUnrecognised = True - Me.ucrInputValue.IsMultiline = False - Me.ucrInputValue.IsReadOnly = False - resources.ApplyResources(Me.ucrInputValue, "ucrInputValue") - Me.ucrInputValue.Name = "ucrInputValue" - ' - 'ucrInputComboTest - ' - resources.ApplyResources(Me.ucrInputComboTest, "ucrInputComboTest") - Me.ucrInputComboTest.AddQuotesIfUnrecognised = True - Me.ucrInputComboTest.IsReadOnly = False - Me.ucrInputComboTest.Name = "ucrInputComboTest" - ' - 'ucrInputPercentile - ' - Me.ucrInputPercentile.AddQuotesIfUnrecognised = True - Me.ucrInputPercentile.IsMultiline = False - Me.ucrInputPercentile.IsReadOnly = False - resources.ApplyResources(Me.ucrInputPercentile, "ucrInputPercentile") - Me.ucrInputPercentile.Name = "ucrInputPercentile" - ' - 'ucrChkPercentile - ' - Me.ucrChkPercentile.Checked = False - resources.ApplyResources(Me.ucrChkPercentile, "ucrChkPercentile") - Me.ucrChkPercentile.Name = "ucrChkPercentile" - ' - 'ucrNudFraction - ' - Me.ucrNudFraction.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudFraction.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudFraction, "ucrNudFraction") - Me.ucrNudFraction.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudFraction.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudFraction.Name = "ucrNudFraction" - Me.ucrNudFraction.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrChkTrimmedMean - ' - Me.ucrChkTrimmedMean.Checked = False - resources.ApplyResources(Me.ucrChkTrimmedMean, "ucrChkTrimmedMean") - Me.ucrChkTrimmedMean.Name = "ucrChkTrimmedMean" - ' - 'ucrChkQn - ' - Me.ucrChkQn.Checked = False - resources.ApplyResources(Me.ucrChkQn, "ucrChkQn") - Me.ucrChkQn.Name = "ucrChkQn" - ' - 'ucrChkSn - ' - Me.ucrChkSn.Checked = False - resources.ApplyResources(Me.ucrChkSn, "ucrChkSn") - Me.ucrChkSn.Name = "ucrChkSn" - ' - 'ucrChkCoefficientOfVariation - ' - Me.ucrChkCoefficientOfVariation.Checked = False - resources.ApplyResources(Me.ucrChkCoefficientOfVariation, "ucrChkCoefficientOfVariation") - Me.ucrChkCoefficientOfVariation.Name = "ucrChkCoefficientOfVariation" - ' - 'ucrChkMedianAbsoluteDeviation - ' - Me.ucrChkMedianAbsoluteDeviation.Checked = False - resources.ApplyResources(Me.ucrChkMedianAbsoluteDeviation, "ucrChkMedianAbsoluteDeviation") - Me.ucrChkMedianAbsoluteDeviation.Name = "ucrChkMedianAbsoluteDeviation" - ' - 'ucrChkMc - ' - Me.ucrChkMc.Checked = False - resources.ApplyResources(Me.ucrChkMc, "ucrChkMc") - Me.ucrChkMc.Name = "ucrChkMc" - ' - 'ucrChkSkewness + 'tbSummaries ' - Me.ucrChkSkewness.Checked = False - resources.ApplyResources(Me.ucrChkSkewness, "ucrChkSkewness") - Me.ucrChkSkewness.Name = "ucrChkSkewness" + Me.tbSummaries.Controls.Add(Me.tbsum) + Me.tbSummaries.Controls.Add(Me.tbMore) + Me.tbSummaries.Controls.Add(Me.tbTwoVariables) + Me.tbSummaries.Controls.Add(Me.tbMissingOptions) + resources.ApplyResources(Me.tbSummaries, "tbSummaries") + Me.tbSummaries.Name = "tbSummaries" + Me.tbSummaries.SelectedIndex = 0 ' - 'ucrChkKurtosis + 'tbTwoVariables ' - Me.ucrChkKurtosis.Checked = False - resources.ApplyResources(Me.ucrChkKurtosis, "ucrChkKurtosis") - Me.ucrChkKurtosis.Name = "ucrChkKurtosis" + Me.tbTwoVariables.Controls.Add(Me.grpRelationships) + Me.tbTwoVariables.Controls.Add(Me.lblSecondVariable) + Me.tbTwoVariables.Controls.Add(Me.ucrSelectorSecondVariable) + Me.tbTwoVariables.Controls.Add(Me.ucrReceiverSecondVariable) + resources.ApplyResources(Me.tbTwoVariables, "tbTwoVariables") + Me.tbTwoVariables.Name = "tbTwoVariables" + Me.tbTwoVariables.UseVisualStyleBackColor = True ' - 'ucrPnlMissing + 'grpRelationships ' - resources.ApplyResources(Me.ucrPnlMissing, "ucrPnlMissing") - Me.ucrPnlMissing.Name = "ucrPnlMissing" + Me.grpRelationships.Controls.Add(Me.ucrChkCovariance) + Me.grpRelationships.Controls.Add(Me.ucrChkCorrelations) + resources.ApplyResources(Me.grpRelationships, "grpRelationships") + Me.grpRelationships.Name = "grpRelationships" + Me.grpRelationships.TabStop = False ' 'ucrChkCovariance ' @@ -591,6 +532,11 @@ Partial Class sdgSummaries resources.ApplyResources(Me.ucrChkCorrelations, "ucrChkCorrelations") Me.ucrChkCorrelations.Name = "ucrChkCorrelations" ' + 'lblSecondVariable + ' + resources.ApplyResources(Me.lblSecondVariable, "lblSecondVariable") + Me.lblSecondVariable.Name = "lblSecondVariable" + ' 'ucrSelectorSecondVariable ' Me.ucrSelectorSecondVariable.bDropUnusedFilterLevels = False @@ -608,15 +554,45 @@ Partial Class sdgSummaries Me.ucrReceiverSecondVariable.strNcFilePath = "" Me.ucrReceiverSecondVariable.ucrSelector = Nothing ' - 'ucrNudPercentage + 'ucrButtonsSummaries ' - Me.ucrNudPercentage.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPercentage.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudPercentage, "ucrNudPercentage") - Me.ucrNudPercentage.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudPercentage.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPercentage.Name = "ucrNudPercentage" - Me.ucrNudPercentage.Value = New Decimal(New Integer() {0, 0, 0, 0}) + resources.ApplyResources(Me.ucrButtonsSummaries, "ucrButtonsSummaries") + Me.ucrButtonsSummaries.Name = "ucrButtonsSummaries" + ' + 'ucrChkIncludeMissingOpt + ' + Me.ucrChkIncludeMissingOpt.Checked = False + resources.ApplyResources(Me.ucrChkIncludeMissingOpt, "ucrChkIncludeMissingOpt") + Me.ucrChkIncludeMissingOpt.Name = "ucrChkIncludeMissingOpt" + ' + 'ucrPnlMissingOptions + ' + resources.ApplyResources(Me.ucrPnlMissingOptions, "ucrPnlMissingOptions") + Me.ucrPnlMissingOptions.Name = "ucrPnlMissingOptions" + ' + 'rdoNumber + ' + resources.ApplyResources(Me.rdoNumber, "rdoNumber") + Me.rdoNumber.Checked = True + Me.rdoNumber.Name = "rdoNumber" + Me.rdoNumber.TabStop = True + Me.rdoNumber.UseVisualStyleBackColor = True + ' + 'rdoPercentage + ' + resources.ApplyResources(Me.rdoPercentage, "rdoPercentage") + Me.rdoPercentage.Name = "rdoPercentage" + Me.rdoPercentage.UseVisualStyleBackColor = True + ' + 'lblNumber + ' + resources.ApplyResources(Me.lblNumber, "lblNumber") + Me.lblNumber.Name = "lblNumber" + ' + 'lblPercentage + ' + resources.ApplyResources(Me.lblPercentage, "lblPercentage") + Me.lblPercentage.Name = "lblPercentage" ' 'ucrNudNumber ' @@ -628,10 +604,15 @@ Partial Class sdgSummaries Me.ucrNudNumber.Name = "ucrNudNumber" Me.ucrNudNumber.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrButtonsSummaries + 'ucrNudPercentage ' - resources.ApplyResources(Me.ucrButtonsSummaries, "ucrButtonsSummaries") - Me.ucrButtonsSummaries.Name = "ucrButtonsSummaries" + Me.ucrNudPercentage.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPercentage.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudPercentage, "ucrNudPercentage") + Me.ucrNudPercentage.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPercentage.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPercentage.Name = "ucrNudPercentage" + Me.ucrNudPercentage.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'sdgSummaries ' @@ -663,8 +644,6 @@ Partial Class sdgSummaries Me.tbSummaries.ResumeLayout(False) Me.tbTwoVariables.ResumeLayout(False) Me.tbTwoVariables.PerformLayout() - Me.grpMissing.ResumeLayout(False) - Me.grpMissing.PerformLayout() Me.grpRelationships.ResumeLayout(False) Me.ResumeLayout(False) @@ -672,12 +651,6 @@ Partial Class sdgSummaries Friend WithEvents ucrButtonsSummaries As ucrButtonsSubdialogue Friend WithEvents tbMissingOptions As TabPage - Friend WithEvents rdoPercentage As RadioButton - Friend WithEvents rdoNumber As RadioButton - Friend WithEvents lblPercentage As Label - Friend WithEvents lblNumber As Label - Friend WithEvents ucrNudPercentage As ucrNud - Friend WithEvents ucrNudNumber As ucrNud Friend WithEvents tbMore As TabPage Friend WithEvents ucrChkKurtosis As ucrCheck Friend WithEvents ucrChkSkewness As ucrCheck @@ -735,8 +708,12 @@ Partial Class sdgSummaries Friend WithEvents ucrChkLast As ucrCheck Friend WithEvents ucrChknth As ucrCheck Friend WithEvents ucrChkn_distinct As ucrCheck - Friend WithEvents grpMissing As GroupBox - Friend WithEvents rdoCompleteRows As RadioButton - Friend WithEvents ucrPnlMissing As UcrPanel - Friend WithEvents rdoPairwise As RadioButton + Friend WithEvents ucrChkIncludeMissingOpt As ucrCheck + Friend WithEvents rdoPercentage As RadioButton + Friend WithEvents rdoNumber As RadioButton + Friend WithEvents ucrPnlMissingOptions As UcrPanel + Friend WithEvents ucrNudPercentage As ucrNud + Friend WithEvents ucrNudNumber As ucrNud + Friend WithEvents lblPercentage As Label + Friend WithEvents lblNumber As Label End Class \ No newline at end of file diff --git a/instat/sdgSummaries.resx b/instat/sdgSummaries.resx index c2ea0bc7bfe..df899051544 100644 --- a/instat/sdgSummaries.resx +++ b/instat/sdgSummaries.resx @@ -117,83 +117,65 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - - NoControl - - - 9, 46 - - - 80, 17 + + 318, 85 - - 1 + + 50, 20 - - Percentage + + + 13 - - rdoPercentage + + ucrNudPercentage - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + tbMissingOptions - + 0 - - True - - - NoControl - - - 9, 23 - - - 62, 17 + + 318, 85 - - 0 + + 50, 20 - - Number + + 12 - - rdoNumber + + ucrNudNumber - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + tbMissingOptions - + 1 True + NoControl - 4, 70 + 6, 87 308, 13 - 2 + 11 Summary set to missing if more than this percentage are missing: @@ -217,13 +199,13 @@ NoControl - 6, 70 + 6, 87 280, 13 - 5 + 10 Summary set to missing if more than this value are missing: @@ -240,48 +222,108 @@ 3 - - 319, 66 + + True - - 50, 20 + + NoControl - - 3 + + 9, 55 - - ucrNudPercentage + + 80, 17 - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 9 - + + Percentage + + + rdoPercentage + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tbMissingOptions - + 4 - - 318, 66 + + True - - 50, 20 + + NoControl - - 3 + + 9, 32 - - ucrNudNumber + + 62, 17 - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 8 - + + Number + + + rdoNumber + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tbMissingOptions - + 5 + + 7, 25 + + + 361, 89 + + + 7 + + + ucrPnlMissingOptions + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tbMissingOptions + + + 6 + + + 7, 6 + + + 100, 20 + + + 6 + + + ucrChkIncludeMissingOpt + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tbMissingOptions + + + 7 + 4, 22 @@ -1401,111 +1443,6 @@ 0 - - True - - - NoControl - - - 231, 19 - - - 64, 17 - - - 2 - - - Pairwise - - - rdoPairwise - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpMissing - - - 0 - - - True - - - NoControl - - - 13, 19 - - - 116, 17 - - - 1 - - - Complete rows only - - - rdoCompleteRows - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpMissing - - - 1 - - - 6, 19 - - - 338, 30 - - - 0 - - - ucrPnlMissing - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpMissing - - - 2 - - - 6, 275 - - - 368, 55 - - - 4 - - - Missing - - - grpMissing - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbTwoVariables - - - 0 - 231, 19 @@ -1570,7 +1507,7 @@ tbTwoVariables - 1 + 0 True @@ -1600,7 +1537,7 @@ tbTwoVariables - 2 + 1 10, 9 @@ -1624,7 +1561,7 @@ tbTwoVariables - 3 + 2 True @@ -1656,9 +1593,6 @@ 1 - - NoControl - CenterParent @@ -1693,7 +1627,7 @@ tbTwoVariables - 4 + 3 4, 22 diff --git a/instat/sdgSummaries.vb b/instat/sdgSummaries.vb index a093150f5f8..3c9da470ca1 100644 --- a/instat/sdgSummaries.vb +++ b/instat/sdgSummaries.vb @@ -101,10 +101,6 @@ Public Class sdgSummaries ucrChkCovariance.SetParameter(New RParameter("summary_cov", 22), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_cov" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkCovariance.SetText("Covariance") - ucrPnlMissing.SetParameter(New RParameter("use", 5)) - ucrPnlMissing.AddRadioButton(rdoCompleteRows, Chr(34) & "complete.obs" & Chr(34)) - ucrPnlMissing.AddRadioButton(rdoPairwise, Chr(34) & "pairwise.complete.obs" & Chr(34)) - ucrReceiverSecondVariable.Selector = ucrSelectorSecondVariable ucrReceiverSecondVariable.SetMeAsReceiver() ucrReceiverSecondVariable.SetIncludedDataTypes({"numeric"}) @@ -141,10 +137,10 @@ Public Class sdgSummaries ucrInputN.SetLinkedDisplayControl(lblInputN) ucrNudFraction.SetLinkedDisplayControl(lblFractionTrimmed) - ucrChkTrimmedMean.SetParameter(New RParameter("summary_mean", 27), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_mean" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkTrimmedMean.SetParameter(New RParameter("summary_trimmed_mean", 27), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_trimmed_mean" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkTrimmedMean.SetText("Trimmed Mean") - ucrNudFraction.SetParameter(New RParameter("trim", 5)) + ucrNudFraction.SetParameter(New RParameter("trimmed", 5)) ucrNudFraction.Maximum = 0.5 ucrNudFraction.DecimalPlaces = 2 ucrNudFraction.Increment = 0.01 @@ -180,11 +176,14 @@ Public Class sdgSummaries ucrChkCount.SetParameter(New RParameter("count_calc", 29), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "count_calc" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkCount.SetText("Count") - 'ucrPnlMissingOptions.AddRadioButton(rdoNumber) - 'ucrPnlMissingOptions.AddRadioButton(rdoPercentage) + ucrChkIncludeMissingOpt.SetText("Inlcude Missing Options") + ucrChkIncludeMissingOpt.AddToLinkedControls(ucrPnlMissingOptions, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + ucrPnlMissingOptions.AddRadioButton(rdoNumber) + ucrPnlMissingOptions.AddRadioButton(rdoPercentage) - 'ucrPnlMissingOptions.AddToLinkedControls({ucrNudNumber}, {rdoNumber}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - 'ucrPnlMissingOptions.AddToLinkedControls({ucrNudPercentage}, {rdoPercentage}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlMissingOptions.AddToLinkedControls({ucrNudNumber}, {rdoNumber}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlMissingOptions.AddToLinkedControls({ucrNudPercentage}, {rdoPercentage}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrNudPercentage.SetLinkedDisplayControl(lblPercentage) ucrNudNumber.SetLinkedDisplayControl(lblNumber) @@ -249,7 +248,6 @@ Public Class sdgSummaries ucrChkLast.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) ucrChknth.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) ucrChkn_distinct.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) - ucrPnlMissing.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) If bReset Then tbSummaries.SelectedIndex = 0 @@ -291,12 +289,5 @@ Public Class sdgSummaries ' End If End Sub - Private Sub ucrPnlMissing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlMissing.ControlValueChanged - If rdoPairwise.Checked Then - clsDefaultFunction.AddParameter("use", Chr(34) & "pairwise.complete.obs" & Chr(34)) - ElseIf rdoCompleteRows.Checked Then - clsDefaultFunction.AddParameter("use", Chr(34) & "complete.obs" & Chr(34)) - End If - End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/Backend_Components/summary_functions.R b/instat/static/InstatObject/R/Backend_Components/summary_functions.R index 5ca0963241b..251ac756200 100644 --- a/instat/static/InstatObject/R/Backend_Components/summary_functions.R +++ b/instat/static/InstatObject/R/Backend_Components/summary_functions.R @@ -395,6 +395,7 @@ range_label = "summary_range" min_label="summary_min" max_label="summary_max" mean_label="summary_mean" +trimmed_mean_label = "summary_trimmed_mean" quartile_label="summary_quartile" lower_quart_label="lower_quartile" upper_quart_label="upper_quartile" @@ -416,7 +417,7 @@ proportion_label="proportion_calc" count_calc_label="count_calc" # list of all summary function names -all_summaries=c(sum_label, mode_label, count_label, count_missing_label, count_non_missing_label, sd_label, var_label, median_label, range_label, min_label, max_label, mean_label,quartile_label, lower_quart_label, upper_quart_label, skewness_label, kurtosis_label, summary_coef_var_label, summary_skewness_mc_label, summary_outlier_limit_label, summary_median_absolute_deviation_label, summary_Qn_label, summary_Sn_label, cor_label, cov_label,first_label, last_label, nth_label, n_distinct_label, proportion_label, count_calc_label) +all_summaries=c(sum_label, mode_label, count_label, count_missing_label, count_non_missing_label, sd_label, var_label, median_label, range_label, min_label, max_label, mean_label, trimmed_mean_label, quartile_label, lower_quart_label, upper_quart_label, skewness_label, kurtosis_label, summary_coef_var_label, summary_skewness_mc_label, summary_outlier_limit_label, summary_median_absolute_deviation_label, summary_Qn_label, summary_Sn_label, cor_label, cov_label,first_label, last_label, nth_label, n_distinct_label, proportion_label, count_calc_label) summary_mode <- function(x,...) { ux <- unique(x) out <- ux[which.max(tabulate(match(x, ux)))] @@ -430,6 +431,11 @@ summary_mean <- function (x, add_cols, weights="", na.rm = FALSE, trim = 0,...) else return(mean(x, na.rm = na.rm, trim = trim)) } +summary_trimmed_mean <- function (x, add_cols, weights="", na.rm = FALSE, trimmed = 0,...) { + if( length(x)==0 || (na.rm && length(x[!is.na(x)])==0) ) return(NA) + else return(mean(x, na.rm = na.rm, trim = trimmed)) +} + summary_sum <- function (x, na.rm = FALSE,...) { return(sum(x, na.rm = na.rm)) } @@ -585,11 +591,19 @@ summary_n_distinct<- function(x, na.rm = FALSE, ...) { } #Proportions functions -proportion_calc <- function(x, test = "==", value, As_percentage = FALSE, ... ){ - y <- x[eval(parse(text = paste("x", value, sep = test)))] - if (!As_percentage){ return(length(y)/length(x)) - }else{return(noquote(paste0((length(y)/length(x))*100 ,"%"))) - } +proportion_calc <- function(x, test = "==", value, As_percentage = FALSE, na.rm = FALSE,... ){ + if(!na.rm){ + if(sum(is.na(x)) > 0) return(NA) + y <- x[eval(parse(text = paste("x", value, sep = test)))] + if(!As_percentage){return(length(y)/length(x))} + else {return(noquote(paste0((length(y)/length(x))*100 ,"%")))} + } + else { + remove.na <- na.omit(x) + y <- remove.na[eval(parse(text = paste("remove.na", value, sep = test)))] + if (!As_percentage){ return(length(y)/length(remove.na))} + else{return(noquote(paste0((length(y)/length(remove.na))*100 ,"%")))} + } } #count function From 0cd5b7f5490eeca240de7cc78b7e959354aac63e Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Wed, 30 May 2018 11:05:42 +0300 Subject: [PATCH 4/9] fixed bug with colours being set correctly in geoms --- instat/ucrColors.vb | 11 ++++++++--- instat/ucrReceiverMetadataProperty.vb | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/instat/ucrColors.vb b/instat/ucrColors.vb index b5b57afadd9..2c1d0598b60 100644 --- a/instat/ucrColors.vb +++ b/instat/ucrColors.vb @@ -42,12 +42,17 @@ Public Class ucrColors dctColours.Add("Pink", Chr(34) & "pink" & Chr(34)) End If bAllowNonConditionValues = True - SetDropDownStyleAsNonEditable() + ' This has been removed because when selecting a Hex colour the text does not set if the combo box is not editable. Text can only be from dropdown when non editable + ' SetDropDownStyleAsNonEditable() + End Sub + + Public Sub SetColours() + SetItems(dctColours) End Sub Private Sub ucrColors_Load(sender As Object, e As EventArgs) Handles Me.Load - If GetParameter() IsNot Nothing Then - SetItems(dctColours) + If dctConditions Is Nothing OrElse dctConditions.Count = 0 Then + SetColours() End If End Sub diff --git a/instat/ucrReceiverMetadataProperty.vb b/instat/ucrReceiverMetadataProperty.vb index 17fe5b96227..b88ea49c22f 100644 --- a/instat/ucrReceiverMetadataProperty.vb +++ b/instat/ucrReceiverMetadataProperty.vb @@ -80,6 +80,8 @@ Public Class ucrReceiverMetadataProperty ucrInputCboParamValue.SetItems() End If End If + ElseIf ctrActive.Equals(ucrColor) Then + ucrColor.SetColours() End If ctrActive.SetRCode(clsNewRCode, bReset, bCloneIfNeeded:=True) End If From 70d96e57366453a98dd32f1f26901d903272fdba Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 30 May 2018 15:40:30 +0300 Subject: [PATCH 5/9] spliting checks into sub_calculatons and saving them. --- instat/dlgClimaticCheckDataRain.Designer.vb | 76 ++++-- instat/dlgClimaticCheckDataRain.resx | 259 +++++++++++++------- instat/dlgClimaticCheckDataRain.vb | 142 ++++++++--- 3 files changed, 329 insertions(+), 148 deletions(-) diff --git a/instat/dlgClimaticCheckDataRain.Designer.vb b/instat/dlgClimaticCheckDataRain.Designer.vb index 236b8088178..f1d6385c2f7 100644 --- a/instat/dlgClimaticCheckDataRain.Designer.vb +++ b/instat/dlgClimaticCheckDataRain.Designer.vb @@ -32,6 +32,12 @@ Partial Class dlgClimaticCheckDataRain Me.lblmm = New System.Windows.Forms.Label() Me.lblDays = New System.Windows.Forms.Label() Me.lblRainDays = New System.Windows.Forms.Label() + Me.lblSkewnessWeight = New System.Windows.Forms.Label() + Me.grpLogicalCalculatedColumns = New System.Windows.Forms.GroupBox() + Me.ucrChkCalculatedColumns = New instat.ucrCheck() + Me.ucrChkLogicalColumns = New instat.ucrCheck() + Me.ucrNudSkewnessWeight = New instat.ucrNud() + Me.ucrChkSkewedData = New instat.ucrCheck() Me.ucrNudWetDays = New instat.ucrNud() Me.ucrNudSame = New instat.ucrNud() Me.ucrNudLarge = New instat.ucrNud() @@ -48,9 +54,6 @@ Partial Class dlgClimaticCheckDataRain Me.ucrReceiverStation = New instat.ucrReceiverSingle() Me.ucrSelectorRain = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrChkSkewedData = New instat.ucrCheck() - Me.ucrNudSkewnessWeight = New instat.ucrNud() - Me.lblSkewnessWeight = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'lblStation @@ -98,6 +101,45 @@ Partial Class dlgClimaticCheckDataRain resources.ApplyResources(Me.lblRainDays, "lblRainDays") Me.lblRainDays.Name = "lblRainDays" ' + 'lblSkewnessWeight + ' + resources.ApplyResources(Me.lblSkewnessWeight, "lblSkewnessWeight") + Me.lblSkewnessWeight.Name = "lblSkewnessWeight" + ' + 'grpLogicalCalculatedColumns + ' + resources.ApplyResources(Me.grpLogicalCalculatedColumns, "grpLogicalCalculatedColumns") + Me.grpLogicalCalculatedColumns.Name = "grpLogicalCalculatedColumns" + Me.grpLogicalCalculatedColumns.TabStop = False + ' + 'ucrChkCalculatedColumns + ' + Me.ucrChkCalculatedColumns.Checked = False + resources.ApplyResources(Me.ucrChkCalculatedColumns, "ucrChkCalculatedColumns") + Me.ucrChkCalculatedColumns.Name = "ucrChkCalculatedColumns" + ' + 'ucrChkLogicalColumns + ' + Me.ucrChkLogicalColumns.Checked = False + resources.ApplyResources(Me.ucrChkLogicalColumns, "ucrChkLogicalColumns") + Me.ucrChkLogicalColumns.Name = "ucrChkLogicalColumns" + ' + 'ucrNudSkewnessWeight + ' + Me.ucrNudSkewnessWeight.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSkewnessWeight.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudSkewnessWeight, "ucrNudSkewnessWeight") + Me.ucrNudSkewnessWeight.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSkewnessWeight.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSkewnessWeight.Name = "ucrNudSkewnessWeight" + Me.ucrNudSkewnessWeight.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrChkSkewedData + ' + Me.ucrChkSkewedData.Checked = False + resources.ApplyResources(Me.ucrChkSkewedData, "ucrChkSkewedData") + Me.ucrChkSkewedData.Name = "ucrChkSkewedData" + ' 'ucrNudWetDays ' Me.ucrNudWetDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -214,6 +256,7 @@ Partial Class dlgClimaticCheckDataRain ' 'ucrSelectorRain ' + Me.ucrSelectorRain.bDropUnusedFilterLevels = False Me.ucrSelectorRain.bShowHiddenColumns = False Me.ucrSelectorRain.bUseCurrentFilter = True resources.ApplyResources(Me.ucrSelectorRain, "ucrSelectorRain") @@ -224,31 +267,12 @@ Partial Class dlgClimaticCheckDataRain resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' - 'ucrChkSkewedData - ' - Me.ucrChkSkewedData.Checked = False - resources.ApplyResources(Me.ucrChkSkewedData, "ucrChkSkewedData") - Me.ucrChkSkewedData.Name = "ucrChkSkewedData" - ' - 'ucrNudSkewnessWeight - ' - Me.ucrNudSkewnessWeight.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSkewnessWeight.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudSkewnessWeight, "ucrNudSkewnessWeight") - Me.ucrNudSkewnessWeight.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudSkewnessWeight.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSkewnessWeight.Name = "ucrNudSkewnessWeight" - Me.ucrNudSkewnessWeight.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblSkewnessWeight - ' - resources.ApplyResources(Me.lblSkewnessWeight, "lblSkewnessWeight") - Me.lblSkewnessWeight.Name = "lblSkewnessWeight" - ' 'dlgClimaticCheckDataRain ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.ucrChkCalculatedColumns) + Me.Controls.Add(Me.ucrChkLogicalColumns) Me.Controls.Add(Me.lblSkewnessWeight) Me.Controls.Add(Me.ucrNudSkewnessWeight) Me.Controls.Add(Me.ucrChkSkewedData) @@ -277,6 +301,7 @@ Partial Class dlgClimaticCheckDataRain Me.Controls.Add(Me.lblStation) Me.Controls.Add(Me.ucrSelectorRain) Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.grpLogicalCalculatedColumns) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -314,4 +339,7 @@ Partial Class dlgClimaticCheckDataRain Friend WithEvents ucrChkSkewedData As ucrCheck Friend WithEvents lblSkewnessWeight As Label Friend WithEvents ucrNudSkewnessWeight As ucrNud + Friend WithEvents ucrChkCalculatedColumns As ucrCheck + Friend WithEvents ucrChkLogicalColumns As ucrCheck + Friend WithEvents grpLogicalCalculatedColumns As GroupBox End Class diff --git a/instat/dlgClimaticCheckDataRain.resx b/instat/dlgClimaticCheckDataRain.resx index f2038c5e1e5..bd8171efbd5 100644 --- a/instat/dlgClimaticCheckDataRain.resx +++ b/instat/dlgClimaticCheckDataRain.resx @@ -148,7 +148,7 @@ $this - 25 + 27 True @@ -178,7 +178,7 @@ $this - 23 + 25 True @@ -208,7 +208,7 @@ $this - 22 + 24 True @@ -238,7 +238,7 @@ $this - 20 + 22 True @@ -268,7 +268,7 @@ $this - 17 + 19 True @@ -298,7 +298,7 @@ $this - 19 + 21 NoControl @@ -325,7 +325,7 @@ $this - 5 + 7 True @@ -355,7 +355,7 @@ $this - 4 + 6 True @@ -385,8 +385,146 @@ $this + 5 + + + True + + + NoControl + + + 227, 324 + + + 96, 13 + + + 27 + + + Skewness Weight: + + + lblSkewnessWeight + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 10, 347 + + + 399, 55 + + + 30 + + + Include in Original Data + + + grpLogicalCalculatedColumns + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 30 + + + 230, 370 + + + 152, 20 + + + 29 + + + ucrChkCalculatedColumns + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 0 + + + 23, 370 + + + 171, 20 + + + 28 + + + ucrChkLogicalColumns + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 1 + + + 329, 323 + + + 50, 20 + + + 26 + + + ucrNudSkewnessWeight + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + 3 + + 106, 323 + + + 100, 20 + + + 25 + + + ucrChkSkewedData + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 4 + 106, 269 @@ -406,7 +544,7 @@ $this - 6 + 8 106, 242 @@ -427,7 +565,7 @@ $this - 7 + 9 106, 215 @@ -448,7 +586,7 @@ $this - 8 + 10 10, 323 @@ -469,7 +607,7 @@ $this - 9 + 11 10, 296 @@ -490,7 +628,7 @@ $this - 10 + 12 10, 269 @@ -511,7 +649,7 @@ $this - 11 + 13 10, 242 @@ -532,7 +670,7 @@ $this - 12 + 14 10, 215 @@ -553,7 +691,7 @@ $this - 13 + 15 True @@ -562,76 +700,7 @@ 6, 13 - 421, 404 - - - True - - - 227, 324 - - - 96, 13 - - - 27 - - - Skewness Weight: - - - lblSkewnessWeight - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - 329, 323 - - - 50, 20 - - - 26 - - - ucrNudSkewnessWeight - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 1 - - - 106, 323 - - - 100, 20 - - - 25 - - - ucrChkSkewedData - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 2 + 421, 466 262, 255 @@ -655,7 +724,7 @@ $this - 15 + 17 262, 211 @@ -679,7 +748,7 @@ $this - 16 + 18 262, 123 @@ -703,7 +772,7 @@ $this - 18 + 20 262, 79 @@ -727,7 +796,7 @@ $this - 21 + 23 262, 35 @@ -751,7 +820,7 @@ $this - 24 + 26 10, 20 @@ -775,10 +844,10 @@ $this - 26 + 28 - 10, 350 + 10, 408 410, 52 @@ -796,7 +865,7 @@ $this - 27 + 29 CenterScreen @@ -832,6 +901,6 @@ $this - 14 + 16 \ No newline at end of file diff --git a/instat/dlgClimaticCheckDataRain.vb b/instat/dlgClimaticCheckDataRain.vb index 80a8f138356..4fb9b5b3fc9 100644 --- a/instat/dlgClimaticCheckDataRain.vb +++ b/instat/dlgClimaticCheckDataRain.vb @@ -21,17 +21,29 @@ Public Class dlgClimaticCheckDataRain Private strCurrDataName As String = "" Private strRain As String = "Rain" 'Large/Same/wetdays - Private clsGroupByFunc, clsRainFilterFunc, clsRunCalcFunc, clsListFunc, clsGroupByMonth, clsListForOutlierManipulations, clsRainyDaysFunc, clsOutlierLimitFunc, clsOutlierLimitCalcFunc, clsListSubCalc As New RFunction + Private clsGroupByFunc, clsRainFilterFunc, clsRunCalcFunc, clsListFunc, clsGroupByMonth, clsListForOutlierManipulations, clsRainyDaysFunc, clsOutlierLimitFunc, clsOutlierLimitCalcFunc As New RFunction 'Large + Private clsLargeTestCalcFunc As New RFunction Private clsLargeOperator, clsOrLargeOperator, clsLargeLessOperator, clsOutlierOperator, clsRainyDaysOperator As New ROperator + Private strLarge As String = "large_test_calculation" + Private clsManipList As New RFunction 'Same Private clsRleFunc, clsRepFunc, clsAsNumericFunc As New RFunction + Private clsSameCalcFunc, clsSameTestFunc As New RFunction Private clsAndOperator, clsDollarOperator, clsGreaterSameOperator As New ROperator + Private strSameCalc As String = "same_calculation" + Private strSameTestCalc As String = "same_test_calculation" + Private clsSameList As New RFunction 'Wetdays Private clsCumSumFuc, clsCumMaxFunc As New RFunction Private clsGreaterOperator, clsMinusOperator, clsMultiplOperator, clsGreatOperator, clsEqualOperator As New ROperator + Private clsCumulativeCalcFunc, clsCumulativeTestFunc As New RFunction + Private strCumulativeCalc As String = "cumulative_calculation" + Private strCumulativeTestCalc As String = "cumulative_test_calculation" + Private clsCumulativeList As New RFunction 'Combined Filters Private clsOrOperator As New ROperator + Private clsListSubCalc As New RFunction Private Sub dlgRain_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -91,13 +103,13 @@ Public Class dlgClimaticCheckDataRain ucrReceiverDate.SetClimaticType("date") ucrReceiverDate.bAutoFill = True - ucrChkLarge.SetParameter(New RParameter("large", clsOrLargeOperator, 1), bNewChangeParameterValue:=False) + ucrChkLarge.SetParameter(New RParameter("large", clsLargeTestCalcFunc, 1), bNewChangeParameterValue:=False) ucrChkLarge.SetText("Large") - ucrChkSame.SetParameter(New RParameter("same", clsGreaterSameOperator, 1), bNewChangeParameterValue:=False) + ucrChkSame.SetParameter(New RParameter("same", clsSameTestFunc, 1), bNewChangeParameterValue:=False) ucrChkSame.SetText("Same") - ucrChkWetDays.SetParameter(New RParameter("wet_days", clsGreatOperator, 1, False), bNewChangeParameterValue:=False) + ucrChkWetDays.SetParameter(New RParameter("wet_days", clsCumulativeTestFunc, 1, False), bNewChangeParameterValue:=False) ucrChkWetDays.SetText("Consecutive") ucrNudSame.SetParameter(New RParameter("right", 1, bNewIncludeArgumentName:=False)) @@ -120,10 +132,19 @@ Public Class dlgClimaticCheckDataRain ucrNudSame.SetLinkedDisplayControl(lblDays) ucrNudWetDays.SetLinkedDisplayControl(lblRainDays) ucrNudSkewnessWeight.SetLinkedDisplayControl(lblSkewnessWeight) + + ucrChkCalculatedColumns.SetText("Calculated columns") + ucrChkCalculatedColumns.SetParameter(New RParameter("save", 4)) + ucrChkCalculatedColumns.SetValuesCheckedAndUnchecked("2", "0") + + ucrChkLogicalColumns.SetText("Logical columns") + ucrChkLogicalColumns.SetParameter(New RParameter("save", 4)) + ucrChkLogicalColumns.SetValuesCheckedAndUnchecked("2", "0") End Sub Private Sub SetDefaults() Dim strLengths As String = "lengths" + Dim strOutlier_Limit As String = "outlier_limit" clsRleFunc = New RFunction clsRepFunc = New RFunction clsAsNumericFunc = New RFunction @@ -133,7 +154,6 @@ Public Class dlgClimaticCheckDataRain clsEqualOperator = New ROperator clsLargeOperator = New ROperator clsLargeLessOperator = New ROperator - Dim strOutlier_Limit As String = "outlier_limit" clsRainyDaysOperator.Clear() clsOutlierOperator.Clear() @@ -141,6 +161,13 @@ Public Class dlgClimaticCheckDataRain clsGreaterSameOperator.Clear() clsGreatOperator.Clear() + clsRainFilterFunc.Clear() + clsLargeTestCalcFunc.Clear() + clsSameCalcFunc.Clear() + clsCumulativeTestFunc.Clear() + clsSameTestFunc.Clear() + clsCumulativeCalcFunc.Clear() + ucrSelectorRain.Reset() ucrReceiverStation.SetMeAsReceiver() @@ -155,56 +182,113 @@ Public Class dlgClimaticCheckDataRain 'Main Filter clsRainFilterFunc.SetRCommand("instat_calculation$new") clsRainFilterFunc.AddParameter("type", Chr(34) & "filter" & Chr(34), iPosition:=0) - clsRainFilterFunc.AddParameter("save", 2) - clsRainFilterFunc.AddParameter("result_data_frame", Chr(34) & "Rainfall_Filter" & Chr(34)) + clsRainFilterFunc.AddParameter("function_exp", clsROperatorParameter:=clsOrOperator, iPosition:=1) + clsRainFilterFunc.AddParameter("sub_calculations", clsRFunctionParameter:=clsListSubCalc, iPosition:=2) + clsRainFilterFunc.AddParameter("manipulations", clsRFunctionParameter:=clsManipList, iPosition:=3) + clsRainFilterFunc.AddParameter("result_data_frame", Chr(34) & "Rainfall_Filter" & Chr(34), iPosition:=4) + clsRainFilterFunc.AddParameter("save", 2, iPosition:=5) clsRainFilterFunc.SetAssignTo("rainfall_filter") + clsListSubCalc.SetRCommand("list") + + clsListSubCalc.SetRCommand("list") + + clsManipList.SetRCommand("list") + clsManipList.AddParameter("manip1", clsRFunctionParameter:=clsGroupByFunc, bIncludeArgumentName:=False) + 'Large clsLargeOperator.SetOperation(">") clsLargeOperator.AddParameter("left", iPosition:=0) clsOrLargeOperator.SetOperation("|") + clsOrLargeOperator.bBrackets = False + clsOrLargeOperator.bToScriptAsRString = True + clsOrLargeOperator.bSpaceAroundOperation = False clsOrLargeOperator.AddParameter("left", bIncludeArgumentName:=False, clsROperatorParameter:=clsLargeOperator, iPosition:=0) clsOrLargeOperator.AddParameter("right", bIncludeArgumentName:=False, clsROperatorParameter:=clsLargeLessOperator, iPosition:=1) clsLargeLessOperator.SetOperation("<") clsLargeLessOperator.AddParameter("right", bIncludeArgumentName:=False, strParameterValue:="-1E-8", iPosition:=1) + clsLargeTestCalcFunc.SetRCommand("instat_calculation$new") + clsLargeTestCalcFunc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) + clsLargeTestCalcFunc.AddParameter("function_exp", clsROperatorParameter:=clsOrLargeOperator, iPosition:=1) + clsLargeTestCalcFunc.AddParameter("result_name", Chr(34) & strLarge & Chr(34)) + clsLargeTestCalcFunc.SetAssignTo("large_test_calculation") + 'Same clsGreaterOperator.SetOperation(">") clsGreaterOperator.AddParameter("y", "0", iPosition:=1, bIncludeArgumentName:=False) clsAndOperator.SetOperation("&") clsAndOperator.bBrackets = False + clsAndOperator.bToScriptAsRString = True clsAndOperator.AddParameter("left", bIncludeArgumentName:=False, clsROperatorParameter:=clsGreaterOperator, iPosition:=0) clsAndOperator.AddParameter("right", bIncludeArgumentName:=False, clsRFunctionParameter:=clsRepFunc, iPosition:=1) clsGreaterSameOperator.SetOperation(">=") clsGreaterSameOperator.bBrackets = False - clsGreaterSameOperator.AddParameter("left", bIncludeArgumentName:=False, clsROperatorParameter:=clsAndOperator, iPosition:=0) + clsGreaterSameOperator.bToScriptAsRString = True + clsGreaterSameOperator.AddParameter("left", bIncludeArgumentName:=False, strParameterValue:=strSameCalc, iPosition:=0) clsAsNumericFunc.SetRCommand("as.numeric") clsRleFunc.SetRCommand("rle") clsRleFunc.AddParameter("numeric", bIncludeArgumentName:=False, clsRFunctionParameter:=clsAsNumericFunc, iPosition:=0) clsDollarOperator.SetOperation("$") + clsDollarOperator.bSpaceAroundOperation = False clsDollarOperator.AddParameter("left", bIncludeArgumentName:=False, clsRFunctionParameter:=clsRleFunc, iPosition:=0) clsDollarOperator.AddParameter("right", bIncludeArgumentName:=False, strParameterValue:=strLengths, iPosition:=1) clsRepFunc.SetRCommand("rep") clsRepFunc.AddParameter("first", bIncludeArgumentName:=False, clsROperatorParameter:=clsDollarOperator, iPosition:=0) clsRepFunc.AddParameter("second", bIncludeArgumentName:=False, clsROperatorParameter:=clsDollarOperator, iPosition:=1) + clsSameCalcFunc.SetRCommand("instat_calculation$new") + clsSameCalcFunc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) + clsSameCalcFunc.AddParameter("function_exp", clsROperatorParameter:=clsAndOperator, iPosition:=1) + clsSameCalcFunc.AddParameter("result_name", Chr(34) & strSameCalc & Chr(34)) + clsSameCalcFunc.SetAssignTo("same_calculation") + + clsSameTestFunc.SetRCommand("instat_calculation$new") + clsSameTestFunc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) + clsSameTestFunc.AddParameter("function_exp", clsROperatorParameter:=clsGreaterSameOperator, iPosition:=1) + clsSameTestFunc.AddParameter("sub_calculations", clsRFunctionParameter:=clsSameList, iPosition:=2) + clsSameTestFunc.AddParameter("result_name", Chr(34) & strSameTestCalc & Chr(34)) + clsSameTestFunc.SetAssignTo("same_test_calculation") + + clsSameList.SetRCommand("list") + clsSameList.AddParameter("sub1", clsRFunctionParameter:=clsSameCalcFunc, bIncludeArgumentName:=False) + 'Wet clsEqualOperator.SetOperation("==") clsEqualOperator.AddParameter("left", bIncludeArgumentName:=False, clsROperatorParameter:=clsGreaterOperator, iPosition:=0) clsEqualOperator.AddParameter("right", "0", bIncludeArgumentName:=False, iPosition:=1) clsCumSumFuc.SetRCommand("cumsum") clsGreatOperator.SetOperation(">") - clsGreatOperator.AddParameter("left", bIncludeArgumentName:=False, clsROperatorParameter:=clsMinusOperator, iPosition:=0) + clsGreatOperator.bToScriptAsRString = True + clsGreatOperator.AddParameter("left", bIncludeArgumentName:=False, strParameterValue:=strCumulativeCalc, iPosition:=0) clsMinusOperator.SetOperation("-") + clsMinusOperator.bToScriptAsRString = True clsMinusOperator.AddParameter("left", bIncludeArgumentName:=False, clsRFunctionParameter:=clsCumSumFuc, iPosition:=0) clsMinusOperator.AddParameter("right", bIncludeArgumentName:=False, clsRFunctionParameter:=clsCumMaxFunc, iPosition:=1) clsCumMaxFunc.SetRCommand("cummax") clsCumMaxFunc.AddParameter("right", bIncludeArgumentName:=False, clsROperatorParameter:=clsMultiplOperator, iPosition:=0) clsMultiplOperator.SetOperation("*") + clsMultiplOperator.bSpaceAroundOperation = False clsMultiplOperator.AddParameter("left", bIncludeArgumentName:=False, clsROperatorParameter:=clsEqualOperator, iPosition:=0) clsMultiplOperator.AddParameter("right", bIncludeArgumentName:=False, clsRFunctionParameter:=clsCumSumFuc, iPosition:=1) clsCumSumFuc.AddParameter("x", bIncludeArgumentName:=False, clsROperatorParameter:=clsGreaterOperator, iPosition:=0) + clsCumulativeCalcFunc.SetRCommand("instat_calculation$new") + clsCumulativeCalcFunc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) + clsCumulativeCalcFunc.AddParameter("function_exp", clsROperatorParameter:=clsMinusOperator, iPosition:=1) + clsCumulativeCalcFunc.AddParameter("result_name", Chr(34) & strCumulativeCalc & Chr(34)) + clsCumulativeCalcFunc.SetAssignTo("cumulative_calculation") + + clsCumulativeTestFunc.SetRCommand("instat_calculation$new") + clsCumulativeTestFunc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) + clsCumulativeTestFunc.AddParameter("function_exp", clsROperatorParameter:=clsGreatOperator, iPosition:=1) + clsCumulativeTestFunc.AddParameter("sub_calculations", clsRFunctionParameter:=clsCumulativeList, iPosition:=2) + clsCumulativeTestFunc.AddParameter("result_name", Chr(34) & strCumulativeTestCalc & Chr(34)) + clsCumulativeTestFunc.SetAssignTo("cumulative_test_calculation") + + clsCumulativeList.SetRCommand("list") + clsCumulativeList.AddParameter("sub1", clsRFunctionParameter:=clsCumulativeCalcFunc, bIncludeArgumentName:=False) + 'Group By Month clsGroupByMonth.SetRCommand("instat_calculation$new") clsGroupByMonth.AddParameter("type", Chr(34) & "by" & Chr(34), iPosition:=0) @@ -236,9 +320,6 @@ Public Class dlgClimaticCheckDataRain clsOutlierLimitFunc.SetRCommand("summary_outlier_limit") clsOutlierLimitFunc.bToScriptAsRString = True - clsListSubCalc.SetRCommand("list") - clsListSubCalc.AddParameter("sub1", clsRFunctionParameter:=clsOutlierLimitCalcFunc, bIncludeArgumentName:=False, iPosition:=0) - 'Outlier Operator clsOutlierOperator.SetOperation(">") clsOutlierOperator.AddParameter("right", strOutlier_Limit, iPosition:=1) @@ -248,8 +329,6 @@ Public Class dlgClimaticCheckDataRain clsOrOperator.bBrackets = True clsOrOperator.bToScriptAsRString = True - clsRainFilterFunc.AddParameter("function_exp", clsROperatorParameter:=clsOrOperator, iPosition:=1) - ' Run Calc funct clsRunCalcFunc.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$run_instat_calculation") clsRunCalcFunc.AddParameter("calc", clsRFunctionParameter:=clsRainFilterFunc) @@ -266,6 +345,16 @@ Public Class dlgClimaticCheckDataRain ucrReceiverElement.AddAdditionalCodeParameterPair(clsRainyDaysOperator, New RParameter("left", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=6) ucrReceiverElement.SetRCode(clsLargeOperator, bReset) + ucrChkLarge.AddAdditionalCodeParameterPair(clsListSubCalc, New RParameter("large", strParamValue:=clsLargeTestCalcFunc, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) + ucrChkSame.AddAdditionalCodeParameterPair(clsListSubCalc, New RParameter("same", strParamValue:=clsSameTestFunc, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) + ucrChkWetDays.AddAdditionalCodeParameterPair(clsListSubCalc, New RParameter("wet_days", strParamValue:=clsCumulativeTestFunc, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) + ucrChkOutlier.AddAdditionalCodeParameterPair(clsListSubCalc, New RParameter("outer", strParamValue:=clsOutlierLimitCalcFunc, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) + + ucrChkCalculatedColumns.AddAdditionalCodeParameterPair(clsCumulativeCalcFunc, New RParameter("save"), iAdditionalPairNo:=1) + + ucrChkLogicalColumns.AddAdditionalCodeParameterPair(clsSameTestFunc, New RParameter("save"), iAdditionalPairNo:=1) + ucrChkLogicalColumns.AddAdditionalCodeParameterPair(clsCumulativeTestFunc, New RParameter("save"), iAdditionalPairNo:=2) + ucrNudLarge.SetRCode(clsLargeOperator, bReset) ucrNudSame.SetRCode(clsGreaterSameOperator, bReset) ucrNudWetDays.SetRCode(clsGreatOperator, bReset) @@ -277,6 +366,9 @@ Public Class dlgClimaticCheckDataRain ucrChkOutlier.SetRCode(clsOrOperator, bReset) ucrChkSkewedData.SetRCode(clsOutlierLimitFunc, bReset) ucrNudSkewnessWeight.SetRCode(clsOutlierLimitFunc, bReset) + + ucrChkLogicalColumns.SetRCode(clsLargeTestCalcFunc, bReset) + ucrChkCalculatedColumns.SetRCode(clsSameCalcFunc, bReset) End Sub Private Sub TestOkEnabled() @@ -287,12 +379,15 @@ Public Class dlgClimaticCheckDataRain End If End Sub + Private Sub CalculatedFromCalc() + clsLargeTestCalcFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) + clsSameCalcFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "= " & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) + clsCumulativeCalcFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "= " & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) + End Sub + Private Sub GroupByOptions() If Not ucrReceiverStation.IsEmpty Then clsGroupByFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverStation.GetVariableNames & ")", iPosition:=1) - clsRainFilterFunc.AddParameter("manipulations", clsRFunctionParameter:=clsListFunc, iPosition:=4) - Else - clsRainFilterFunc.RemoveParameterByName("manipulations") End If End Sub @@ -305,15 +400,6 @@ Public Class dlgClimaticCheckDataRain End If End Sub - Private Sub FilterFunction() - clsRainFilterFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) - If ucrChkOutlier.Checked Then - clsRainFilterFunc.AddParameter("sub_calculations", clsRFunctionParameter:=clsListSubCalc, iPosition:=5) - Else - clsRainFilterFunc.RemoveParameterByName("sub_calculations") - End If - End Sub - Private Sub RainyDays() clsRainyDaysFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) End Sub @@ -336,7 +422,6 @@ Public Class dlgClimaticCheckDataRain Private Sub ucrSelectorRain_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorRain.ControlValueChanged strCurrDataName = Chr(34) & ucrSelectorRain.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34) GroupByOptions() - FilterFunction() GroupByMonth() RainyDays() OutlierLimitCalc() @@ -344,9 +429,9 @@ Public Class dlgClimaticCheckDataRain End Sub Private Sub ucrReceiverElement_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlValueChanged, ucrNudLarge.ControlValueChanged - FilterFunction() RainyDays() OutlierLimitCalc() + CalculatedFromCalc() End Sub Private Sub AutoFillRainColumn() @@ -363,6 +448,5 @@ Public Class dlgClimaticCheckDataRain Private Sub ucrReceiverElement_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrChkLarge.ControlContentsChanged, ucrChkSame.ControlContentsChanged, ucrChkWetDays.ControlContentsChanged, ucrNudLarge.ControlContentsChanged, ucrNudSame.ControlContentsChanged, ucrNudWetDays.ControlContentsChanged, ucrChkOutlier.ControlContentsChanged, ucrChkSkewedData.ControlContentsChanged TestOkEnabled() - FilterFunction() End Sub End Class \ No newline at end of file From 48d893d90c6fb3846c84a8449a8f89437a3e5ca7 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 30 May 2018 16:46:48 +0300 Subject: [PATCH 6/9] adding Beth's code on outliers --- instat/dlgClimaticCheckDataRain.Designer.vb | 39 ++++- instat/dlgClimaticCheckDataRain.resx | 181 +++++++++++++------- instat/dlgClimaticCheckDataRain.vb | 55 ++++-- 3 files changed, 188 insertions(+), 87 deletions(-) diff --git a/instat/dlgClimaticCheckDataRain.Designer.vb b/instat/dlgClimaticCheckDataRain.Designer.vb index f1d6385c2f7..b227277f9d3 100644 --- a/instat/dlgClimaticCheckDataRain.Designer.vb +++ b/instat/dlgClimaticCheckDataRain.Designer.vb @@ -34,10 +34,12 @@ Partial Class dlgClimaticCheckDataRain Me.lblRainDays = New System.Windows.Forms.Label() Me.lblSkewnessWeight = New System.Windows.Forms.Label() Me.grpLogicalCalculatedColumns = New System.Windows.Forms.GroupBox() + Me.lblCoeff = New System.Windows.Forms.Label() + Me.ucrNudCoeff = New instat.ucrNud() + Me.ucrChkOmitZero = New instat.ucrCheck() Me.ucrChkCalculatedColumns = New instat.ucrCheck() Me.ucrChkLogicalColumns = New instat.ucrCheck() Me.ucrNudSkewnessWeight = New instat.ucrNud() - Me.ucrChkSkewedData = New instat.ucrCheck() Me.ucrNudWetDays = New instat.ucrNud() Me.ucrNudSame = New instat.ucrNud() Me.ucrNudLarge = New instat.ucrNud() @@ -112,6 +114,27 @@ Partial Class dlgClimaticCheckDataRain Me.grpLogicalCalculatedColumns.Name = "grpLogicalCalculatedColumns" Me.grpLogicalCalculatedColumns.TabStop = False ' + 'lblCoeff + ' + resources.ApplyResources(Me.lblCoeff, "lblCoeff") + Me.lblCoeff.Name = "lblCoeff" + ' + 'ucrNudCoeff + ' + Me.ucrNudCoeff.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudCoeff.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudCoeff, "ucrNudCoeff") + Me.ucrNudCoeff.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudCoeff.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudCoeff.Name = "ucrNudCoeff" + Me.ucrNudCoeff.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrChkOmitZero + ' + Me.ucrChkOmitZero.Checked = False + resources.ApplyResources(Me.ucrChkOmitZero, "ucrChkOmitZero") + Me.ucrChkOmitZero.Name = "ucrChkOmitZero" + ' 'ucrChkCalculatedColumns ' Me.ucrChkCalculatedColumns.Checked = False @@ -134,12 +157,6 @@ Partial Class dlgClimaticCheckDataRain Me.ucrNudSkewnessWeight.Name = "ucrNudSkewnessWeight" Me.ucrNudSkewnessWeight.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrChkSkewedData - ' - Me.ucrChkSkewedData.Checked = False - resources.ApplyResources(Me.ucrChkSkewedData, "ucrChkSkewedData") - Me.ucrChkSkewedData.Name = "ucrChkSkewedData" - ' 'ucrNudWetDays ' Me.ucrNudWetDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -271,11 +288,13 @@ Partial Class dlgClimaticCheckDataRain ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.lblCoeff) + Me.Controls.Add(Me.ucrNudCoeff) + Me.Controls.Add(Me.ucrChkOmitZero) Me.Controls.Add(Me.ucrChkCalculatedColumns) Me.Controls.Add(Me.ucrChkLogicalColumns) Me.Controls.Add(Me.lblSkewnessWeight) Me.Controls.Add(Me.ucrNudSkewnessWeight) - Me.Controls.Add(Me.ucrChkSkewedData) Me.Controls.Add(Me.lblRainDays) Me.Controls.Add(Me.lblDays) Me.Controls.Add(Me.lblmm) @@ -336,10 +355,12 @@ Partial Class dlgClimaticCheckDataRain Friend WithEvents lblmm As Label Friend WithEvents lblDays As Label Friend WithEvents lblRainDays As Label - Friend WithEvents ucrChkSkewedData As ucrCheck Friend WithEvents lblSkewnessWeight As Label Friend WithEvents ucrNudSkewnessWeight As ucrNud Friend WithEvents ucrChkCalculatedColumns As ucrCheck Friend WithEvents ucrChkLogicalColumns As ucrCheck Friend WithEvents grpLogicalCalculatedColumns As GroupBox + Friend WithEvents ucrChkOmitZero As ucrCheck + Friend WithEvents lblCoeff As Label + Friend WithEvents ucrNudCoeff As ucrNud End Class diff --git a/instat/dlgClimaticCheckDataRain.resx b/instat/dlgClimaticCheckDataRain.resx index bd8171efbd5..205004f4816 100644 --- a/instat/dlgClimaticCheckDataRain.resx +++ b/instat/dlgClimaticCheckDataRain.resx @@ -148,7 +148,7 @@ $this - 27 + 29 True @@ -178,7 +178,7 @@ $this - 25 + 27 True @@ -208,7 +208,7 @@ $this - 24 + 26 True @@ -238,7 +238,7 @@ $this - 22 + 24 True @@ -268,7 +268,7 @@ $this - 19 + 21 True @@ -298,7 +298,7 @@ $this - 21 + 23 NoControl @@ -325,7 +325,7 @@ $this - 7 + 9 True @@ -355,7 +355,7 @@ $this - 6 + 8 True @@ -385,7 +385,7 @@ $this - 5 + 7 True @@ -394,13 +394,13 @@ NoControl - 227, 324 + 228, 324 96, 13 - 27 + 25 Skewness Weight: @@ -415,16 +415,16 @@ $this - 2 + 5 - 10, 347 + 10, 370 399, 55 - 30 + 29 Include in Original Data @@ -439,16 +439,88 @@ $this - 30 + 32 + + + True + + + NoControl + + + 289, 350 + + + 35, 13 + + + 27 + + + Coeff: + + + lblCoeff + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + 327, 347 + + + 50, 20 + + + 28 + + + ucrNudCoeff + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 1 + + + 116, 321 + + + 113, 20 + + + 24 + + + ucrChkOmitZero + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 2 - 230, 370 + 237, 393 - 152, 20 + 163, 20 - 29 + 31 ucrChkCalculatedColumns @@ -460,16 +532,16 @@ $this - 0 + 3 - 23, 370 + 23, 393 - 171, 20 + 185, 20 - 28 + 30 ucrChkLogicalColumns @@ -481,10 +553,10 @@ $this - 1 + 4 - 329, 323 + 327, 320 50, 20 @@ -502,28 +574,7 @@ $this - 3 - - - 106, 323 - - - 100, 20 - - - 25 - - - ucrChkSkewedData - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 4 + 6 106, 269 @@ -544,7 +595,7 @@ $this - 8 + 10 106, 242 @@ -565,7 +616,7 @@ $this - 9 + 11 106, 215 @@ -586,7 +637,7 @@ $this - 10 + 12 10, 323 @@ -607,7 +658,7 @@ $this - 11 + 13 10, 296 @@ -628,7 +679,7 @@ $this - 12 + 14 10, 269 @@ -649,7 +700,7 @@ $this - 13 + 15 10, 242 @@ -670,7 +721,7 @@ $this - 14 + 16 10, 215 @@ -691,7 +742,7 @@ $this - 15 + 17 True @@ -700,7 +751,7 @@ 6, 13 - 421, 466 + 421, 489 262, 255 @@ -724,7 +775,7 @@ $this - 17 + 19 262, 211 @@ -748,7 +799,7 @@ $this - 18 + 20 262, 123 @@ -772,7 +823,7 @@ $this - 20 + 22 262, 79 @@ -796,7 +847,7 @@ $this - 23 + 25 262, 35 @@ -820,7 +871,7 @@ $this - 26 + 28 10, 20 @@ -844,16 +895,16 @@ $this - 28 + 30 - 10, 408 + 10, 430 410, 52 - 24 + 32 ucrBase @@ -865,7 +916,7 @@ $this - 29 + 31 CenterScreen @@ -901,6 +952,6 @@ $this - 16 + 18 \ No newline at end of file diff --git a/instat/dlgClimaticCheckDataRain.vb b/instat/dlgClimaticCheckDataRain.vb index 4fb9b5b3fc9..5e7560287ec 100644 --- a/instat/dlgClimaticCheckDataRain.vb +++ b/instat/dlgClimaticCheckDataRain.vb @@ -14,6 +14,7 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . +Imports instat Imports instat.Translations Public Class dlgClimaticCheckDataRain Private bFirstload As Boolean = True @@ -70,10 +71,8 @@ Public Class dlgClimaticCheckDataRain 'temp disabled untill implemented ucrChkDryMonth.SetText("Dry Month") ucrChkDryMonth.Enabled = False - ucrChkOutlier.SetText("Outlier") - ucrChkOutlier.Checked = False - ucrChkSkewedData.SetText("Skewed Data") - ucrChkSkewedData.Checked = False + ucrChkOmitZero.Checked = True + ucrReceiverStation.Selector = ucrSelectorRain ucrReceiverStation.SetClimaticType("station") @@ -116,22 +115,35 @@ Public Class dlgClimaticCheckDataRain ucrNudWetDays.SetParameter(New RParameter("right", 1, bNewIncludeArgumentName:=False)) ucrChkOutlier.SetParameter(New RParameter("outlier.limit", clsOutlierOperator, 1, False), bNewChangeParameterValue:=False) - ucrChkSkewedData.SetParameter(New RParameter("bskewedcalc", 3), bNewChangeParameterValue:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") - ucrChkSkewedData.SetRDefault("FALSE") + + ucrChkOutlier.SetText("Outlier") + + ucrNudCoeff.SetParameter(New RParameter("coeff")) + ucrNudCoeff.DecimalPlaces = 1 + ucrNudCoeff.Increment = 0.1 + ucrNudCoeff.SetRDefault("1.5") + ucrNudSkewnessWeight.SetParameter(New RParameter("skewnessweight", 4)) + ucrNudSkewnessWeight.DecimalPlaces = 1 + ucrNudSkewnessWeight.Increment = 0.1 + ucrNudSkewnessWeight.SetRDefault("4") + ucrChkOmitZero.SetText("Omit Zero") + 'Linking of controls ucrChkLarge.AddToLinkedControls(ucrNudLarge, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=200) ucrChkSame.AddToLinkedControls(ucrNudSame, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=2) ucrChkWetDays.AddToLinkedControls(ucrNudWetDays, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=10) - ucrChkOutlier.AddToLinkedControls(ucrChkSkewedData, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) - ucrChkSkewedData.AddToLinkedControls(ucrNudSkewnessWeight, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) + ucrChkOutlier.AddToLinkedControls(ucrChkOmitZero, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ucrChkOutlier.AddToLinkedControls(ucrNudCoeff, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1.5) + ucrChkOutlier.AddToLinkedControls(ucrNudSkewnessWeight, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=4) ucrNudLarge.SetLinkedDisplayControl(lblmm) ucrNudSame.SetLinkedDisplayControl(lblDays) ucrNudWetDays.SetLinkedDisplayControl(lblRainDays) ucrNudSkewnessWeight.SetLinkedDisplayControl(lblSkewnessWeight) + ucrNudCoeff.SetLinkedDisplayControl(lblCoeff) ucrChkCalculatedColumns.SetText("Calculated columns") ucrChkCalculatedColumns.SetParameter(New RParameter("save", 4)) @@ -191,8 +203,6 @@ Public Class dlgClimaticCheckDataRain clsListSubCalc.SetRCommand("list") - clsListSubCalc.SetRCommand("list") - clsManipList.SetRCommand("list") clsManipList.AddParameter("manip1", clsRFunctionParameter:=clsGroupByFunc, bIncludeArgumentName:=False) @@ -319,6 +329,7 @@ Public Class dlgClimaticCheckDataRain clsOutlierLimitCalcFunc.SetAssignTo("outlier_limit") clsOutlierLimitFunc.SetRCommand("summary_outlier_limit") clsOutlierLimitFunc.bToScriptAsRString = True + clsOutlierLimitFunc.AddParameter("bskewedcalc", "TRUE") 'Outlier Operator clsOutlierOperator.SetOperation(">") @@ -362,9 +373,10 @@ Public Class dlgClimaticCheckDataRain ucrChkLarge.SetRCode(clsOrOperator, bReset) ucrChkSame.SetRCode(clsOrOperator, bReset) ucrChkWetDays.SetRCode(clsOrOperator, bReset) + ucrChkOmitZero.SetRCode(clsRainyDaysFunc) + ucrNudCoeff.SetRCode(clsOutlierLimitFunc, bReset) ucrChkOutlier.SetRCode(clsOrOperator, bReset) - ucrChkSkewedData.SetRCode(clsOutlierLimitFunc, bReset) ucrNudSkewnessWeight.SetRCode(clsOutlierLimitFunc, bReset) ucrChkLogicalColumns.SetRCode(clsLargeTestCalcFunc, bReset) @@ -372,13 +384,30 @@ Public Class dlgClimaticCheckDataRain End Sub Private Sub TestOkEnabled() - If Not ucrReceiverElement.IsEmpty AndAlso ((ucrChkLarge.Checked AndAlso ucrNudLarge.GetText <> "") OrElse (ucrChkSame.Checked AndAlso ucrNudSame.GetText <> "") OrElse (ucrChkWetDays.Checked AndAlso ucrNudWetDays.GetText <> "") OrElse (ucrChkOutlier.Checked) OrElse (ucrChkSkewedData.Checked AndAlso ucrNudSkewnessWeight.GetText <> "")) Then + If Not ucrReceiverElement.IsEmpty AndAlso ((ucrChkLarge.Checked AndAlso ucrNudLarge.GetText <> "") OrElse (ucrChkSame.Checked AndAlso ucrNudSame.GetText <> "") OrElse (ucrChkWetDays.Checked AndAlso ucrNudWetDays.GetText <> "") OrElse (ucrChkOutlier.Checked AndAlso ucrNudSkewnessWeight.GetText <> "" AndAlso ucrNudCoeff.GetText <> "")) OrElse ucrChkOmitZero.Checked Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) End If End Sub + Private Sub OmitZero() + If ucrChkOmitZero.Checked Then + clsRainyDaysFunc.AddParameter("type", Chr(34) & "filter" & Chr(34), iPosition:=0) + clsRainyDaysFunc.AddParameter("function_exp", clsROperatorParameter:=clsRainyDaysOperator, iPosition:=0) + clsListForOutlierManipulations.AddParameter("sub2", clsRFunctionParameter:=clsRainyDaysFunc, bIncludeArgumentName:=False, iPosition:=1) + Else + clsRainyDaysFunc.RemoveParameterByName("type") + clsRainyDaysFunc.RemoveParameterByName("function_exp") + clsListForOutlierManipulations.RemoveParameterByName("sub2") + End If + + End Sub + + Private Sub ucrChkOmitZero_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkOmitZero.ControlValueChanged + OmitZero() + End Sub + Private Sub CalculatedFromCalc() clsLargeTestCalcFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) clsSameCalcFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "= " & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) @@ -446,7 +475,7 @@ Public Class dlgClimaticCheckDataRain End If End Sub - Private Sub ucrReceiverElement_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrChkLarge.ControlContentsChanged, ucrChkSame.ControlContentsChanged, ucrChkWetDays.ControlContentsChanged, ucrNudLarge.ControlContentsChanged, ucrNudSame.ControlContentsChanged, ucrNudWetDays.ControlContentsChanged, ucrChkOutlier.ControlContentsChanged, ucrChkSkewedData.ControlContentsChanged + Private Sub ucrReceiverElement_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrChkLarge.ControlContentsChanged, ucrChkSame.ControlContentsChanged, ucrChkWetDays.ControlContentsChanged, ucrNudLarge.ControlContentsChanged, ucrNudSame.ControlContentsChanged, ucrNudWetDays.ControlContentsChanged, ucrChkOutlier.ControlContentsChanged TestOkEnabled() End Sub End Class \ No newline at end of file From a93adf5d6ba2d33116e346ac0dcf07bdbd507787 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 30 May 2018 17:22:50 +0300 Subject: [PATCH 7/9] changing column names for both calculated and logical columns --- instat/dlgClimaticCheckDataRain.vb | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/instat/dlgClimaticCheckDataRain.vb b/instat/dlgClimaticCheckDataRain.vb index 5e7560287ec..289e35f4cff 100644 --- a/instat/dlgClimaticCheckDataRain.vb +++ b/instat/dlgClimaticCheckDataRain.vb @@ -14,34 +14,32 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . -Imports instat Imports instat.Translations Public Class dlgClimaticCheckDataRain Private bFirstload As Boolean = True Private bReset As Boolean = True Private strCurrDataName As String = "" - Private strRain As String = "Rain" 'Large/Same/wetdays Private clsGroupByFunc, clsRainFilterFunc, clsRunCalcFunc, clsListFunc, clsGroupByMonth, clsListForOutlierManipulations, clsRainyDaysFunc, clsOutlierLimitFunc, clsOutlierLimitCalcFunc As New RFunction 'Large Private clsLargeTestCalcFunc As New RFunction Private clsLargeOperator, clsOrLargeOperator, clsLargeLessOperator, clsOutlierOperator, clsRainyDaysOperator As New ROperator - Private strLarge As String = "large_test_calculation" Private clsManipList As New RFunction + Private strLargeTest As String = "Large" 'Same Private clsRleFunc, clsRepFunc, clsAsNumericFunc As New RFunction Private clsSameCalcFunc, clsSameTestFunc As New RFunction Private clsAndOperator, clsDollarOperator, clsGreaterSameOperator As New ROperator - Private strSameCalc As String = "same_calculation" - Private strSameTestCalc As String = "same_test_calculation" Private clsSameList As New RFunction + Private strSameCalc As String = "same" + Private strSameTestCalc As String = "Same" 'Wetdays Private clsCumSumFuc, clsCumMaxFunc As New RFunction Private clsGreaterOperator, clsMinusOperator, clsMultiplOperator, clsGreatOperator, clsEqualOperator As New ROperator Private clsCumulativeCalcFunc, clsCumulativeTestFunc As New RFunction - Private strCumulativeCalc As String = "cumulative_calculation" - Private strCumulativeTestCalc As String = "cumulative_test_calculation" Private clsCumulativeList As New RFunction + Private strCumulativeCalc As String = "Wet_days" + Private strCumulativeTestCalc As String = "wet_days" 'Combined Filters Private clsOrOperator As New ROperator Private clsListSubCalc As New RFunction @@ -102,23 +100,22 @@ Public Class dlgClimaticCheckDataRain ucrReceiverDate.SetClimaticType("date") ucrReceiverDate.bAutoFill = True - ucrChkLarge.SetParameter(New RParameter("large", clsLargeTestCalcFunc, 1), bNewChangeParameterValue:=False) + ucrChkLarge.SetParameter(New RParameter("large", strLargeTest, 1), bNewChangeParameterValue:=False) ucrChkLarge.SetText("Large") - ucrChkSame.SetParameter(New RParameter("same", clsSameTestFunc, 1), bNewChangeParameterValue:=False) + ucrChkSame.SetParameter(New RParameter("same", strSameTestCalc, 1), bNewChangeParameterValue:=False) ucrChkSame.SetText("Same") - ucrChkWetDays.SetParameter(New RParameter("wet_days", clsCumulativeTestFunc, 1, False), bNewChangeParameterValue:=False) + ucrChkWetDays.SetParameter(New RParameter("wet_days", strCumulativeTestCalc, 1, False), bNewChangeParameterValue:=False) ucrChkWetDays.SetText("Consecutive") ucrNudSame.SetParameter(New RParameter("right", 1, bNewIncludeArgumentName:=False)) ucrNudWetDays.SetParameter(New RParameter("right", 1, bNewIncludeArgumentName:=False)) ucrChkOutlier.SetParameter(New RParameter("outlier.limit", clsOutlierOperator, 1, False), bNewChangeParameterValue:=False) - ucrChkOutlier.SetText("Outlier") - ucrNudCoeff.SetParameter(New RParameter("coeff")) + ucrNudCoeff.SetParameter(New RParameter("coeff", 1)) ucrNudCoeff.DecimalPlaces = 1 ucrNudCoeff.Increment = 0.1 ucrNudCoeff.SetRDefault("1.5") @@ -126,7 +123,6 @@ Public Class dlgClimaticCheckDataRain ucrNudSkewnessWeight.SetParameter(New RParameter("skewnessweight", 4)) ucrNudSkewnessWeight.DecimalPlaces = 1 ucrNudSkewnessWeight.Increment = 0.1 - ucrNudSkewnessWeight.SetRDefault("4") ucrChkOmitZero.SetText("Omit Zero") @@ -221,7 +217,7 @@ Public Class dlgClimaticCheckDataRain clsLargeTestCalcFunc.SetRCommand("instat_calculation$new") clsLargeTestCalcFunc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) clsLargeTestCalcFunc.AddParameter("function_exp", clsROperatorParameter:=clsOrLargeOperator, iPosition:=1) - clsLargeTestCalcFunc.AddParameter("result_name", Chr(34) & strLarge & Chr(34)) + clsLargeTestCalcFunc.AddParameter("result_name", Chr(34) & strLargeTest & Chr(34)) clsLargeTestCalcFunc.SetAssignTo("large_test_calculation") 'Same From 53b6dcde6459b4bc8d173a8dbe61c1ae0cbb978a Mon Sep 17 00:00:00 2001 From: Lazarus Kioko Muthenya Date: Thu, 31 May 2018 09:48:15 +0300 Subject: [PATCH 8/9] design fixing --- instat/dlgDuplicateColumns.Designer.vb | 38 +-- instat/dlgDuplicateColumns.resx | 447 +++++++++---------------- 2 files changed, 178 insertions(+), 307 deletions(-) diff --git a/instat/dlgDuplicateColumns.Designer.vb b/instat/dlgDuplicateColumns.Designer.vb index fb6b58043b2..3488633b4c0 100644 --- a/instat/dlgDuplicateColumns.Designer.vb +++ b/instat/dlgDuplicateColumns.Designer.vb @@ -46,6 +46,7 @@ Partial Class dlgDuplicateColumns Me.rdoEnd = New System.Windows.Forms.RadioButton() Me.rdoAfter = New System.Windows.Forms.RadioButton() Me.rdoBeginning = New System.Windows.Forms.RadioButton() + Me.ucrPnlDuplicateColPosition = New instat.UcrPanel() Me.grpConvertTo = New System.Windows.Forms.GroupBox() Me.rdoConvertToLogical = New System.Windows.Forms.RadioButton() Me.rdoConvertToCharacter = New System.Windows.Forms.RadioButton() @@ -53,22 +54,21 @@ Partial Class dlgDuplicateColumns Me.rdoConvertToNumeric = New System.Windows.Forms.RadioButton() Me.rdoConvertToOrderedFactor = New System.Windows.Forms.RadioButton() Me.rdoConvertToFactor = New System.Windows.Forms.RadioButton() + Me.ucrPnlConvertTo = New instat.UcrPanel() Me.grpFactorToNumericOptions = New System.Windows.Forms.GroupBox() Me.rdoConvertDefault = New System.Windows.Forms.RadioButton() Me.rdoConvertOrdinals = New System.Windows.Forms.RadioButton() Me.rdoConvertLevels = New System.Windows.Forms.RadioButton() + Me.ucrPnlConvertFactorToNumericOptions = New instat.UcrPanel() Me.ucrChkChangeType = New instat.ucrCheck() Me.ucrChkConvertCreateLabels = New instat.ucrCheck() Me.ucrChkConvertKeepAttributes = New instat.ucrCheck() Me.ucrNudConvertDisplayDecimals = New instat.ucrNud() Me.ucrChkConvertSpecifyDecimalsToDisplay = New instat.ucrCheck() - Me.ucrPnlConvertFactorToNumericOptions = New instat.UcrPanel() - Me.ucrPnlConvertTo = New instat.UcrPanel() Me.ucrInputDuplicateColumnName = New instat.ucrInputComboBox() Me.ucrReceiverDuplicateColumns = New instat.ucrReceiverSingle() Me.ucrSelectorForDuplicateColumn = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrPnlDuplicateColPosition = New instat.UcrPanel() Me.grpDuplicatedColumn.SuspendLayout() Me.grpConvertTo.SuspendLayout() Me.grpFactorToNumericOptions.SuspendLayout() @@ -123,6 +123,11 @@ Partial Class dlgDuplicateColumns Me.rdoBeginning.TabStop = True Me.rdoBeginning.UseVisualStyleBackColor = True ' + 'ucrPnlDuplicateColPosition + ' + resources.ApplyResources(Me.ucrPnlDuplicateColPosition, "ucrPnlDuplicateColPosition") + Me.ucrPnlDuplicateColPosition.Name = "ucrPnlDuplicateColPosition" + ' 'grpConvertTo ' Me.grpConvertTo.Controls.Add(Me.rdoConvertToLogical) @@ -178,6 +183,11 @@ Partial Class dlgDuplicateColumns Me.rdoConvertToFactor.TabStop = True Me.rdoConvertToFactor.UseVisualStyleBackColor = True ' + 'ucrPnlConvertTo + ' + resources.ApplyResources(Me.ucrPnlConvertTo, "ucrPnlConvertTo") + Me.ucrPnlConvertTo.Name = "ucrPnlConvertTo" + ' 'grpFactorToNumericOptions ' Me.grpFactorToNumericOptions.Controls.Add(Me.rdoConvertDefault) @@ -209,6 +219,11 @@ Partial Class dlgDuplicateColumns Me.rdoConvertLevels.TabStop = True Me.rdoConvertLevels.UseVisualStyleBackColor = True ' + 'ucrPnlConvertFactorToNumericOptions + ' + resources.ApplyResources(Me.ucrPnlConvertFactorToNumericOptions, "ucrPnlConvertFactorToNumericOptions") + Me.ucrPnlConvertFactorToNumericOptions.Name = "ucrPnlConvertFactorToNumericOptions" + ' 'ucrChkChangeType ' Me.ucrChkChangeType.Checked = False @@ -243,16 +258,6 @@ Partial Class dlgDuplicateColumns resources.ApplyResources(Me.ucrChkConvertSpecifyDecimalsToDisplay, "ucrChkConvertSpecifyDecimalsToDisplay") Me.ucrChkConvertSpecifyDecimalsToDisplay.Name = "ucrChkConvertSpecifyDecimalsToDisplay" ' - 'ucrPnlConvertFactorToNumericOptions - ' - resources.ApplyResources(Me.ucrPnlConvertFactorToNumericOptions, "ucrPnlConvertFactorToNumericOptions") - Me.ucrPnlConvertFactorToNumericOptions.Name = "ucrPnlConvertFactorToNumericOptions" - ' - 'ucrPnlConvertTo - ' - resources.ApplyResources(Me.ucrPnlConvertTo, "ucrPnlConvertTo") - Me.ucrPnlConvertTo.Name = "ucrPnlConvertTo" - ' 'ucrInputDuplicateColumnName ' Me.ucrInputDuplicateColumnName.AddQuotesIfUnrecognised = True @@ -282,11 +287,6 @@ Partial Class dlgDuplicateColumns resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' - 'ucrPnlDuplicateColPosition - ' - resources.ApplyResources(Me.ucrPnlDuplicateColPosition, "ucrPnlDuplicateColPosition") - Me.ucrPnlDuplicateColPosition.Name = "ucrPnlDuplicateColPosition" - ' 'dlgDuplicateColumns ' resources.ApplyResources(Me, "$this") @@ -295,9 +295,9 @@ Partial Class dlgDuplicateColumns Me.Controls.Add(Me.ucrChkConvertCreateLabels) Me.Controls.Add(Me.ucrChkConvertKeepAttributes) Me.Controls.Add(Me.ucrNudConvertDisplayDecimals) - Me.Controls.Add(Me.ucrChkConvertSpecifyDecimalsToDisplay) Me.Controls.Add(Me.grpFactorToNumericOptions) Me.Controls.Add(Me.grpConvertTo) + Me.Controls.Add(Me.ucrChkConvertSpecifyDecimalsToDisplay) Me.Controls.Add(Me.lblNewColumnName) Me.Controls.Add(Me.ucrInputDuplicateColumnName) Me.Controls.Add(Me.ucrReceiverDuplicateColumns) diff --git a/instat/dlgDuplicateColumns.resx b/instat/dlgDuplicateColumns.resx index 6e348004651..2ebdb1ff5ea 100644 --- a/instat/dlgDuplicateColumns.resx +++ b/instat/dlgDuplicateColumns.resx @@ -127,13 +127,10 @@ - 347, 17 - - - 4, 0, 4, 0 + 228, 11 - 156, 20 + 105, 13 1 @@ -160,13 +157,10 @@ NoControl - 10, 552 - - - 4, 0, 4, 0 + 7, 345 - 148, 20 + 101, 13 4 @@ -186,96 +180,6 @@ 7 - - rdoBefore - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDuplicatedColumn - - - 0 - - - rdoEnd - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDuplicatedColumn - - - 1 - - - rdoAfter - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDuplicatedColumn - - - 2 - - - rdoBeginning - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDuplicatedColumn - - - 3 - - - ucrPnlDuplicateColPosition - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDuplicatedColumn - - - 4 - - - 704, 132 - - - 4, 5, 4, 5 - - - 4, 5, 4, 5 - - - 272, 117 - - - 3 - - - Position of Duplicated Column - - - grpDuplicatedColumn - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 13 - True @@ -283,13 +187,10 @@ NoControl - 21, 69 - - - 4, 5, 4, 5 + 14, 45 - 82, 24 + 56, 17 2 @@ -316,13 +217,10 @@ NoControl - 176, 71 - - - 4, 5, 4, 5 + 117, 46 - 63, 24 + 44, 17 4 @@ -349,13 +247,10 @@ NoControl - 176, 36 - - - 4, 5, 4, 5 + 117, 23 - 69, 24 + 47, 17 3 @@ -382,13 +277,10 @@ NoControl - 21, 33 - - - 4, 5, 4, 5 + 14, 21 - 105, 24 + 72, 17 1 @@ -408,6 +300,54 @@ 3 + + 6, 19 + + + 6, 8, 6, 8 + + + 166, 47 + + + 0 + + + ucrPnlDuplicateColPosition + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDuplicatedColumn + + + 4 + + + 468, 86 + + + 181, 76 + + + 3 + + + Position of Duplicated Column + + + grpDuplicatedColumn + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 13 + rdoConvertToLogical @@ -493,16 +433,10 @@ 6 - 342, 122 - - - 4, 5, 4, 5 - - - 4, 5, 4, 5 + 228, 82 - 354, 174 + 235, 108 7 @@ -520,7 +454,7 @@ $this - 6 + 5 True @@ -529,13 +463,10 @@ NoControl - 235, 114 - - - 4, 5, 4, 5 + 149, 72 - 84, 24 + 59, 17 6 @@ -562,13 +493,10 @@ NoControl - 33, 114 - - - 4, 5, 4, 5 + 16, 72 - 104, 24 + 71, 17 3 @@ -595,13 +523,10 @@ NoControl - 235, 78 - - - 4, 5, 4, 5 + 149, 49 - 85, 24 + 58, 17 5 @@ -628,13 +553,10 @@ NoControl - 235, 44 - - - 4, 5, 4, 5 + 149, 27 - 92, 24 + 64, 17 4 @@ -661,13 +583,10 @@ NoControl - 33, 78 - - - 4, 5, 4, 5 + 16, 49 - 142, 24 + 96, 17 2 @@ -694,13 +613,10 @@ NoControl - 33, 44 - - - 4, 5, 4, 5 + 16, 27 - 80, 24 + 55, 17 1 @@ -720,6 +636,30 @@ 5 + + 7, 17 + + + 6, 8, 6, 8 + + + 220, 85 + + + 0 + + + ucrPnlConvertTo + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpConvertTo + + + 6 + rdoConvertDefault @@ -769,16 +709,10 @@ 3 - 346, 372 - - - 4, 5, 4, 5 - - - 4, 5, 4, 5 + 228, 233 - 214, 142 + 156, 102 8 @@ -796,7 +730,7 @@ $this - 5 + 4 True @@ -805,13 +739,10 @@ NoControl - 16, 34 - - - 4, 5, 4, 5 + 14, 28 - 86, 24 + 59, 17 1 @@ -838,13 +769,10 @@ NoControl - 16, 102 - - - 4, 5, 4, 5 + 14, 72 - 169, 24 + 115, 17 3 @@ -871,13 +799,10 @@ NoControl - 16, 68 - - - 4, 5, 4, 5 + 14, 50 - 165, 24 + 114, 17 2 @@ -897,14 +822,38 @@ 2 + + 6, 22 + + + 6, 8, 6, 8 + + + 141, 74 + + + 0 + + + ucrPnlConvertFactorToNumericOptions + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFactorToNumericOptions + + + 3 + - 353, 81 + 228, 55 - 9, 12, 9, 12 + 6, 8, 6, 8 - 150, 31 + 100, 20 13 @@ -922,13 +871,13 @@ 0 - 553, 313 + 369, 194 - 9, 12, 9, 12 + 6, 8, 6, 8 - 150, 31 + 100, 20 12 @@ -946,13 +895,13 @@ 1 - 342, 313 + 228, 194 - 9, 12, 9, 12 + 6, 8, 6, 8 - 180, 31 + 120, 20 11 @@ -970,13 +919,13 @@ 2 - 783, 433 + 358, 221 - 9, 12, 9, 12 + 6, 8, 6, 8 - 75, 31 + 50, 20 10 @@ -994,13 +943,13 @@ 3 - 588, 433 + 228, 221 - 9, 12, 9, 12 + 6, 8, 6, 8 - 187, 31 + 125, 20 9 @@ -1015,64 +964,16 @@ $this - 4 - - - 4, 48 - - - 9, 12, 9, 12 - - - 201, 100 - - - 0 - - - ucrPnlConvertFactorToNumericOptions - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpFactorToNumericOptions - - - 3 - - - 10, 26 - - - 9, 12, 9, 12 - - - 333, 131 - - - 0 - - - ucrPnlConvertTo - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpConvertTo - - 6 - 176, 545 + 117, 340 - 14, 18, 14, 18 + 9, 12, 9, 12 - 210, 32 + 140, 21 5 @@ -1093,19 +994,19 @@ True - 9, 20 + 6, 13 - 984, 689 + 651, 432 - 15, 15 + 10, 10 0, 0, 0, 0 - 315, 277 + 210, 180 0 @@ -1123,13 +1024,13 @@ 10 - 14, 592 + 9, 371 - 6, 8, 6, 8 + 4, 5, 4, 5 - 598, 82 + 399, 53 6 @@ -1146,12 +1047,6 @@ 12 - - NoControl - - - 4, 5, 4, 5 - CenterScreen @@ -1165,13 +1060,13 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 347, 40 + 228, 28 0, 0, 0, 0 - 194, 31 + 129, 20 2 @@ -1188,28 +1083,4 @@ 9 - - 9, 29 - - - 9, 12, 9, 12 - - - 249, 73 - - - 0 - - - ucrPnlDuplicateColPosition - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDuplicatedColumn - - - 4 - \ No newline at end of file From 58179dba6eb674f35e93929084726e6b24a08867 Mon Sep 17 00:00:00 2001 From: Lazarus Kioko Muthenya Date: Thu, 31 May 2018 10:49:39 +0300 Subject: [PATCH 9/9] fixing fixed tool window --- instat/dlgDuplicateColumns.Designer.vb | 2 +- instat/dlgDuplicateColumns.resx | 208 +++++-------------------- 2 files changed, 39 insertions(+), 171 deletions(-) diff --git a/instat/dlgDuplicateColumns.Designer.vb b/instat/dlgDuplicateColumns.Designer.vb index 3488633b4c0..6f2f7b9d92e 100644 --- a/instat/dlgDuplicateColumns.Designer.vb +++ b/instat/dlgDuplicateColumns.Designer.vb @@ -305,7 +305,7 @@ Partial Class dlgDuplicateColumns Me.Controls.Add(Me.lblColumns) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.grpDuplicatedColumn) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgDuplicateColumns" diff --git a/instat/dlgDuplicateColumns.resx b/instat/dlgDuplicateColumns.resx index 2ebdb1ff5ea..f9a7a47be3b 100644 --- a/instat/dlgDuplicateColumns.resx +++ b/instat/dlgDuplicateColumns.resx @@ -348,114 +348,6 @@ 13 - - rdoConvertToLogical - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpConvertTo - - - 0 - - - rdoConvertToCharacter - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpConvertTo - - - 1 - - - rdoConvertToInteger - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpConvertTo - - - 2 - - - rdoConvertToNumeric - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpConvertTo - - - 3 - - - rdoConvertToOrderedFactor - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpConvertTo - - - 4 - - - rdoConvertToFactor - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpConvertTo - - - 5 - - - ucrPnlConvertTo - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpConvertTo - - - 6 - - - 228, 82 - - - 235, 108 - - - 7 - - - Convert To - - - grpConvertTo - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - True @@ -660,77 +552,29 @@ 6 - - rdoConvertDefault - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactorToNumericOptions - - - 0 - - - rdoConvertOrdinals - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactorToNumericOptions - - - 1 - - - rdoConvertLevels - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactorToNumericOptions - - - 2 - - - ucrPnlConvertFactorToNumericOptions - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpFactorToNumericOptions - - - 3 - - - 228, 233 + + 228, 82 - - 156, 102 + + 235, 108 - - 8 + + 7 - - Factor Options + + Convert To - - grpFactorToNumericOptions + + grpConvertTo - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 4 + + 5 True @@ -846,6 +690,30 @@ 3 + + 228, 233 + + + 156, 102 + + + 8 + + + Factor Options + + + grpFactorToNumericOptions + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + 228, 55