diff --git a/instat/dlgConversions.Designer.vb b/instat/dlgConversions.Designer.vb index 315a9b2f25b..07f31a8ad2f 100644 --- a/instat/dlgConversions.Designer.vb +++ b/instat/dlgConversions.Designer.vb @@ -32,28 +32,37 @@ Partial Class dlgConversions Me.rdoColumn = New System.Windows.Forms.RadioButton() Me.rdoSingleValue = New System.Windows.Forms.RadioButton() Me.grpLatitude = New System.Windows.Forms.GroupBox() - Me.grpElements = New System.Windows.Forms.GroupBox() - Me.lblDecimal = New System.Windows.Forms.Label() - Me.rdoWindSpeed = New System.Windows.Forms.RadioButton() - Me.rdoRain = New System.Windows.Forms.RadioButton() - Me.rdoTemperature = New System.Windows.Forms.RadioButton() Me.ucrInputLatitude = New instat.ucrInputTextBox() Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() Me.ucrPnlLatitude = New instat.UcrPanel() - Me.ucrReceiverDate = New instat.ucrReceiverSingle() - Me.ucrSaveConversions = New instat.ucrSave() - Me.ucrReceiverElement = New instat.ucrReceiverSingle() - Me.ucrPnlConversions = New instat.UcrPanel() - Me.ucrSelectorConversions = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrBase = New instat.ucrButtons() + Me.grpElements = New System.Windows.Forms.GroupBox() + Me.lblDecimal = New System.Windows.Forms.Label() Me.ucrNudDecimal = New instat.ucrNud() + Me.rdoWindSpeed = New System.Windows.Forms.RadioButton() Me.ucrInputFromTemperature = New instat.ucrInputComboBox() + Me.rdoRain = New System.Windows.Forms.RadioButton() Me.ucrInputToWindSpeed = New instat.ucrInputComboBox() + Me.rdoTemperature = New System.Windows.Forms.RadioButton() Me.ucrInputToTemperature = New instat.ucrInputComboBox() Me.ucrPnlElements = New instat.UcrPanel() Me.ucrInputFromWindSpeed = New instat.ucrInputComboBox() Me.ucrInputFromPrecipitation = New instat.ucrInputComboBox() Me.ucrInputToPrecipitation = New instat.ucrInputComboBox() + Me.rdoCoordinates = New System.Windows.Forms.RadioButton() + Me.lblMinutes = New System.Windows.Forms.Label() + Me.lblSeconds = New System.Windows.Forms.Label() + Me.lblLetters = New System.Windows.Forms.Label() + Me.lblDegrees = New System.Windows.Forms.Label() + Me.ucrReceiverDegrees = New instat.ucrReceiverSingle() + Me.ucrReceiverMinutes = New instat.ucrReceiverSingle() + Me.ucrReceiverSeconds = New instat.ucrReceiverSingle() + Me.ucrReceiverLetters = New instat.ucrReceiverSingle() + Me.ucrReceiverDate = New instat.ucrReceiverSingle() + Me.ucrSaveConversions = New instat.ucrSave() + Me.ucrReceiverElement = New instat.ucrReceiverSingle() + Me.ucrPnlConversions = New instat.UcrPanel() + Me.ucrSelectorConversions = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrBase = New instat.ucrButtons() Me.grpLatitude.SuspendLayout() Me.grpElements.SuspendLayout() Me.SuspendLayout() @@ -124,6 +133,28 @@ Partial Class dlgConversions Me.grpLatitude.Name = "grpLatitude" Me.grpLatitude.TabStop = False ' + 'ucrInputLatitude + ' + Me.ucrInputLatitude.AddQuotesIfUnrecognised = True + Me.ucrInputLatitude.IsMultiline = False + Me.ucrInputLatitude.IsReadOnly = False + resources.ApplyResources(Me.ucrInputLatitude, "ucrInputLatitude") + Me.ucrInputLatitude.Name = "ucrInputLatitude" + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.frmParent = Me + resources.ApplyResources(Me.ucrReceiverLatitude, "ucrReceiverLatitude") + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrPnlLatitude + ' + resources.ApplyResources(Me.ucrPnlLatitude, "ucrPnlLatitude") + Me.ucrPnlLatitude.Name = "ucrPnlLatitude" + ' 'grpElements ' Me.grpElements.Controls.Add(Me.lblDecimal) @@ -149,6 +180,16 @@ Partial Class dlgConversions resources.ApplyResources(Me.lblDecimal, "lblDecimal") Me.lblDecimal.Name = "lblDecimal" ' + 'ucrNudDecimal + ' + Me.ucrNudDecimal.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDecimal.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudDecimal, "ucrNudDecimal") + Me.ucrNudDecimal.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDecimal.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDecimal.Name = "ucrNudDecimal" + Me.ucrNudDecimal.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'rdoWindSpeed ' resources.ApplyResources(Me.rdoWindSpeed, "rdoWindSpeed") @@ -160,6 +201,13 @@ Partial Class dlgConversions Me.rdoWindSpeed.Name = "rdoWindSpeed" Me.rdoWindSpeed.UseVisualStyleBackColor = True ' + 'ucrInputFromTemperature + ' + Me.ucrInputFromTemperature.AddQuotesIfUnrecognised = True + Me.ucrInputFromTemperature.IsReadOnly = False + resources.ApplyResources(Me.ucrInputFromTemperature, "ucrInputFromTemperature") + Me.ucrInputFromTemperature.Name = "ucrInputFromTemperature" + ' 'rdoRain ' resources.ApplyResources(Me.rdoRain, "rdoRain") @@ -171,6 +219,13 @@ Partial Class dlgConversions Me.rdoRain.Name = "rdoRain" Me.rdoRain.UseVisualStyleBackColor = True ' + 'ucrInputToWindSpeed + ' + Me.ucrInputToWindSpeed.AddQuotesIfUnrecognised = True + Me.ucrInputToWindSpeed.IsReadOnly = False + resources.ApplyResources(Me.ucrInputToWindSpeed, "ucrInputToWindSpeed") + Me.ucrInputToWindSpeed.Name = "ucrInputToWindSpeed" + ' 'rdoTemperature ' resources.ApplyResources(Me.rdoTemperature, "rdoTemperature") @@ -182,27 +237,104 @@ Partial Class dlgConversions Me.rdoTemperature.Name = "rdoTemperature" Me.rdoTemperature.UseVisualStyleBackColor = True ' - 'ucrInputLatitude + 'ucrInputToTemperature ' - Me.ucrInputLatitude.AddQuotesIfUnrecognised = True - Me.ucrInputLatitude.IsMultiline = False - Me.ucrInputLatitude.IsReadOnly = False - resources.ApplyResources(Me.ucrInputLatitude, "ucrInputLatitude") - Me.ucrInputLatitude.Name = "ucrInputLatitude" + Me.ucrInputToTemperature.AddQuotesIfUnrecognised = True + Me.ucrInputToTemperature.IsReadOnly = False + resources.ApplyResources(Me.ucrInputToTemperature, "ucrInputToTemperature") + Me.ucrInputToTemperature.Name = "ucrInputToTemperature" ' - 'ucrReceiverLatitude + 'ucrPnlElements ' - Me.ucrReceiverLatitude.frmParent = Nothing - resources.ApplyResources(Me.ucrReceiverLatitude, "ucrReceiverLatitude") - Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" - Me.ucrReceiverLatitude.Selector = Nothing - Me.ucrReceiverLatitude.strNcFilePath = "" - Me.ucrReceiverLatitude.ucrSelector = Nothing + resources.ApplyResources(Me.ucrPnlElements, "ucrPnlElements") + Me.ucrPnlElements.Name = "ucrPnlElements" ' - 'ucrPnlLatitude + 'ucrInputFromWindSpeed ' - resources.ApplyResources(Me.ucrPnlLatitude, "ucrPnlLatitude") - Me.ucrPnlLatitude.Name = "ucrPnlLatitude" + Me.ucrInputFromWindSpeed.AddQuotesIfUnrecognised = True + Me.ucrInputFromWindSpeed.IsReadOnly = False + resources.ApplyResources(Me.ucrInputFromWindSpeed, "ucrInputFromWindSpeed") + Me.ucrInputFromWindSpeed.Name = "ucrInputFromWindSpeed" + ' + 'ucrInputFromPrecipitation + ' + Me.ucrInputFromPrecipitation.AddQuotesIfUnrecognised = True + Me.ucrInputFromPrecipitation.IsReadOnly = False + resources.ApplyResources(Me.ucrInputFromPrecipitation, "ucrInputFromPrecipitation") + Me.ucrInputFromPrecipitation.Name = "ucrInputFromPrecipitation" + ' + 'ucrInputToPrecipitation + ' + Me.ucrInputToPrecipitation.AddQuotesIfUnrecognised = True + Me.ucrInputToPrecipitation.IsReadOnly = False + resources.ApplyResources(Me.ucrInputToPrecipitation, "ucrInputToPrecipitation") + Me.ucrInputToPrecipitation.Name = "ucrInputToPrecipitation" + ' + 'rdoCoordinates + ' + resources.ApplyResources(Me.rdoCoordinates, "rdoCoordinates") + Me.rdoCoordinates.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoCoordinates.FlatAppearance.BorderSize = 2 + Me.rdoCoordinates.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoCoordinates.ForeColor = System.Drawing.SystemColors.ActiveCaptionText + Me.rdoCoordinates.Name = "rdoCoordinates" + Me.rdoCoordinates.UseVisualStyleBackColor = True + ' + 'lblMinutes + ' + resources.ApplyResources(Me.lblMinutes, "lblMinutes") + Me.lblMinutes.Name = "lblMinutes" + ' + 'lblSeconds + ' + resources.ApplyResources(Me.lblSeconds, "lblSeconds") + Me.lblSeconds.Name = "lblSeconds" + ' + 'lblLetters + ' + resources.ApplyResources(Me.lblLetters, "lblLetters") + Me.lblLetters.Name = "lblLetters" + ' + 'lblDegrees + ' + resources.ApplyResources(Me.lblDegrees, "lblDegrees") + Me.lblDegrees.Name = "lblDegrees" + ' + 'ucrReceiverDegrees + ' + Me.ucrReceiverDegrees.frmParent = Me + resources.ApplyResources(Me.ucrReceiverDegrees, "ucrReceiverDegrees") + Me.ucrReceiverDegrees.Name = "ucrReceiverDegrees" + Me.ucrReceiverDegrees.Selector = Nothing + Me.ucrReceiverDegrees.strNcFilePath = "" + Me.ucrReceiverDegrees.ucrSelector = Nothing + ' + 'ucrReceiverMinutes + ' + Me.ucrReceiverMinutes.frmParent = Me + resources.ApplyResources(Me.ucrReceiverMinutes, "ucrReceiverMinutes") + Me.ucrReceiverMinutes.Name = "ucrReceiverMinutes" + Me.ucrReceiverMinutes.Selector = Nothing + Me.ucrReceiverMinutes.strNcFilePath = "" + Me.ucrReceiverMinutes.ucrSelector = Nothing + ' + 'ucrReceiverSeconds + ' + Me.ucrReceiverSeconds.frmParent = Me + resources.ApplyResources(Me.ucrReceiverSeconds, "ucrReceiverSeconds") + Me.ucrReceiverSeconds.Name = "ucrReceiverSeconds" + Me.ucrReceiverSeconds.Selector = Nothing + Me.ucrReceiverSeconds.strNcFilePath = "" + Me.ucrReceiverSeconds.ucrSelector = Nothing + ' + 'ucrReceiverLetters + ' + Me.ucrReceiverLetters.frmParent = Me + resources.ApplyResources(Me.ucrReceiverLetters, "ucrReceiverLetters") + Me.ucrReceiverLetters.Name = "ucrReceiverLetters" + Me.ucrReceiverLetters.Selector = Nothing + Me.ucrReceiverLetters.strNcFilePath = "" + Me.ucrReceiverLetters.ucrSelector = Nothing ' 'ucrReceiverDate ' @@ -245,67 +377,19 @@ Partial Class dlgConversions resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' - 'ucrNudDecimal - ' - Me.ucrNudDecimal.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDecimal.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudDecimal, "ucrNudDecimal") - Me.ucrNudDecimal.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudDecimal.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDecimal.Name = "ucrNudDecimal" - Me.ucrNudDecimal.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrInputFromTemperature - ' - Me.ucrInputFromTemperature.AddQuotesIfUnrecognised = True - Me.ucrInputFromTemperature.IsReadOnly = False - resources.ApplyResources(Me.ucrInputFromTemperature, "ucrInputFromTemperature") - Me.ucrInputFromTemperature.Name = "ucrInputFromTemperature" - ' - 'ucrInputToWindSpeed - ' - Me.ucrInputToWindSpeed.AddQuotesIfUnrecognised = True - Me.ucrInputToWindSpeed.IsReadOnly = False - resources.ApplyResources(Me.ucrInputToWindSpeed, "ucrInputToWindSpeed") - Me.ucrInputToWindSpeed.Name = "ucrInputToWindSpeed" - ' - 'ucrInputToTemperature - ' - Me.ucrInputToTemperature.AddQuotesIfUnrecognised = True - Me.ucrInputToTemperature.IsReadOnly = False - resources.ApplyResources(Me.ucrInputToTemperature, "ucrInputToTemperature") - Me.ucrInputToTemperature.Name = "ucrInputToTemperature" - ' - 'ucrPnlElements - ' - resources.ApplyResources(Me.ucrPnlElements, "ucrPnlElements") - Me.ucrPnlElements.Name = "ucrPnlElements" - ' - 'ucrInputFromWindSpeed - ' - Me.ucrInputFromWindSpeed.AddQuotesIfUnrecognised = True - Me.ucrInputFromWindSpeed.IsReadOnly = False - resources.ApplyResources(Me.ucrInputFromWindSpeed, "ucrInputFromWindSpeed") - Me.ucrInputFromWindSpeed.Name = "ucrInputFromWindSpeed" - ' - 'ucrInputFromPrecipitation - ' - Me.ucrInputFromPrecipitation.AddQuotesIfUnrecognised = True - Me.ucrInputFromPrecipitation.IsReadOnly = False - resources.ApplyResources(Me.ucrInputFromPrecipitation, "ucrInputFromPrecipitation") - Me.ucrInputFromPrecipitation.Name = "ucrInputFromPrecipitation" - ' - 'ucrInputToPrecipitation - ' - Me.ucrInputToPrecipitation.AddQuotesIfUnrecognised = True - Me.ucrInputToPrecipitation.IsReadOnly = False - resources.ApplyResources(Me.ucrInputToPrecipitation, "ucrInputToPrecipitation") - Me.ucrInputToPrecipitation.Name = "ucrInputToPrecipitation" - ' 'dlgConversions ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.lblDegrees) + Me.Controls.Add(Me.lblLetters) + Me.Controls.Add(Me.lblSeconds) + Me.Controls.Add(Me.lblMinutes) + Me.Controls.Add(Me.ucrReceiverDegrees) + Me.Controls.Add(Me.ucrReceiverMinutes) + Me.Controls.Add(Me.ucrReceiverSeconds) + Me.Controls.Add(Me.ucrReceiverLetters) + Me.Controls.Add(Me.rdoCoordinates) Me.Controls.Add(Me.grpLatitude) Me.Controls.Add(Me.lblDate) Me.Controls.Add(Me.ucrReceiverDate) @@ -362,4 +446,13 @@ Partial Class dlgConversions Friend WithEvents rdoTemperature As RadioButton Friend WithEvents lblDecimal As Label Friend WithEvents ucrNudDecimal As ucrNud + Friend WithEvents rdoCoordinates As RadioButton + Friend WithEvents lblLetters As Label + Friend WithEvents lblSeconds As Label + Friend WithEvents lblMinutes As Label + Friend WithEvents ucrReceiverDegrees As ucrReceiverSingle + Friend WithEvents ucrReceiverMinutes As ucrReceiverSingle + Friend WithEvents ucrReceiverSeconds As ucrReceiverSingle + Friend WithEvents ucrReceiverLetters As ucrReceiverSingle + Friend WithEvents lblDegrees As Label End Class \ No newline at end of file diff --git a/instat/dlgConversions.resx b/instat/dlgConversions.resx index 2831de4d7d9..22f6e7f2ea1 100644 --- a/instat/dlgConversions.resx +++ b/instat/dlgConversions.resx @@ -135,10 +135,10 @@ NoControl - 207, 21 + 170, 21 - 91, 28 + 77, 28 @@ -160,7 +160,7 @@ $this - 6 + 15 Button @@ -172,10 +172,10 @@ NoControl - 119, 21 + 95, 21 - 91, 28 + 77, 28 1 @@ -196,7 +196,7 @@ $this - 7 + 16 True @@ -226,7 +226,7 @@ $this - 4 + 13 True @@ -316,7 +316,7 @@ $this - 1 + 10 True @@ -345,59 +345,641 @@ grpLatitude - - 2 + + 2 + + + True + + + NoControl + + + 7, 34 + + + 87, 17 + + + 27 + + + Single Value: + + + rdoSingleValue + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLatitude + + + 3 + + + 100, 34 + + + 67, 21 + + + 27 + + + ucrInputLatitude + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLatitude + + + 0 + + + True + + + 6, 13 + + + 418, 503 + + + True + + + NoControl + + + 262, 99 + + + 50, 13 + + + 6 + + + Degrees: + + + lblDegrees + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + NoControl + + + 262, 228 + + + 107, 13 + + + 12 + + + Direction (N/S E/W): + + + lblLetters + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + NoControl + + + 262, 185 + + + 52, 13 + + + 10 + + + Seconds: + + + lblSeconds + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + True + + + NoControl + + + 263, 142 + + + 47, 13 + + + 8 + + + Minutes: + + + lblMinutes + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + 265, 115 + + + 0, 0, 0, 0 + + + 120, 20 + + + 7 + + + ucrReceiverDegrees + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 4 + + + 265, 158 + + + 0, 0, 0, 0 + + + 120, 20 + + + 9 + + + ucrReceiverMinutes + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 5 + + + 265, 201 + + + 0, 0, 0, 0 + + + 120, 20 + + + 11 + + + ucrReceiverSeconds + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 6 + + + 265, 244 + + + 0, 0, 0, 0 + + + 120, 20 + + + 13 + + + ucrReceiverLetters + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 7 + + + Button + + + None + + + MiddleCenter + + + Flat + + + NoControl + + + 245, 21 + + + 77, 28 + + + 3 + + + Coordinates + + + MiddleCenter + + + rdoCoordinates + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 8 + + + 265, 115 + + + 0, 0, 0, 0 + + + 120, 20 + + + 9 + + + ucrReceiverDate + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 11 + + + 12, 410 + + + 230, 24 + + + 15 + + + ucrSaveConversions + + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 12 + + + 265, 115 + + + 0, 0, 0, 0 + + + 120, 20 + + + 5 + + + ucrReceiverElement + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 14 + + + 85, 21 + + + 249, 28 + + + 0 + + + ucrPnlConversions + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 17 + + + 9, 69 + + + 0, 0, 0, 0 + + + 210, 180 + + + 4 + + + ucrSelectorConversions + + + instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 18 + + + 10, 447 + + + 410, 52 + + + 16 + + + ucrBase + + + instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 19 + + + lblDecimal + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpElements + + + 0 + + + ucrNudDecimal + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 1 + + + rdoWindSpeed + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpElements + + + 2 + + + ucrInputFromTemperature + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 3 + + + rdoRain + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpElements + + + 4 + + + ucrInputToWindSpeed + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 5 + + + rdoTemperature + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpElements + + + 6 + + + ucrInputToTemperature + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 7 + + + ucrPnlElements + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 8 + + + ucrInputFromWindSpeed + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 9 + + + ucrInputFromPrecipitation + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements - - True + + 11 - - NoControl + + ucrInputToPrecipitation - - 7, 34 + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 87, 17 + + grpElements - - 27 + + 12 - - Single Value: + + 10, 268 - - rdoSingleValue + + 397, 106 - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 10 - - grpLatitude + + Elements - - 3 + + grpElements - - 100, 34 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 67, 21 + + $this - - 27 + + 20 - - ucrInputLatitude + + CenterScreen - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + Conversions - - grpLatitude + + dlgConversions - - 0 + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 100, 61 @@ -451,7 +1033,7 @@ 248, 100 - 25 + 14 Latitude @@ -466,7 +1048,7 @@ $this - 0 + 9 True @@ -481,7 +1063,7 @@ 45, 13 - 23 + 1 Decimal @@ -505,7 +1087,7 @@ 39, 20 - 24 + 2 ucrNudDecimal @@ -541,7 +1123,7 @@ 91, 28 - 17 + 0 Wind Speed @@ -792,187 +1374,4 @@ 12 - - 10, 268 - - - 397, 106 - - - 10 - - - Elements - - - grpElements - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 11 - - - True - - - 6, 13 - - - 418, 503 - - - 12, 410 - - - 230, 24 - - - 30 - - - ucrSaveConversions - - - instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 3 - - - 265, 115 - - - 0, 0, 0, 0 - - - 120, 20 - - - 5 - - - ucrReceiverElement - - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 5 - - - 109, 21 - - - 200, 28 - - - 0 - - - ucrPnlConversions - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 8 - - - 9, 69 - - - 0, 0, 0, 0 - - - 210, 180 - - - 3 - - - ucrSelectorConversions - - - instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 9 - - - 10, 447 - - - 410, 52 - - - 31 - - - ucrBase - - - instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 10 - - - NoControl - - - CenterScreen - - - Conversions - - - dlgConversions - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 265, 115 - - - 0, 0, 0, 0 - - - 120, 20 - - - 9 - - - ucrReceiverDate - - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 2 - \ No newline at end of file diff --git a/instat/dlgConversions.vb b/instat/dlgConversions.vb index 2951440a54d..82c70fb4bbf 100644 --- a/instat/dlgConversions.vb +++ b/instat/dlgConversions.vb @@ -18,7 +18,7 @@ Imports instat.Translations Public Class dlgConversions Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsPrecipitationFunction, clsTemperatureFunction, clsWindSpeedFunction As New RFunction + Private clsPrecipitationFunction, clsTemperatureFunction, clsWindSpeedFunction, clsConvertToDegreeFunction As New RFunction Private clsDayLengthFunction As New RFunction Private Sub dlgConversions_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -46,9 +46,11 @@ Public Class dlgConversions ucrPnlConversions.AddRadioButton(rdoUnits) ucrPnlConversions.AddRadioButton(rdoDayLength) + ucrPnlConversions.AddRadioButton(rdoCoordinates) ucrPnlConversions.AddFunctionNamesCondition(rdoUnits, {"convert_precip", "convert_temperature", "convert_wind_speed"}) ucrPnlConversions.AddFunctionNamesCondition(rdoDayLength, "daylength") + ucrPnlConversions.AddFunctionNamesCondition(rdoCoordinates, "convert_to_dec_deg") ucrPnlLatitude.AddRadioButton(rdoSingleValue) ucrPnlLatitude.AddRadioButton(rdoColumn) @@ -75,6 +77,22 @@ Public Class dlgConversions ucrReceiverLatitude.SetParameterIsRFunction() ucrReceiverLatitude.Selector = ucrSelectorConversions + ucrReceiverDegrees.SetParameter(New RParameter("dd", 0)) + ucrReceiverDegrees.SetParameterIsRFunction() + ucrReceiverDegrees.Selector = ucrSelectorConversions + + ucrReceiverMinutes.SetParameter(New RParameter("mm", 1)) + ucrReceiverMinutes.SetParameterIsRFunction() + ucrReceiverMinutes.Selector = ucrSelectorConversions + + ucrReceiverSeconds.SetParameter(New RParameter("ss", 2)) + ucrReceiverSeconds.SetParameterIsRFunction() + ucrReceiverSeconds.Selector = ucrSelectorConversions + + ucrReceiverLetters.SetParameter(New RParameter("dir", 3)) + ucrReceiverLetters.SetParameterIsRFunction() + ucrReceiverLetters.Selector = ucrSelectorConversions + ucrInputLatitude.SetValidationTypeAsNumeric(dcmMin:=-90, dcmMax:=90) @@ -132,6 +150,14 @@ Public Class dlgConversions ucrPnlElements.AddToLinkedControls(ucrInputToTemperature, {rdoTemperature}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Celsius") ucrPnlElements.AddToLinkedControls(ucrInputFromWindSpeed, {rdoWindSpeed}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Knots") ucrPnlElements.AddToLinkedControls(ucrInputToWindSpeed, {rdoWindSpeed}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Metres per second (mps)") + ucrPnlConversions.AddToLinkedControls(ucrReceiverDegrees, {rdoCoordinates}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlConversions.AddToLinkedControls(ucrReceiverMinutes, {rdoCoordinates}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlConversions.AddToLinkedControls(ucrReceiverSeconds, {rdoCoordinates}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlConversions.AddToLinkedControls(ucrReceiverLetters, {rdoCoordinates}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrReceiverDegrees.SetLinkedDisplayControl(lblDegrees) + ucrReceiverMinutes.SetLinkedDisplayControl(lblMinutes) + ucrReceiverSeconds.SetLinkedDisplayControl(lblSeconds) + ucrReceiverLetters.SetLinkedDisplayControl(lblLetters) ucrReceiverElement.SetLinkedDisplayControl(lblElement) ucrNudDecimal.SetLinkedDisplayControl(lstLabels) @@ -151,6 +177,7 @@ Public Class dlgConversions clsTemperatureFunction = New RFunction clsWindSpeedFunction = New RFunction clsDayLengthFunction = New RFunction + clsConvertToDegreeFunction = New RFunction ucrSelectorConversions.Reset() ucrSaveConversions.Reset() @@ -172,6 +199,8 @@ Public Class dlgConversions clsDayLengthFunction.SetPackageName("geosphere") clsDayLengthFunction.SetRCommand("daylength") + clsConvertToDegreeFunction.SetRCommand("convert_to_dec_deg") + clsPrecipitationFunction.SetAssignTo(ucrSaveConversions.GetText, strTempDataframe:=ucrSelectorConversions.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveConversions.GetText, bAssignToIsPrefix:=True) ucrBase.clsRsyntax.SetBaseRFunction(clsPrecipitationFunction) End Sub @@ -184,6 +213,7 @@ Public Class dlgConversions ucrSaveConversions.AddAdditionalRCode(clsTemperatureFunction, iAdditionalPairNo:=1) ucrSaveConversions.AddAdditionalRCode(clsWindSpeedFunction, iAdditionalPairNo:=2) ucrSaveConversions.AddAdditionalRCode(clsDayLengthFunction, iAdditionalPairNo:=3) + ucrSaveConversions.AddAdditionalRCode(clsConvertToDegreeFunction, iAdditionalPairNo:=4) ucrSaveConversions.SetRCode(clsPrecipitationFunction, bReset) ucrReceiverElement.SetRCode(clsPrecipitationFunction, bReset) @@ -194,6 +224,11 @@ Public Class dlgConversions ucrInputFromWindSpeed.SetRCode(clsWindSpeedFunction, bReset) ucrInputToWindSpeed.SetRCode(clsWindSpeedFunction, bReset) ucrNudDecimal.SetRCode(clsPrecipitationFunction, bReset) + ucrReceiverDegrees.SetRCode(clsConvertToDegreeFunction, bReset) + ucrReceiverMinutes.SetRCode(clsConvertToDegreeFunction, bReset) + ucrReceiverSeconds.SetRCode(clsConvertToDegreeFunction, bReset) + ucrReceiverLetters.SetRCode(clsConvertToDegreeFunction, bReset) + If bReset Then ucrPnlConversions.SetRCode(clsPrecipitationFunction, bReset) End If @@ -214,6 +249,8 @@ Public Class dlgConversions End If ElseIf rdoDayLength.Checked AndAlso Not ucrReceiverDate.IsEmpty AndAlso ((rdoSingleValue.Checked AndAlso Not ucrInputLatitude.IsEmpty) OrElse (rdoColumn.Checked AndAlso Not ucrReceiverLatitude.IsEmpty)) Then ucrBase.OKEnabled(True) + ElseIf rdoCoordinates.Checked AndAlso Not ucrReceiverDegrees.IsEmpty AndAlso ucrSaveConversions.IsComplete Then + ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) End If @@ -247,6 +284,7 @@ Public Class dlgConversions End Sub Private Sub ucrPnlConversions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlConversions.ControlValueChanged + If rdoDayLength.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsDayLengthFunction) ucrReceiverDate.SetMeAsReceiver() @@ -254,7 +292,11 @@ Public Class dlgConversions ElseIf rdoUnits.Checked Then SetBaseFunction() ucrReceiverElement.SetMeAsReceiver() - ucrSaveConversions.SetPrefix("Conversion") + ucrSaveConversions.SetPrefix("conversion") + ElseIf rdoCoordinates.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsConvertToDegreeFunction) + ucrReceiverDegrees.SetMeAsReceiver() + ucrSaveConversions.SetPrefix("coord") End If ChangeLatParameter() End Sub @@ -277,7 +319,7 @@ Public Class dlgConversions ChangeLatParameter() End Sub - Private Sub ucrPnlConversions_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlConversions.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrSaveConversions.ControlContentsChanged, ucrNudDecimal.ControlContentsChanged, ucrPnlLatitude.ControlContentsChanged, ucrInputLatitude.ControlContentsChanged, ucrReceiverLatitude.ControlContentsChanged, ucrInputFromPrecipitation.ControlContentsChanged, ucrInputToPrecipitation.ControlContentsChanged, ucrInputFromTemperature.ControlContentsChanged, ucrInputToTemperature.ControlContentsChanged, ucrInputFromWindSpeed.ControlContentsChanged, ucrInputToWindSpeed.ControlContentsChanged, ucrPnlElements.ControlContentsChanged + Private Sub ucrPnlConversions_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlConversions.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrSaveConversions.ControlContentsChanged, ucrNudDecimal.ControlContentsChanged, ucrPnlLatitude.ControlContentsChanged, ucrInputLatitude.ControlContentsChanged, ucrReceiverLatitude.ControlContentsChanged, ucrInputFromPrecipitation.ControlContentsChanged, ucrInputToPrecipitation.ControlContentsChanged, ucrInputFromTemperature.ControlContentsChanged, ucrInputToTemperature.ControlContentsChanged, ucrInputFromWindSpeed.ControlContentsChanged, ucrInputToWindSpeed.ControlContentsChanged, ucrPnlElements.ControlContentsChanged, ucrReceiverDegrees.ControlContentsChanged TestOkEnabled() End Sub End Class \ No newline at end of file diff --git a/instat/dlgMakeDate.vb b/instat/dlgMakeDate.vb index 548c0dc276f..46a879ead62 100644 --- a/instat/dlgMakeDate.vb +++ b/instat/dlgMakeDate.vb @@ -22,7 +22,7 @@ Public Class dlgMakeDate Private bUseSelectedColumn As Boolean = False Private strSelectedColumn As String = "" Private strSelectedDataFrame As String = "" - Private clsDateFunction, clsMakeYearDay, clsHelp, clsMakeYearMonthDay, clsDefaultDate, clsGregorianDefault, clsJulianDateDefault, clsAsCharacterFunction As New RFunction + Private clsDateFunction, clsMakeYearDay, clsHelp, clsMakeYearMonthDay, clsDefaultDate, clsRDefaultDate, clsGregorianDefault, clsJulianDateDefault, clsAsCharacterFunction As New RFunction Private clsDivisionOperator, clsMultiplicationOperator As New ROperator Private Sub dlgMakeDate_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -103,7 +103,7 @@ Public Class dlgMakeDate ucrInputFormat.SetItems(dctDateFormat) ucrInputFormat.SetDropDownStyleAsEditable(bAdditionsAllowed:=True) - ucrInputOrigin.SetItems({"Excel", "Gregorian", "Julian Day Number", "Specify"}) + ucrInputOrigin.SetItems({"R (1970/01/01)", "Excel (1899/12/30)", "Gregorian (1600/03/01)", "Julian Day Number (-4713/11/24)", "Specify"}) ucrInputOrigin.SetDropDownStyleAsNonEditable() ucrInputOrigin.AddToLinkedControls(ucrDtpSpecifyOrigin, {"Specify"}, bNewLinkedHideIfParameterMissing:=True) @@ -138,7 +138,7 @@ Public Class dlgMakeDate ucrPnlFormat.AddRadioButton(rdoSpecifyFormat) ucrPnlFormat.AddRadioButton(rdoOrigin) ucrPnlFormat.AddToLinkedControls(ucrInputFormat, {rdoSpecifyFormat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Year(4-digit)-Month-Day") - ucrPnlFormat.AddToLinkedControls(ucrInputOrigin, {rdoOrigin}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Excel") + ucrPnlFormat.AddToLinkedControls(ucrInputOrigin, {rdoOrigin}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Excel(1899/12/30)") ttMakeDate.SetToolTip(rdoDefaultFormat, "This will try 'Year(4-digit)-Month-Day %Y-%m-%d' then 'Year(4-digit)/Month/Day %Y/%m/%d' on the first non-NA element") @@ -215,6 +215,10 @@ Public Class dlgMakeDate ucrDtpSpecifyOrigin.SetParameter(New RParameter("origin", 1)) ucrDtpSpecifyOrigin.SetParameterIsRDate() + clsRDefaultDate = New RFunction + clsRDefaultDate.SetRCommand("as.Date") + clsRDefaultDate.AddParameter("x", Chr(34) & "1970/01/01" & Chr(34)) + clsDefaultDate = New RFunction clsDefaultDate.SetRCommand("as.Date") clsDefaultDate.AddParameter("x", Chr(34) & "1899/12/30" & Chr(34)) @@ -446,12 +450,14 @@ Public Class dlgMakeDate ElseIf rdoOrigin.Checked Then cmdHelp.Visible = False ucrReceiverForDate.SetIncludedDataTypes({"numeric"}) - If ucrInputOrigin.GetText = "Excel" Then + If ucrInputOrigin.GetText = "Excel (1899/12/30)" Then clsDateFunction.AddParameter("origin", clsRFunctionParameter:=clsDefaultDate) - ElseIf ucrInputOrigin.GetText = "Gregorian" Then + ElseIf ucrInputOrigin.GetText = "Gregorian (1600/03/01)" Then clsDateFunction.AddParameter("origin", clsRFunctionParameter:=clsGregorianDefault) - ElseIf ucrInputOrigin.GetText = "Julian Day Number" Then + ElseIf ucrInputOrigin.GetText = "Julian Day Number (-4713/11/24)" Then clsDateFunction.AddParameter("origin", clsRFunctionParameter:=clsJulianDateDefault) + ElseIf ucrInputOrigin.GetText = "R (1970/01/01)" Then + clsDateFunction.AddParameter("origin", clsRFunctionParameter:=clsRDefaultDate) End If ElseIf rdoSpecifyFormat.Checked Then cmdHelp.Visible = True diff --git a/instat/dlgRugPlot.vb b/instat/dlgRugPlot.vb index 2518693003e..9763c53eef6 100644 --- a/instat/dlgRugPlot.vb +++ b/instat/dlgRugPlot.vb @@ -34,6 +34,10 @@ Public Class dlgRugPlot Private clsLocalRaesFunction As New RFunction Private bResetRugLayerSubdialog As Boolean = True + 'Parameter names for geoms + Private strFirstParameterName As String = "geomrug" + Private strGeomParameterNames() As String = {strFirstParameterName} + Private Sub dlgRugPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -101,7 +105,7 @@ Public Class dlgRugPlot clsBaseOperator.SetOperation("+") clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRggplotFunction, iPosition:=0) - clsBaseOperator.AddParameter("scatter", clsRFunctionParameter:=clsRgeom_RugPlotFunction, iPosition:=2) + clsBaseOperator.AddParameter(strFirstParameterName, clsRFunctionParameter:=clsRgeom_RugPlotFunction, iPosition:=2) clsRggplotFunction.SetPackageName("ggplot2") clsRggplotFunction.SetRCommand("ggplot") @@ -158,7 +162,7 @@ Public Class dlgRugPlot End Sub Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click - sdgPlots.SetRCode(clsBaseOperator, clsNewYScalecontinuousFunction:=clsYScalecontinuousFunction, clsNewXScalecontinuousFunction:=clsXScalecontinuousFunction, clsNewGlobalAesFunction:=clsRaesFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabFunction, clsNewLabsFunction:=clsLabsFunction, clsNewFacetFunction:=clsRFacetFunction, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, ucrNewBaseSelector:=ucrRugPlotSelector, bReset:=bResetSubdialog) + sdgPlots.SetRCode(clsBaseOperator, clsNewYScalecontinuousFunction:=clsYScalecontinuousFunction, clsNewXScalecontinuousFunction:=clsXScalecontinuousFunction, clsNewGlobalAesFunction:=clsRaesFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabFunction, clsNewLabsFunction:=clsLabsFunction, clsNewFacetFunction:=clsRFacetFunction, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, ucrNewBaseSelector:=ucrRugPlotSelector, strMainDialogGeomParameterNames:=strGeomParameterNames, bReset:=bResetSubdialog) sdgPlots.ShowDialog() bResetSubdialog = False End Sub diff --git a/instat/dlgSpells.vb b/instat/dlgSpells.vb index a37ea812c89..462be1e16b0 100644 --- a/instat/dlgSpells.vb +++ b/instat/dlgSpells.vb @@ -18,13 +18,13 @@ Imports instat.Translations Public Class dlgSpells Private bFirstload As Boolean = True Private bReset As Boolean = True - Private clsSpellLength, clsMaxValueManipulation, clsSubSpellLength1 As New RFunction - Private clsMaxValue, clsMaxValueList, clsMaxValueFunction, clsSpellOrGroupList As New RFunction - Private clsDayFromAndTo, clsGroupBy, clsDayFilterCalcFromConvert, clsDayFilterCalcFromList As New RFunction + Private clsSpellLength, clsMaxSpellManipulation, clsSubSpellLength1 As New RFunction + Private clsMaxSpellSummary, clsMaxValueList, clsMaxFunction, clsMaxSpellSubCalcs As New RFunction + Private clsDayFilter, clsGroupBy, clsDayFilterCalcFromConvert, clsDayFilterCalcFromList As New RFunction Private clsDayFromAndToOperator, clsDayFromOperator, clsDayToOperator As New ROperator - Private clsApplyInstatFunction, clsRRainday, clsRRaindayMatch As New RFunction - Private clsConsecutiveSum As New RFunction - Private clsRRaindayOperator, clsRRaindayAndOperator, clsRRaindayLowerOperator, clsRRaindayUpperOperator, clsAdditionalConditionReplaceOperator, clsAdditionalConditionReplaceOperator2, clsGreaterThanOperator, clsLessThanOperator As New ROperator + Private clsApplyInstatFunction, clsSpellLogicalCalc, clsRRaindayMatch As New RFunction + Private clsSpellsFunction As New RFunction + Private clsRRaindayOperator, clsSpellLogicalAndOperator, clsSpellLogicalLowerOperator, clsSpellLogicalUpperOperator, clsAdditionalConditionReplaceOperator, clsAdditionalConditionReplaceOperator2, clsGreaterThanOperator, clsLessThanOperator As New ROperator Private clsAdditionalCondition, clsAdditionalConditionList, clsSubSpellLength2, clsAdditionalConditionReplaceFunction As New RFunction Private strCurrDataName As String = "" @@ -103,8 +103,8 @@ Public Class dlgSpells ucrChkConditional.SetText("Assuming Condition Satisfied at Start of Each Period") ucrChkConditional.SetParameter(New RParameter("initial_value")) - ucrChkConditional.SetValuesCheckedAndUnchecked("0", "NA") - ucrChkConditional.SetRDefault("NA") + ucrChkConditional.SetValuesCheckedAndUnchecked("0", "NA_real_") + ucrChkConditional.SetRDefault("NA_real_") ucrInputNewColumnName.SetParameter(New RParameter("result_name", 2)) ucrInputNewColumnName.SetDataFrameSelector(ucrSelectorForSpells.ucrAvailableDataFrames) @@ -117,24 +117,24 @@ Public Class dlgSpells End Sub Private Sub SetDefaults() - Dim strRainDay As String = "rain_day" - Dim strDrySpell As String = "Dry_Spell" + Dim strSpellLogical As String = "spell_day" + Dim strSpellName As String = "spell_length" clsApplyInstatFunction.Clear() - clsMaxValueManipulation.Clear() - clsDayFromAndTo.Clear() + clsMaxSpellManipulation.Clear() + clsDayFilter.Clear() clsGroupBy.Clear() - clsRRainday.Clear() + clsSpellLogicalCalc.Clear() clsSpellLength.Clear() - clsMaxValue.Clear() + clsMaxSpellSummary.Clear() clsDayFromAndToOperator.Clear() clsDayFromOperator.Clear() clsDayToOperator.Clear() clsRRaindayOperator.Clear() - clsRRaindayAndOperator.Clear() - clsRRaindayLowerOperator.Clear() - clsRRaindayUpperOperator.Clear() - clsMaxValueFunction.Clear() + clsSpellLogicalAndOperator.Clear() + clsSpellLogicalLowerOperator.Clear() + clsSpellLogicalUpperOperator.Clear() + clsMaxFunction.Clear() clsAdditionalCondition.Clear() clsAdditionalConditionList.Clear() clsSubSpellLength2.Clear() @@ -161,9 +161,9 @@ Public Class dlgSpells 'DayFromandTo clsDayFromAndToOperator.bToScriptAsRString = True - clsDayFromAndTo.SetRCommand("instat_calculation$new") - clsDayFromAndTo.AddParameter("type", Chr(34) & "filter" & Chr(34), iPosition:=0) - clsDayFromAndTo.AddParameter("function_exp", clsROperatorParameter:=clsDayFromAndToOperator, iPosition:=1) + clsDayFilter.SetRCommand("instat_calculation$new") + clsDayFilter.AddParameter("type", Chr(34) & "filter" & Chr(34), iPosition:=0) + clsDayFilter.AddParameter("function_exp", clsROperatorParameter:=clsDayFromAndToOperator, iPosition:=1) clsDayFromAndToOperator.SetOperation("&") clsDayFromAndToOperator.bBrackets = False clsDayFromAndToOperator.AddParameter("from", clsROperatorParameter:=clsDayFromOperator, iPosition:=0) @@ -172,50 +172,41 @@ Public Class dlgSpells clsDayFromAndToOperator.AddParameter("to", clsROperatorParameter:=clsDayToOperator, iPosition:=1) clsDayToOperator.SetOperation("<=") clsDayToOperator.AddParameter("to", 366) - clsDayFromAndTo.SetAssignTo("day_from_and_to") - clsDayFromAndTo.AddParameter("calculated_from", clsRFunctionParameter:=clsDayFilterCalcFromConvert, iPosition:=2) + clsDayFilter.SetAssignTo("day_from_and_to") + clsDayFilter.AddParameter("calculated_from", clsRFunctionParameter:=clsDayFilterCalcFromConvert, iPosition:=2) ' group clsGroupBy.SetRCommand("instat_calculation$new") clsGroupBy.AddParameter("type", Chr(34) & "by" & Chr(34)) clsGroupBy.SetAssignTo("grouping") - clsSpellOrGroupList.SetRCommand("list") - clsSpellOrGroupList.AddParameter("sub1", clsRFunctionParameter:=clsSpellLength, bIncludeArgumentName:=False, iPosition:=0) - clsSpellOrGroupList.AddParameter("sub2", clsRFunctionParameter:=clsGroupBy, bIncludeArgumentName:=False) - ' rain_day - 'TODO remove this function - 'clsRRaindayMatch.bToScriptAsRString = True - clsRRainday.SetRCommand("instat_calculation$new") - clsRRainday.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) - clsRRainday.AddParameter("result_name", Chr(34) & strRainDay & Chr(34), iPosition:=2) - clsRRainday.AddParameter("save", "0", iPosition:=6) - clsRRainday.AddParameter("function_exp", clsROperatorParameter:=clsRRaindayAndOperator, iPosition:=1) - - 'clsRRaindayMatch.SetRCommand("match") - 'clsRRaindayMatch.AddParameter("x", clsROperatorParameter:=clsRRaindayAndOperator) - clsRRaindayAndOperator.bToScriptAsRString = True - clsRRaindayAndOperator.SetOperation("&") - clsRRaindayLowerOperator.SetOperation(">=") - clsRRaindayLowerOperator.AddParameter("min", 0, iPosition:=1) - clsRRaindayUpperOperator.SetOperation("<=") - clsRRaindayUpperOperator.AddParameter("max", 0.85, iPosition:=1) - 'clsRRaindayMatch.AddParameter("table", "1", iPosition:=1) - 'clsRRaindayMatch.AddParameter("nomatch", "0", iPosition:=2) + clsSpellLogicalCalc.SetRCommand("instat_calculation$new") + clsSpellLogicalCalc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) + clsSpellLogicalCalc.AddParameter("function_exp", clsROperatorParameter:=clsSpellLogicalAndOperator, iPosition:=1) + clsSpellLogicalCalc.AddParameter("result_name", Chr(34) & strSpellLogical & Chr(34), iPosition:=2) + clsSpellLogicalCalc.AddParameter("save", "0", iPosition:=6) + clsSpellLogicalCalc.SetAssignTo(strSpellLogical) + + clsSpellLogicalAndOperator.bToScriptAsRString = True + clsSpellLogicalAndOperator.SetOperation("&") + clsSpellLogicalLowerOperator.SetOperation(">=") + clsSpellLogicalLowerOperator.AddParameter("min", 0, iPosition:=1) + clsSpellLogicalUpperOperator.SetOperation("<=") + clsSpellLogicalUpperOperator.AddParameter("max", 0.85, iPosition:=1) + clsGreaterThanOperator.SetOperation(">") clsLessThanOperator.SetOperation("<") ' Spell Length clsSpellLength.SetRCommand("instat_calculation$new") clsSpellLength.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) - clsSpellLength.AddParameter("result_name", Chr(34) & strDrySpell & Chr(34), iPosition:=2) - clsSpellLength.AddParameter("function_exp", clsRFunctionParameter:=clsConsecutiveSum) + clsSpellLength.AddParameter("result_name", Chr(34) & strSpellName & Chr(34), iPosition:=2) + clsSpellLength.AddParameter("function_exp", clsRFunctionParameter:=clsSpellsFunction) clsSpellLength.AddParameter("sub_calculations", clsRFunctionParameter:=clsSubSpellLength1, iPosition:=5) - clsSubSpellLength1.AddParameter("sub1", clsRFunctionParameter:=clsRRainday, bIncludeArgumentName:=False) + clsSubSpellLength1.AddParameter("sub1", clsRFunctionParameter:=clsSpellLogicalCalc, bIncludeArgumentName:=False) clsSpellLength.AddParameter("save", 0, iPosition:=6) clsSpellLength.SetAssignTo("spell_length") - clsMaxValueManipulation.SetRCommand("list") ' Additional Checkbox 'clsAdditionalConditionReplaceFunction.bToScriptAsRString = True @@ -232,27 +223,35 @@ Public Class dlgSpells 'clsAdditionalConditionList.AddParameter("sub1", clsRFunctionParameter:=clsRRainday) 'clsAdditionalCondition.AddParameter("sub_calculation", clsRFunctionParameter:=clsAdditionalConditionList) - 'Max Value - clsMaxValueFunction.bToScriptAsRString = True - clsMaxValue.SetRCommand("instat_calculation$new") - clsMaxValue.AddParameter("type", Chr(34) & "summary" & Chr(34), iPosition:=0) - clsMaxValue.AddParameter("function_exp", clsRFunctionParameter:=clsMaxValueFunction, iPosition:=1) - clsMaxValueFunction.SetRCommand("max") - clsMaxValueFunction.AddParameter("x", strDrySpell) - clsMaxValue.AddParameter("save", 2, iPosition:=6) - clsMaxValue.AddParameter("result_name", Chr(34) & ucrInputNewColumnName.GetText() & Chr(34), iPosition:=3) - clsMaxValue.AddParameter("manipulations", clsRFunctionParameter:=clsMaxValueManipulation, iPosition:=5) - clsMaxValueManipulation.AddParameter("sub3", clsRFunctionParameter:=clsDayFromAndTo, bIncludeArgumentName:=False) - - clsMaxValue.AddParameter("sub_calculation", clsRFunctionParameter:=clsSpellOrGroupList, iPosition:=5) - clsMaxValue.SetAssignTo("spells") - - clsConsecutiveSum.bToScriptAsRString = True - clsConsecutiveSum.SetRCommand(".spells") - clsConsecutiveSum.AddParameter("x", strRainDay) + 'Max Summary + clsMaxSpellSummary.SetRCommand("instat_calculation$new") + clsMaxSpellSummary.AddParameter("type", Chr(34) & "summary" & Chr(34), iPosition:=0) + clsMaxSpellSummary.AddParameter("function_exp", clsRFunctionParameter:=clsMaxFunction, iPosition:=1) + clsMaxSpellSummary.AddParameter("save", 2, iPosition:=6) + clsMaxSpellSummary.AddParameter("result_name", Chr(34) & ucrInputNewColumnName.GetText() & Chr(34), iPosition:=3) + 'clsMaxSpellSummary.AddParameter("sub_calculation", clsRFunctionParameter:=clsMaxSpellSubCalcs, iPosition:=5) + clsMaxSpellSummary.AddParameter("manipulations", clsRFunctionParameter:=clsMaxSpellManipulation, iPosition:=5) + clsMaxSpellSummary.SetAssignTo("spells") + + clsMaxFunction.bToScriptAsRString = True + clsMaxFunction.SetRCommand("max") + clsMaxFunction.AddParameter("x", strSpellName) + + clsMaxSpellSubCalcs.SetRCommand("list") + clsMaxSpellSubCalcs.AddParameter("sub1", clsRFunctionParameter:=clsSpellLength, bIncludeArgumentName:=False, iPosition:=0) + clsMaxSpellSubCalcs.AddParameter("sub2", clsRFunctionParameter:=clsGroupBy, bIncludeArgumentName:=False, iPosition:=1) + + clsMaxSpellManipulation.SetRCommand("list") + clsMaxSpellManipulation.AddParameter("manip1", clsRFunctionParameter:=clsSpellLength, bIncludeArgumentName:=False, iPosition:=0) + clsMaxSpellManipulation.AddParameter("manip2", clsRFunctionParameter:=clsGroupBy, bIncludeArgumentName:=False, iPosition:=1) + clsMaxSpellManipulation.AddParameter("manip3", clsRFunctionParameter:=clsDayFilter, bIncludeArgumentName:=False, iPosition:=2) + + clsSpellsFunction.bToScriptAsRString = True + clsSpellsFunction.SetRCommand(".spells") + clsSpellsFunction.AddParameter("x", strSpellLogical) clsApplyInstatFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$run_instat_calculation") - clsApplyInstatFunction.AddParameter("calc", clsRFunctionParameter:=clsMaxValue, iPosition:=0) + clsApplyInstatFunction.AddParameter("calc", clsRFunctionParameter:=clsMaxSpellSummary, iPosition:=0) clsApplyInstatFunction.AddParameter("display", "FALSE", iPosition:=1) 'Base Function @@ -261,22 +260,22 @@ Public Class dlgSpells Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverDOY.AddAdditionalCodeParameterPair(clsDayFromOperator, New RParameter("doy", 0), iAdditionalPairNo:=1) - ucrReceiverElement.AddAdditionalCodeParameterPair(clsRRaindayLowerOperator, New RParameter("rain", 0), iAdditionalPairNo:=1) + ucrReceiverElement.AddAdditionalCodeParameterPair(clsSpellLogicalLowerOperator, New RParameter("rain", 0), iAdditionalPairNo:=1) ucrReceiverElement.AddAdditionalCodeParameterPair(clsGreaterThanOperator, New RParameter("rain", 0), iAdditionalPairNo:=2) ucrReceiverElement.AddAdditionalCodeParameterPair(clsLessThanOperator, New RParameter("rain", 0), iAdditionalPairNo:=3) ucrInputSpellUpper.AddAdditionalCodeParameterPair(clsGreaterThanOperator, New RParameter("left", 1), iAdditionalPairNo:=1) ucrInputSpellLower.AddAdditionalCodeParameterPair(clsLessThanOperator, New RParameter("left", 1), iAdditionalPairNo:=1) ucrReceiverDOY.SetRCode(clsDayToOperator, bReset) - ucrReceiverElement.SetRCode(clsRRaindayUpperOperator, bReset) - ucrInputSpellLower.SetRCode(clsRRaindayLowerOperator, bReset) - ucrInputSpellUpper.SetRCode(clsRRaindayUpperOperator, bReset) - ucrInputNewColumnName.SetRCode(clsMaxValue, bReset) - ucrChkConditional.SetRCode(clsConsecutiveSum, bReset) + ucrReceiverElement.SetRCode(clsSpellLogicalUpperOperator, bReset) + ucrInputSpellLower.SetRCode(clsSpellLogicalLowerOperator, bReset) + ucrInputSpellUpper.SetRCode(clsSpellLogicalUpperOperator, bReset) + ucrInputNewColumnName.SetRCode(clsMaxSpellSummary, bReset) + ucrChkConditional.SetRCode(clsSpellsFunction, bReset) End Sub Private Sub cmdDoyRange_Click(sender As Object, e As EventArgs) Handles cmdDoyRange.Click - sdgDoyRange.Setup(clsNewDoyFilterCalc:=clsDayFromAndTo, clsNewDayFromOperator:=clsDayFromOperator, clsNewDayToOperator:=clsDayToOperator, clsNewCalcFromList:=clsDayFilterCalcFromList, strNewMainDataFrame:=ucrSelectorForSpells.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strNewDoyColumn:=ucrReceiverDOY.GetVariableNames(False)) + sdgDoyRange.Setup(clsNewDoyFilterCalc:=clsDayFilter, clsNewDayFromOperator:=clsDayFromOperator, clsNewDayToOperator:=clsDayToOperator, clsNewCalcFromList:=clsDayFilterCalcFromList, strNewMainDataFrame:=ucrSelectorForSpells.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strNewDoyColumn:=ucrReceiverDOY.GetVariableNames(False)) sdgDoyRange.ShowDialog() UpdateDayFilterPreview() End Sub @@ -299,30 +298,30 @@ Public Class dlgSpells Select Case ucrInputCondition.GetText Case "<=" ucrInputSpellLower.Visible = False - clsRRaindayAndOperator.RemoveParameterByName("upper") - clsRRaindayUpperOperator.RemoveParameterByName("max") - clsRRaindayAndOperator.AddParameter("lower", clsROperatorParameter:=clsRRaindayLowerOperator, iPosition:=0) - clsRRaindayLowerOperator.AddParameter("min", ucrInputSpellUpper.GetText, iPosition:=1) - clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsRRaindayLowerOperator, iPosition:=0) + clsSpellLogicalAndOperator.RemoveParameterByName("upper") + clsSpellLogicalUpperOperator.RemoveParameterByName("max") + clsSpellLogicalAndOperator.AddParameter("lower", clsROperatorParameter:=clsSpellLogicalLowerOperator, iPosition:=0) + clsSpellLogicalLowerOperator.AddParameter("min", ucrInputSpellUpper.GetText, iPosition:=1) + clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalLowerOperator, iPosition:=0) Case "Between" ' match(Rain>=LEFT & Rain<=RIGHT, 1, nomatch = 0) ucrInputSpellLower.Visible = True - clsRRaindayAndOperator.AddParameter("lower", clsROperatorParameter:=clsRRaindayLowerOperator, iPosition:=0) - clsRRaindayLowerOperator.AddParameter("min", ucrInputSpellLower.GetText, iPosition:=1) - clsRRaindayAndOperator.AddParameter("upper", clsROperatorParameter:=clsRRaindayUpperOperator, iPosition:=0) - clsRRaindayUpperOperator.AddParameter("max", ucrInputSpellUpper.GetText, iPosition:=1) - clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsRRaindayAndOperator, iPosition:=0) + clsSpellLogicalAndOperator.AddParameter("lower", clsROperatorParameter:=clsSpellLogicalLowerOperator, iPosition:=0) + clsSpellLogicalLowerOperator.AddParameter("min", ucrInputSpellLower.GetText, iPosition:=1) + clsSpellLogicalAndOperator.AddParameter("upper", clsROperatorParameter:=clsSpellLogicalUpperOperator, iPosition:=0) + clsSpellLogicalUpperOperator.AddParameter("max", ucrInputSpellUpper.GetText, iPosition:=1) + clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalAndOperator, iPosition:=0) Case "Outer" ucrInputSpellLower.Visible = True - clsRRaindayAndOperator.AddParameter("upper", clsROperatorParameter:=clsGreaterThanOperator, iPosition:=0) - clsRRaindayAndOperator.AddParameter("lower", clsROperatorParameter:=clsLessThanOperator, iPosition:=1) - clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsRRaindayAndOperator, iPosition:=2) + clsSpellLogicalAndOperator.AddParameter("upper", clsROperatorParameter:=clsGreaterThanOperator, iPosition:=0) + clsSpellLogicalAndOperator.AddParameter("lower", clsROperatorParameter:=clsLessThanOperator, iPosition:=1) + clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalAndOperator, iPosition:=2) Case ">=" ucrInputSpellLower.Visible = False - clsRRaindayAndOperator.RemoveParameterByName("lower") - clsRRaindayLowerOperator.RemoveParameterByName("min") - clsRRaindayAndOperator.AddParameter("upper", clsROperatorParameter:=clsRRaindayUpperOperator, iPosition:=0) - clsRRaindayUpperOperator.AddParameter("max", ucrInputSpellUpper.GetText, iPosition:=1) - clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsRRaindayUpperOperator, iPosition:=0) + clsSpellLogicalAndOperator.RemoveParameterByName("lower") + clsSpellLogicalLowerOperator.RemoveParameterByName("min") + clsSpellLogicalAndOperator.AddParameter("upper", clsROperatorParameter:=clsSpellLogicalUpperOperator, iPosition:=0) + clsSpellLogicalUpperOperator.AddParameter("max", ucrInputSpellUpper.GetText, iPosition:=1) + clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalUpperOperator, iPosition:=0) End Select End Sub @@ -331,7 +330,7 @@ Public Class dlgSpells End Sub Private Sub RainDays() - clsRRainday.AddParameter("calculated_from", " list(" & strCurrDataName & "=" & ucrReceiverElement.GetVariableNames() & ")", iPosition:=0) + clsSpellLogicalCalc.AddParameter("calculated_from", " list(" & strCurrDataName & "=" & ucrReceiverElement.GetVariableNames() & ")", iPosition:=0) End Sub Private Sub GroupByOptions() @@ -351,13 +350,15 @@ Public Class dlgSpells UpdateDayFilterPreview() End Sub - Private Sub ucrChkConditional_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrChkConditional.ControlContentsChanged + Private Sub ucrChkConditional_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkConditional.ControlValueChanged If ucrChkConditional.Checked Then - clsMaxValue.AddParameter("sub_calculation", clsRFunctionParameter:=clsSpellOrGroupList, iPosition:=5) - clsGroupBy.RemoveParameterByName("sub_calculation") + clsMaxSpellSummary.AddParameter("sub_calculation", clsRFunctionParameter:=clsMaxSpellSubCalcs, iPosition:=5) + clsMaxSpellManipulation.RemoveParameterByName("manip1") + clsMaxSpellManipulation.RemoveParameterByName("manip2") Else - clsGroupBy.AddParameter("sub_calculation", clsRFunctionParameter:=clsSpellOrGroupList, iPosition:=5) - clsMaxValue.RemoveParameterByName("sub_calculation") + clsMaxSpellSummary.RemoveParameterByName("sub_calculation") + clsMaxSpellManipulation.AddParameter("manip1", clsRFunctionParameter:=clsSpellLength, bIncludeArgumentName:=False, iPosition:=0) + clsMaxSpellManipulation.AddParameter("manip2", clsRFunctionParameter:=clsGroupBy, bIncludeArgumentName:=False, iPosition:=1) End If End Sub diff --git a/instat/sdgSummaries.resx b/instat/sdgSummaries.resx index 777c4a8df66..8821f41fff0 100644 --- a/instat/sdgSummaries.resx +++ b/instat/sdgSummaries.resx @@ -227,17 +227,14 @@ - 4, 25 + 4, 22 - - 4, 4, 4, 4 - - 4, 4, 4, 4 + 3, 3, 3, 3 - 532, 478 + 417, 386 @@ -262,13 +259,10 @@ True - 432, 87 - - - 4, 0, 4, 0 + 324, 71 - 20, 17 + 15, 13 10 @@ -289,13 +283,13 @@ 0 - 364, 84 + 273, 68 - 9, 7, 9, 7 + 7, 6, 7, 6 - 67, 26 + 50, 21 9 @@ -313,13 +307,13 @@ 1 - 15, 52 + 11, 42 - 7, 6, 7, 6 + 5, 5, 5, 5 - 303, 25 + 227, 20 3 @@ -337,13 +331,13 @@ 2 - 364, 52 + 273, 42 - 7, 6, 7, 6 + 5, 5, 5, 5 - 67, 25 + 50, 20 4 @@ -361,13 +355,13 @@ 3 - 364, 123 + 273, 100 - 7, 6, 7, 6 + 5, 5, 5, 5 - 67, 25 + 50, 20 8 @@ -385,13 +379,13 @@ 4 - 15, 123 + 11, 100 - 7, 6, 7, 6 + 5, 5, 5, 5 - 343, 25 + 257, 20 7 @@ -409,13 +403,13 @@ 5 - 15, 16 + 11, 13 - 7, 6, 7, 6 + 5, 5, 5, 5 - 303, 25 + 227, 20 1 @@ -433,13 +427,13 @@ 6 - 15, 87 + 11, 71 - 7, 6, 7, 6 + 5, 5, 5, 5 - 303, 25 + 227, 20 5 @@ -457,13 +451,13 @@ 7 - 364, 16 + 273, 13 - 7, 6, 7, 6 + 5, 5, 5, 5 - 67, 25 + 50, 20 2 @@ -480,6 +474,93 @@ 8 + + grpProportionsPercentiles + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbMore + + + 0 + + + grpLocation + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbMore + + + 1 + + + grpScale + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbMore + + + 2 + + + grpSkewness + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbMore + + + 3 + + + grpKurtosis + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbMore + + + 4 + + + 4, 22 + + + 3, 3, 3, 3 + + + 374, 386 + + + 1 + + + More + + + tbMore + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbSummaries + + + 1 + ucrInputCountValue @@ -589,16 +670,10 @@ 8 - 13, 7 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 + 10, 6 - 475, 123 + 356, 100 0 @@ -618,407 +693,137 @@ 0 - - lblFractionTrimmed + + 143, 70 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 7, 6, 7, 6 - - grpLocation + + 51, 20 - - 0 + + 8 - - ucrNudFraction + + ucrInputCountValue - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpLocation + + grpProportionsPercentiles - - 1 + + 0 - - ucrChkTrimmedMean + + - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 86, 70 - - grpLocation + + 7, 6, 7, 6 - - 2 + + 51, 25 - - 13, 138 + + 7 - - 4, 4, 4, 4 + + ucrInputComboCountTest - - 4, 4, 4, 4 + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 475, 64 + + grpProportionsPercentiles - + 1 - - Location - - - grpLocation + + 7, 45 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 5, 5, 5, 5 - - tbMore + + 75, 20 - - 1 + + 2 - - ucrChkQn + + ucrChkProportion - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpScale + + grpProportionsPercentiles - - 0 + + 2 - - ucrChkSn + + 7, 71 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpScale + + 75, 20 - - 1 + + 5 - - ucrChkCoefficientOfVariation + + ucrChkCount - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpScale + + grpProportionsPercentiles - - 2 + + 3 - - ucrChkMedianAbsoluteDeviation + + 232, 45 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpScale + + 101, 20 - - 3 + + 6 - - 13, 209 + + ucrChkPercentage - - 4, 4, 4, 4 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 4, 4, 4, 4 + + grpProportionsPercentiles - - 475, 91 + + 4 - - 2 - - - Scale - - - grpScale - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbMore - - - 2 - - - ucrChkMc - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpSkewness - - - 0 - - - ucrChkSkewness - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpSkewness - - - 1 - - - 13, 308 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 - - - 475, 60 - - - 3 - - - Skewness - - - grpSkewness - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbMore - - - 3 - - - ucrChkKurtosis - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpKurtosis - - - 0 - - - 13, 375 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 - - - 475, 62 - - - 4 - - - Kurtosis - - - grpKurtosis - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbMore - - - 4 - - - 4, 25 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 - - - 537, 478 - - - 1 - - - More - - - tbMore - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbSummaries - - - 1 - - - 191, 86 - - - 9, 7, 9, 7 - - - 68, 25 - - - 8 - - - ucrInputCountValue - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 0 - - - - - - 115, 86 - - - 9, 7, 9, 7 - - - 68, 31 - - - 7 - - - ucrInputComboCountTest - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 1 - - - 9, 55 - - - 7, 6, 7, 6 - - - 100, 25 - - - 2 - - - ucrChkProportion - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 2 - - - 9, 87 - - - 7, 6, 7, 6 - - - 100, 25 - - - 5 - - - ucrChkCount - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 3 - - - 309, 55 - - - 7, 6, 7, 6 - - - 135, 25 - - - 6 - - - ucrChkPercentage - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpProportionsPercentiles - - - 4 - - - 192, 53 + + 144, 43 - 9, 7, 9, 7 + 7, 6, 7, 6 - 68, 25 + 51, 20 4 @@ -1039,13 +844,13 @@ - 116, 53 + 87, 43 - 9, 7, 9, 7 + 7, 6, 7, 6 - 68, 31 + 51, 25 3 @@ -1063,13 +868,13 @@ 6 - 117, 22 + 88, 18 - 9, 7, 9, 7 + 7, 6, 7, 6 - 68, 25 + 51, 20 1 @@ -1087,13 +892,13 @@ 7 - 9, 23 + 7, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 100, 25 + 75, 20 0 @@ -1110,6 +915,66 @@ 8 + + lblFractionTrimmed + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLocation + + + 0 + + + ucrNudFraction + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocation + + + 1 + + + ucrChkTrimmedMean + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocation + + + 2 + + + 10, 112 + + + 356, 52 + + + 1 + + + Location + + + grpLocation + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbMore + + + 1 + True @@ -1117,13 +982,10 @@ NoControl - 273, 26 - - - 4, 0, 4, 0 + 205, 21 - 122, 17 + 91, 13 1 @@ -1144,13 +1006,13 @@ 0 - 397, 22 + 298, 18 - 7, 6, 7, 6 + 5, 5, 5, 5 - 67, 25 + 50, 20 2 @@ -1168,13 +1030,13 @@ 1 - 9, 23 + 7, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 160, 25 + 120, 20 0 @@ -1191,14 +1053,86 @@ 2 + + ucrChkQn + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpScale + + + 0 + + + ucrChkSn + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpScale + + + 1 + + + ucrChkCoefficientOfVariation + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpScale + + + 2 + + + ucrChkMedianAbsoluteDeviation + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpScale + + + 3 + + + 10, 170 + + + 356, 74 + + + 2 + + + Scale + + + grpScale + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbMore + + + 2 + - 309, 23 + 232, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 101, 25 + 76, 20 2 @@ -1216,13 +1150,13 @@ 0 - 309, 55 + 232, 45 - 7, 6, 7, 6 + 5, 5, 5, 5 - 101, 25 + 76, 20 3 @@ -1240,13 +1174,13 @@ 1 - 9, 23 + 7, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 232, 25 + 174, 20 0 @@ -1264,13 +1198,13 @@ 2 - 8, 55 + 6, 45 - 7, 6, 7, 6 + 5, 5, 5, 5 - 232, 25 + 174, 20 1 @@ -1287,18 +1221,6 @@ 3 - - 309, 23 - - - 7, 6, 7, 6 - - - 101, 25 - - - 1 - ucrChkMc @@ -1311,18 +1233,6 @@ 0 - - 9, 23 - - - 7, 6, 7, 6 - - - 232, 25 - - - 0 - ucrChkSkewness @@ -1335,228 +1245,162 @@ 1 - - 9, 23 - - - 7, 6, 7, 6 - - - 160, 25 - - - 0 - - - ucrChkKurtosis - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpKurtosis - - - 0 - - - ucrChkn_distinct - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCommon - - - 0 - - - ucrChkNTotal - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCommon - - - 1 - - - ucrChkMode - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCommon - - - 2 - - - ucrChkNMissing - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 10, 250 - - grpCommon + + 356, 49 - + 3 - - ucrChkNonMissing - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + Skewness - - grpCommon + + grpSkewness - - 4 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 13, 7 + + tbMore - - 4, 4, 4, 4 + + 3 - - 4, 4, 4, 4 + + 232, 19 - - 475, 123 + + 5, 5, 5, 5 - - 0 + + 76, 20 - - Common + + 1 - - grpCommon + + ucrChkMc - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbsum + + grpSkewness - + 0 - - ucrChkLowerQuartile + + 7, 19 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpQuartiles + + 174, 20 - + 0 - - ucrChkUpperQuartile + + ucrChkSkewness - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpQuartiles + + grpSkewness - + 1 - - 13, 370 + + ucrChkKurtosis - - 4, 4, 4, 4 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 4, 4, 4, 4 + + grpKurtosis - - 475, 69 + + 0 - - 3 + + 10, 305 - - Quartiles + + 356, 50 - - grpQuartiles + + 4 - + + Kurtosis + + + grpKurtosis + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tbsum + + tbMore - - 1 + + 4 - - ucrChkRange + + 7, 19 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpNotOrderedFactor + + 120, 20 - + 0 - - ucrChkMaximum + + ucrChkKurtosis - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpNotOrderedFactor - - - 1 + + grpKurtosis - - ucrChkMinimum + + 0 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + grpCommon - - grpNotOrderedFactor + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2 + + tbsum - - 13, 138 + + 0 - - 4, 4, 4, 4 + + grpQuartiles - - 4, 4, 4, 4 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 475, 95 + + tbsum - + 1 - - All but (unordered) Factor - grpNotOrderedFactor @@ -1569,134 +1413,137 @@ 2 - - ucrChkVariance + + grpNumeric - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpNumeric + + tbsum - - 0 + + 3 - - ucrChkMedian + + 4, 22 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 3, 3, 3, 3 - - grpNumeric + + 374, 386 - - 1 + + 0 - - ucrChkStdDev + + Summaries - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + tbsum - - grpNumeric + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2 + + tbSummaries - - ucrChkSum + + 0 - + + ucrChkn_distinct + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpNumeric + + grpCommon - - 3 + + 0 - - ucrChkMean + + ucrChkNTotal - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpNumeric - - - 4 - - - 13, 240 + + grpCommon - - 4, 4, 4, 4 + + 1 - - 4, 4, 4, 4 + + ucrChkMode - - 475, 123 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 2 + + grpCommon - - Numeric + + 2 - - grpNumeric + + ucrChkNMissing - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbsum + + grpCommon - + 3 - - 4, 25 + + ucrChkNonMissing - - 4, 4, 4, 4 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 4, 4, 4, 4 + + grpCommon - - 537, 478 + + 4 - + + 10, 6 + + + 356, 100 + + 0 - - Summaries + + Common - - tbsum + + grpCommon - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tbSummaries + + tbsum - + 0 - 9, 87 + 7, 71 - 7, 6, 7, 6 + 5, 5, 5, 5 - 135, 25 + 101, 20 2 @@ -1714,13 +1561,13 @@ 0 - 309, 23 + 232, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 3 @@ -1738,13 +1585,13 @@ 1 - 309, 55 + 232, 45 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 4 @@ -1762,13 +1609,13 @@ 2 - 9, 55 + 7, 45 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 1 @@ -1786,13 +1633,13 @@ 3 - 9, 23 + 7, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 0 @@ -1809,14 +1656,62 @@ 4 + + ucrChkLowerQuartile + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpQuartiles + + + 0 + + + ucrChkUpperQuartile + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpQuartiles + + + 1 + + + 10, 301 + + + 356, 56 + + + 3 + + + Quartiles + + + grpQuartiles + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbsum + + + 1 + - 9, 23 + 7, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 0 @@ -1834,13 +1729,13 @@ 0 - 309, 23 + 232, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 1 @@ -1857,14 +1752,74 @@ 1 + + ucrChkRange + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpNotOrderedFactor + + + 0 + + + ucrChkMaximum + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpNotOrderedFactor + + + 1 + + + ucrChkMinimum + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpNotOrderedFactor + + + 2 + + + 10, 112 + + + 356, 77 + + + 1 + + + All but (unordered) Factor + + + grpNotOrderedFactor + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbsum + + + 2 + - 9, 55 + 7, 45 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 1 @@ -1882,13 +1837,13 @@ 0 - 309, 23 + 232, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 2 @@ -1905,38 +1860,122 @@ 1 - - 9, 23 + + 7, 19 + + + 5, 5, 5, 5 + + + 100, 20 + + + 0 + + + ucrChkMinimum + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpNotOrderedFactor + + + 2 + + + ucrChkVariance + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpNumeric + + + 0 + + + ucrChkMedian + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpNumeric + + + 1 + + + ucrChkStdDev + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpNumeric + + + 2 + + + ucrChkSum + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpNumeric + + + 3 + + + ucrChkMean + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpNumeric + + + 4 + + + 10, 195 - - 7, 6, 7, 6 + + 356, 100 - - 133, 25 + + 2 - - 0 + + Numeric - - ucrChkMinimum + + grpNumeric - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpNotOrderedFactor + + tbsum - - 2 + + 3 - 9, 87 + 7, 71 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 2 @@ -1954,13 +1993,13 @@ 0 - 309, 23 + 232, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 3 @@ -1978,13 +2017,13 @@ 1 - 309, 55 + 232, 45 - 7, 6, 7, 6 + 5, 5, 5, 5 - 163, 25 + 122, 20 4 @@ -2002,13 +2041,13 @@ 2 - 9, 23 + 7, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 0 @@ -2026,13 +2065,13 @@ 3 - 9, 55 + 7, 45 - 7, 6, 7, 6 + 5, 5, 5, 5 - 133, 25 + 100, 20 1 @@ -2074,16 +2113,10 @@ 1 - 4, 7 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 + 3, 6 - 481, 90 + 361, 73 3 @@ -2110,13 +2143,10 @@ NoControl - 321, 143 - - - 4, 0, 4, 0 + 241, 116 - 116, 17 + 88, 13 1 @@ -2137,13 +2167,13 @@ 1 - 11, 101 + 8, 82 0, 0, 0, 0 - 280, 222 + 210, 180 0 @@ -2164,19 +2194,19 @@ True - 8, 16 + 6, 13 - 530, 570 + 437, 463 - 173, 525 + 130, 426 - 5, 5, 5, 5 + 4, 4, 4, 4 - 170, 31 + 150, 31 1 @@ -2193,9 +2223,6 @@ 0 - - 4, 4, 4, 4 - CenterParent @@ -2209,13 +2236,13 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 317, 162 + 238, 132 0, 0, 0, 0 - 160, 25 + 120, 20 2 @@ -2233,16 +2260,13 @@ 3 - 4, 25 - - - 4, 4, 4, 4 + 4, 22 - 4, 4, 4, 4 + 3, 3, 3, 3 - 532, 478 + 374, 386 5 @@ -2292,323 +2316,113 @@ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tbPosition - - - 2 - - - ucrSelectorOrderBy - - - instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbPosition - - - 3 - - - ucrReceiverOrderBy - - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbPosition - - - 4 - - - 4, 25 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 - - - 532, 478 - - - 7 - - - Position - - - tbPosition - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbSummaries - - - 3 - - - ucrChkStandardErrorOfMean - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbModel - - - 0 - - - 4, 25 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 - - - 532, 478 - - - 6 - - - Model - - - tbModel - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbSummaries - - - 4 - - - ucrChkA1 - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircScale - - - 0 - - - ucrChkCircRange - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircScale - - - 1 - - - ucrChkAngVar - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircScale - - - 2 - - - ucrChkrho - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircScale - - - 3 - - - ucrChkAngDev - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircScale - - - 4 - - - ucrChkVar - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircScale - - - 5 - - - ucrChkSd - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircScale - - - 6 - - - 6, 144 - - - 493, 170 - - - 1 - - - Scale - - - grpCircScale - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbCircular - - - 0 - - - ucrChkQuantile - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + tbPosition - - grpCircLocation + + 2 - - 0 + + ucrSelectorOrderBy - - ucrChkCircMedian + + instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + tbPosition - - grpCircLocation + + 3 - - 1 + + ucrReceiverOrderBy - - ucrChkMin + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + tbPosition - - grpCircLocation + + 4 - - 2 + + 4, 22 - - ucrChkMedianH + + 3, 3, 3, 3 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 374, 386 - - grpCircLocation + + 7 - - 3 + + Position - - ucrChkQ3 + + tbPosition - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpCircLocation + + tbSummaries - - 4 + + 3 - - ucrChkQ1 + + ucrChkStandardErrorOfMean - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpCircLocation + + tbModel - - 5 + + 0 - - ucrChkMax + + 4, 22 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 3, 3, 3, 3 - - grpCircLocation + + 374, 386 - + 6 - - ucrChkCircMean + + Model - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + tbModel - - grpCircLocation + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 7 + + tbSummaries - - 6, 0 + + 4 - - 493, 138 + + grpCircScale - - 0 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Location + + tbCircular + + + 0 grpCircLocation @@ -2623,13 +2437,16 @@ 1 - 4, 25 + 4, 22 + + + 2, 2, 2, 2 - 3, 3, 3, 3 + 2, 2, 2, 2 - 502, 478 + 410, 386 8 @@ -2650,13 +2467,10 @@ 6 - 9, 9 - - - 4, 4, 4, 4 + 7, 7 - 510, 507 + 425, 412 0 @@ -2674,13 +2488,13 @@ 1 - 9, 55 + 7, 45 - 7, 6, 7, 6 + 5, 5, 5, 5 - 135, 25 + 101, 20 1 @@ -2698,13 +2512,13 @@ 0 - 9, 23 + 7, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 195, 25 + 146, 20 0 @@ -2722,13 +2536,13 @@ 1 - 16, 124 + 12, 101 - 7, 6, 7, 6 + 5, 5, 5, 5 - 251, 25 + 188, 20 5 @@ -2752,13 +2566,10 @@ NoControl - 323, 207 - - - 4, 0, 4, 0 + 242, 168 - 69, 17 + 51, 13 8 @@ -2839,16 +2650,10 @@ 4 - 8, 7 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 + 6, 6 - 475, 91 + 356, 74 6 @@ -2869,13 +2674,13 @@ 2 - 372, 22 + 279, 18 - 9, 7, 9, 7 + 7, 6, 7, 6 - 85, 25 + 64, 20 3 @@ -2899,13 +2704,10 @@ NoControl - 348, 26 - - - 4, 0, 4, 0 + 261, 21 - 20, 17 + 16, 13 2 @@ -2926,13 +2728,13 @@ 1 - 9, 23 + 7, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 - 135, 25 + 101, 20 0 @@ -2950,13 +2752,13 @@ 2 - 9, 55 + 7, 45 - 7, 6, 7, 6 + 5, 5, 5, 5 - 135, 25 + 101, 20 4 @@ -2974,109 +2776,223 @@ 3 - 284, 23 + 213, 19 - 7, 6, 7, 6 + 5, 5, 5, 5 + + + 41, 20 + + + 1 + + + ucrChknth + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpPosition + + + 4 + + + 18, 140 + + + 0, 0, 0, 0 + + + 210, 180 + + + 7 + + + ucrSelectorOrderBy + + + instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tbPosition + + + 3 + + + 239, 184 + + + 0, 0, 0, 0 + + + 120, 20 + + + 9 + + + ucrReceiverOrderBy + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tbPosition + + + 4 + + + 16, 21 + + + 5, 5, 5, 5 + + + 295, 20 + + + 1 + + + ucrChkStandardErrorOfMean + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tbModel + + + 0 + + + ucrChkA1 + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpCircScale + + + 0 + + + ucrChkCircRange + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 55, 25 + + grpCircScale - + 1 - - ucrChknth + + ucrChkAngVar - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpPosition + + grpCircScale - - 4 + + 2 - - 24, 172 + + ucrChkrho - - 0, 0, 0, 0 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 280, 222 + + grpCircScale - - 7 + + 3 - - ucrSelectorOrderBy + + ucrChkAngDev - - instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbPosition + + grpCircScale - - 3 + + 4 - - 319, 226 + + ucrChkVar - - 0, 0, 0, 0 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 160, 25 + + grpCircScale - - 9 + + 5 - - ucrReceiverOrderBy + + ucrChkSd - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbPosition + + grpCircScale - - 4 + + 6 - - 21, 26 + + 4, 117 - - 7, 6, 7, 6 + + 2, 2, 2, 2 - - 393, 25 + + 2, 2, 2, 2 - + + 412, 138 + + 1 - - ucrChkStandardErrorOfMean + + Scale - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + grpCircScale - - tbModel + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + tbCircular + + 0 - 8, 135 + 6, 110 - 5, 5, 5, 5 + 4, 4, 4, 4 - 116, 25 + 87, 20 8 @@ -3094,13 +3010,13 @@ 0 - 328, 76 + 246, 62 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 7 @@ -3118,13 +3034,13 @@ 1 - 328, 41 + 246, 33 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 6 @@ -3142,13 +3058,13 @@ 2 - 159, 85 + 119, 69 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 5 @@ -3166,13 +3082,13 @@ 3 - 8, 85 + 6, 69 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 4 @@ -3190,13 +3106,13 @@ 4 - 159, 41 + 119, 33 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 3 @@ -3214,13 +3130,13 @@ 5 - 8, 41 + 6, 33 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 2 @@ -3237,14 +3153,140 @@ 6 + + ucrChkQuantile + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpCircLocation + + + 0 + + + ucrChkCircMedian + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpCircLocation + + + 1 + + + ucrChkMin + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpCircLocation + + + 2 + + + ucrChkMedianH + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpCircLocation + + + 3 + + + ucrChkQ3 + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpCircLocation + + + 4 + + + ucrChkQ1 + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpCircLocation + + + 5 + + + ucrChkMax + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpCircLocation + + + 6 + + + ucrChkCircMean + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpCircLocation + + + 7 + + + 4, 0 + + + 2, 2, 2, 2 + + + 2, 2, 2, 2 + + + 412, 112 + + + 0 + + + Location + + + grpCircLocation + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbCircular + + + 1 + - 380, 93 + 285, 76 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 7 @@ -3262,13 +3304,13 @@ 0 - 145, 32 + 109, 26 - 5, 5, 5, 5 + 4, 4, 4, 4 - 108, 25 + 81, 20 6 @@ -3286,13 +3328,13 @@ 1 - 264, 32 + 198, 26 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 5 @@ -3310,13 +3352,13 @@ 2 - 380, 32 + 285, 26 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 4 @@ -3334,13 +3376,13 @@ 3 - 264, 93 + 198, 76 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 3 @@ -3358,13 +3400,13 @@ 4 - 145, 93 + 109, 76 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 2 @@ -3382,13 +3424,13 @@ 5 - 8, 93 + 6, 76 - 5, 5, 5, 5 + 4, 4, 4, 4 - 106, 25 + 80, 20 1 @@ -3406,13 +3448,13 @@ 6 - 8, 32 + 6, 26 - 5, 5, 5, 5 + 4, 4, 4, 4 - 115, 25 + 86, 20 0 diff --git a/instat/sdgSummaries.vb b/instat/sdgSummaries.vb index 053a8047d9c..cd4474b0c20 100644 --- a/instat/sdgSummaries.vb +++ b/instat/sdgSummaries.vb @@ -102,6 +102,11 @@ 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") + 'circular + ucrChkCircMean.SetParameter(New RParameter("summary_mean_circular", 23), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_mean_circular" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkCircMean.SetText("Mean") + + ucrReceiverSecondVariable.Selector = ucrSelectorSecondVariable ucrReceiverSecondVariable.SetMeAsReceiver() ucrReceiverSecondVariable.SetIncludedDataTypes({"numeric"}) @@ -226,7 +231,7 @@ Public Class sdgSummaries ucrChkStandardErrorOfMean.SetParameter(New RParameter("standard_error_mean", 30), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "standard_error_mean" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkStandardErrorOfMean.SetText("Standard Error of the Mean") - lstCheckboxes.AddRange({ucrChkNTotal, ucrChkNonMissing, ucrChkNMissing, ucrChkMean, ucrChkMinimum, ucrChkMode, ucrChkMaximum, ucrChkMedian, ucrChkStdDev, ucrChkVariance, ucrChkRange, ucrChkSum, ucrChkUpperQuartile, ucrChkLowerQuartile, ucrChkMedianAbsoluteDeviation, ucrChkKurtosis, ucrChkCoefficientOfVariation, ucrChkSkewness, ucrChkMc, ucrChkQn, ucrChkSn, ucrChkCorrelations, ucrChkCovariance, ucrChkFirst, ucrChkLast, ucrChknth, ucrChkn_distinct, ucrChkTrimmedMean, ucrChkPercentile, ucrChkProportion, ucrChkCount, ucrChkStandardErrorOfMean, ucrChkMaxNumMissing, ucrChkMinNumNonMissing, ucrChkMaxPercMissing, ucrChkConsecutiveMissing}) + lstCheckboxes.AddRange({ucrChkNTotal, ucrChkNonMissing, ucrChkNMissing, ucrChkMean, ucrChkMinimum, ucrChkMode, ucrChkMaximum, ucrChkMedian, ucrChkStdDev, ucrChkVariance, ucrChkRange, ucrChkSum, ucrChkUpperQuartile, ucrChkLowerQuartile, ucrChkMedianAbsoluteDeviation, ucrChkKurtosis, ucrChkCoefficientOfVariation, ucrChkSkewness, ucrChkMc, ucrChkQn, ucrChkSn, ucrChkCorrelations, ucrChkCovariance, ucrChkFirst, ucrChkLast, ucrChknth, ucrChkn_distinct, ucrChkTrimmedMean, ucrChkPercentile, ucrChkProportion, ucrChkCount, ucrChkStandardErrorOfMean, ucrChkMaxNumMissing, ucrChkMinNumNonMissing, ucrChkMaxPercMissing, ucrChkConsecutiveMissing, ucrChkCircMean}) For Each ctrTemp As ucrCheck In lstCheckboxes ctrTemp.SetParameterIncludeArgumentName(False) @@ -304,6 +309,7 @@ Public Class sdgSummaries ucrChknth.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) ucrChkn_distinct.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) ucrChkStandardErrorOfMean.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrChkCircMean.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) If bReset Then tbSummaries.SelectedIndex = 0 diff --git a/instat/static/InstatObject/R/Backend_Components/calculations.R b/instat/static/InstatObject/R/Backend_Components/calculations.R index 0b04d862ed7..334e9c112f0 100644 --- a/instat/static/InstatObject/R/Backend_Components/calculations.R +++ b/instat/static/InstatObject/R/Backend_Components/calculations.R @@ -326,7 +326,9 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list # If the current data has a filter and overall does not, then we should merge the current into the overall # We subset the current data to only have by and output columns so that merge doesn't produce duplicate columns # Overall sub data should be full data so we don't lose any data by subsetting the current sub calc - sub_calc_results[[c_data_label]] <- dplyr::full_join(sub_calc_results[[c_data_label]], curr_sub_calc[[c_data_label]][c(as.vector(by), sub_calc$result_name)], by = by) + sub_calc_cols <- as.vector(by) + if(sub_calc$result_name != "") sub_calc_cols <- c(sub_calc_cols, sub_calc$result_name) + sub_calc_results[[c_data_label]] <- dplyr::full_join(sub_calc_results[[c_data_label]], curr_sub_calc[[c_data_label]][sub_calc_cols], by = by) # Overall data has no filter so output does even though current does joined <- TRUE } diff --git a/instat/static/InstatObject/R/Backend_Components/summary_functions.R b/instat/static/InstatObject/R/Backend_Components/summary_functions.R index 654a77978f7..581fbe0deec 100644 --- a/instat/static/InstatObject/R/Backend_Components/summary_functions.R +++ b/instat/static/InstatObject/R/Backend_Components/summary_functions.R @@ -416,21 +416,21 @@ n_distinct_label="summary_n_distinct" proportion_label="proportion_calc" count_calc_label="count_calc" standard_error_mean_label="standard_error_mean" -circular_mean_label="circular_mean_label" -circular_median_label="circular_median_label" -circular_medianHL_label="circular_medianHL_label" -circular_min_label="circular_min_label" -circular_max_label="circular_max_label" -circular_Q1_label="circular_Q1_label" -circular_Q3_label="circular_Q3_label" -circular_quantile_label="circular_quantile_label" -circular_sd_label="circular_sd_label" -circular_var_label="circular_var_label" -circular_ang.dev_label="circular_ang.dev_label" -circular_ang.var_label="circular_ang.var_label" -circular_rho_label="circular_rho_label" -circular_range_label="circular_range_label" -circular_A1_label="circular_A1_label" +circular_mean_label="circular_mean" +circular_median_label="circular_median" +circular_medianHL_label="circular_medianHL" +circular_min_label="circular_min" +circular_max_label="circular_max" +circular_Q1_label="circular_Q1" +circular_Q3_label="circular_Q3" +circular_quantile_label="circular_quantile" +circular_sd_label="circular_sd" +circular_var_label="circular_var" +circular_ang.dev_label="circular_ang_dev" +circular_ang.var_label="circular_ang_var" +circular_rho_label="circular_rho" +circular_range_label="circular_range" +circular_A1_label="circular_A1" # list of all summary function names @@ -472,77 +472,82 @@ na_check <- function(x, na_type = c(), na_consecutive_n = NULL, na_max_n = NULL, return(all(res)) } - -summary_mean_circular <- function (x, na.rm = FALSE, na_type = "", control.circular = list(), ...) { - if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::mean.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) -} - -summary_median_circular <- function (x, na.rm = FALSE, na_type = "", control.circular = list(), ...) { +summary_mean_circular <- function (x, na.rm = FALSE, control.circular = list(), na_type = "", ...) { if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::median.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::mean.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]]) } - -summary_medianHL_circular <- function (x, na.rm = FALSE, method=c("HL1","HL2","HL3"), prop=NULL, na_type = "", control.circular = list(), ...) { +summary_median_circular <- function (x, na.rm = FALSE, na_type = "", ...) { + if(!na.rm & anyNA(x)) return(NA) if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::medianHL.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::median.circular(x, na.rm = na.rm)[[1]]) } - -summary_min_circular <- function (x, na.rm = FALSE, probs = 0, names = TRUE, na_type = "", control.circular = list(), ...) { +summary_medianHL_circular <- function (x, na.rm = FALSE, method = c("HL1","HL2","HL3"), prop = NULL, na_type = "", ...) { + if(!na.rm & anyNA(x)) return(NA) if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::quantile.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::medianHL.circular(x, na.rm = na.rm, method = method, prop = prop)[[1]]) } -summary_max_circular <- function (x, na.rm = FALSE, probs = 1, names = TRUE, na_type = "", control.circular = list(), ...) { +summary_min_circular <- function (x, na.rm = FALSE, names = FALSE, type = 7, na_type = "", ...) { + if(!na.rm & anyNA(x)) return(NA) if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::quantile.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::quantile.circular(x, probs = 0, na.rm = na.rm, names = names, type = type)[[1]]) } -summary_Q3_circular <- function (x, na.rm = FALSE, probs = 0.75, names = TRUE, na_type = "", control.circular = list(), ...) { +summary_max_circular <- function (x, na.rm = FALSE, names = FALSE, type = 7, na_type = "", ...) { + if(!na.rm & anyNA(x)) return(NA) if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::quantile.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::quantile.circular(x, probs = 1, na.rm = na.rm, names = names, type = type)[[1]]) } -summary_Q1_circular <- function (x, na.rm = FALSE, probs = 0.25, names = TRUE, na_type = "", control.circular = list(), ...) { +summary_Q3_circular <- function (x, na.rm = FALSE, names = FALSE, type = 7, na_type = "", ...) { + if(!na.rm & anyNA(x)) return(NA) if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::quantile.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::quantile.circular(x, probs = 0.75, na.rm = na.rm, names = names, type = type)[[1]]) } -summary_quantile_circular <- function (x, na.rm = FALSE, probs = seq(0, 1, 0.25), names = TRUE, na_type = "", control.circular = list(), ...) { +summary_Q1_circular <- function (x, na.rm = FALSE, names = FALSE, type = 7, na_type = "", ...) { + if(!na.rm & anyNA(x)) return(NA) if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::quantile.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::quantile.circular(x, probs = 0.25, na.rm = na.rm, names = names, type = type)[[1]]) } -summary_sd_circular <- function (x, na.rm = FALSE, names = TRUE, na_type = "", control.circular = list(), ...) { +summary_sd_circular <- function (x, na.rm = FALSE, na_type = "", ...) { if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::sd.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::sd.circular(x, na.rm = na.rm)) } -summary_var_circular <- function (x, na.rm = FALSE, names = TRUE, na_type = "", control.circular = list(), ...) { +summary_var_circular <- function (x, na.rm = FALSE, na_type = "", ...) { + if(length(x)==0 || (na.rm && length(x[!is.na(x)])==0)) return(NA) if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::var.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::var.circular(x, na.rm = na.rm)) } -summary_ang.dev_circular <- function (x, na.rm = FALSE, names = TRUE, na_type = "", control.circular = list(), ...) { +summary_ang_dev_circular <- function (x, na.rm = FALSE, na_type = "", ...) { + if(length(x)==0 || (na.rm && length(x[!is.na(x)])==0)) return(NA) if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::angular.deviation(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::angular.deviation(x, na.rm = na.rm)) } -summary_range_circular <- function (x, test=FALSE, na.rm = FALSE, names = TRUE,finite = FALSE, na_type = "", control.circular = list(), ...) { +summary_range_circular <- function (x, test = FALSE, na.rm = FALSE, finite = FALSE, control.circular = list(), na_type = "", ...) { + if(length(x)==0 || (na.rm && length(x[!is.na(x)])==0)) return(NA) if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::range.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::range.circular(x, test = test, na.rm = na.rm, finite = finite, control.circular = control.circular)[[1]]) } -summary_rho_circular <- function (x, test=FALSE, na.rm = FALSE, names = TRUE,finite = FALSE, na_type = "", control.circular = list(), ...) { +summary_rho_circular <- function (x, na.rm = FALSE, na_type = "", ...) { + if(length(x)==0 || (na.rm && length(x[!is.na(x)])==0)) return(NA) if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::rho.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) + else return(circular::rho.circular(x, na.rm = na.rm)) } -summary_range_circular <- function (x, test=FALSE, na.rm = FALSE, names = TRUE,finite = FALSE, na_type = "", control.circular = list(), ...) { - if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) - else return(suppressWarnings(circular::range.circular(x, na.rm = na.rm, trim = trim, control.circular = control.circular)[[1]])) +summary_mean <- function (x, add_cols, weights="", na.rm = FALSE, trim = 0, na_type = "", ...) { + if( length(x)==0 || (na.rm && length(x[!is.na(x)])==0) ) return(NA) + else { + if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA) + else return(mean(x, na.rm = na.rm, trim = trim)) + } } summary_trimmed_mean <- function (x, add_cols, weights="", na.rm = FALSE, trimmed = 0, na_type = "", ...) { diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index dd2142109e3..b762fb0704d 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1163,10 +1163,10 @@ hashed_id <- function(x, salt, algo = "crc32") { # Reduce(function(x,y) {y = dplyr::if_else(y == 0, 0, x + 1)}, z[-1], # init = dplyr::if_else(z[1] == 0, 0, NA_real_), accumulate = TRUE) # } -.spells <- function(x) { +.spells <- function(x, initial_value = NA_real_) { y <- mat.or.vec(length(x), 1) if(length(x) > 0) { - y[1] <- dplyr::if_else(x[1] == 0, 0, NA_real_) + y[1] <- dplyr::if_else(x[1] == 0, 0, initial_value + 1) if(length(x) > 1) { for(i in 2:length(x)) { y[i] <- dplyr::if_else(x[i] == 0, 0, y[i-1] + 1) @@ -1174,4 +1174,18 @@ hashed_id <- function(x, salt, algo = "crc32") { } } return(y) -} \ No newline at end of file +} + +convert_to_dec_deg <- function (dd, mm = 0 , ss = 0, dir) { + if(missing(dd)) stop("dd must be supplied") + if(!missing(dir)) { + dir <- toupper(dir) + if(!all(na.omit(dir) %in% c("E", "W", "N", "S"))) stop("dir must only contain direction letters E, W, N or S") + if(any(na.omit(dd) < 0)) stop("dd must be positive if dir is supplied") + } + if(!all(mm >= 0 & mm <= 60, na.rm = TRUE)) stop("mm must be between 0 and 60") + if(!all(ss >= 0 & ss <= 60, na.rm = TRUE)) stop("ss must be between 0 and 60") + sgn <- ifelse(is.na(dir), NA, ifelse(dir %in% c("S", "W"), -1, 1)) + decdeg <- (dd + ((mm * 60) + ss)/3600) * sgn + return(decdeg) +} diff --git a/instat/ucrGeom.vb b/instat/ucrGeom.vb index 56c7abed213..8a6b656dc55 100644 --- a/instat/ucrGeom.vb +++ b/instat/ucrGeom.vb @@ -420,8 +420,8 @@ Public Class ucrGeom clsgeom_contour.AddAesParameter("weight") ''add layer parameters - clsgeom_contour.AddLayerParameter("stat", "list", Chr(34) & "contour" & Chr(34), lstParameterStrings:={Chr(34) & "contour" & Chr(34)}) - clsgeom_contour.AddLayerParameter("position", "list", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) + clsgeom_contour.AddLayerParameter("stat", "editablelist", Chr(34) & "contour" & Chr(34), lstParameterStrings:={Chr(34) & "contour" & Chr(34)}) + clsgeom_contour.AddLayerParameter("position", "editablelist", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) clsgeom_contour.AddLayerParameter("lineend", "list", Chr(34) & "butt" & Chr(34), lstParameterStrings:={Chr(34) & "round" & Chr(34), Chr(34) & "butt" & Chr(34), Chr(34) & "square" & Chr(34)}) clsgeom_contour.AddLayerParameter("linejoin", "list", Chr(34) & "round" & Chr(34), lstParameterStrings:={Chr(34) & "round" & Chr(34), Chr(34) & "mitre" & Chr(34), Chr(34) & "bevel" & Chr(34)}) ''linemitre should 1 or a number >1 @@ -430,7 +430,7 @@ Public Class ucrGeom clsgeom_contour.AddLayerParameter("show.legend", "list", "NA", lstParameterStrings:={"NA", "TRUE", "FALSE"}) clsgeom_contour.AddLayerParameter("inherit.aes", "boolean", "TRUE") clsgeom_contour.AddLayerParameter("bins", "numeric", "1", lstParameterStrings:={0, 1}) - clsgeom_contour.AddLayerParameter("binwidth", "numeric", "0.01", lstParameterStrings:={3, 0}) + clsgeom_contour.AddLayerParameter("binwidth", "numeric", "0.01", lstParameterStrings:={3, 0.001}) clsgeom_contour.AddLayerParameter("colour", "colour", Chr(34) & "black" & Chr(34)) ''bin and binwidth could be added here as well. I am not sure if they are needed.... lstAllGeoms.Add(clsgeom_contour) @@ -585,8 +585,8 @@ Public Class ucrGeom ''Adding layer parameters 'not sure of other stats and positons here - clsgeom_density2d.AddLayerParameter("stat", "list", Chr(34) & "density2d" & Chr(34), lstParameterStrings:={Chr(34) & "density2d" & Chr(34)}) - clsgeom_density2d.AddLayerParameter("position", "list", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) + clsgeom_density2d.AddLayerParameter("stat", "editablelist", Chr(34) & "density2d" & Chr(34), lstParameterStrings:={Chr(34) & "density2d" & Chr(34)}) + clsgeom_density2d.AddLayerParameter("position", "editablelist", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) clsgeom_density2d.AddLayerParameter("lineend", "list", Chr(34) & "butt" & Chr(34), lstParameterStrings:={Chr(34) & "round" & Chr(34), Chr(34) & "butt" & Chr(34), Chr(34) & "square" & Chr(34)}) clsgeom_density2d.AddLayerParameter("linejoin", "list", Chr(34) & "round" & Chr(34), lstParameterStrings:={Chr(34) & "round" & Chr(34), Chr(34) & "mitre" & Chr(34), Chr(34) & "bevel" & Chr(34)}) clsgeom_density2d.AddLayerParameter("na.rm", "boolean", "FALSE") @@ -1077,8 +1077,8 @@ Public Class ucrGeom clsgeom_polygon.AddAesParameter("size") 'add layer parameters - clsgeom_polygon.AddLayerParameter("stat", "list", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) - clsgeom_polygon.AddLayerParameter("position", "list", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) + clsgeom_polygon.AddLayerParameter("stat", "editablelist", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) + clsgeom_polygon.AddLayerParameter("position", "editablelist", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) clsgeom_polygon.AddLayerParameter("lineed", "list", Chr(34) & "round" & Chr(34), lstParameterStrings:={Chr(34) & "round" & Chr(34), Chr(34) & "butt" & Chr(34), Chr(34) & "squire" & Chr(34)}) clsgeom_polygon.AddLayerParameter("linejoin", "list", Chr(34) & "round" & Chr(34), lstParameterStrings:={Chr(34) & "round" & Chr(34), Chr(34) & "mitre" & Chr(34), Chr(34) & "bevel" & Chr(34)}) clsgeom_polygon.AddLayerParameter("linemitre", "numeric", "0", lstParameterStrings:={1}) @@ -1390,8 +1390,8 @@ Public Class ucrGeom clsgeom_tile.AddAesParameter("height", strIncludedDataTypes:={"numeric"}) 'Global layer parameters - clsgeom_tile.AddLayerParameter("stat", "list", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) - clsgeom_tile.AddLayerParameter("position", "list", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) + clsgeom_tile.AddLayerParameter("stat", "editablelist", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) + clsgeom_tile.AddLayerParameter("position", "editablelist", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "identity" & Chr(34)}) clsgeom_tile.AddLayerParameter("show.legend", "list", "TRUE", lstParameterStrings:={"NA", "TRUE", "FALSE"}) clsgeom_tile.AddLayerParameter("inherit.aes", "list", "TRUE", lstParameterStrings:={"TRUE", "FALSE"}) clsgeom_tile.AddLayerParameter("na.rm", "list", "FALSE", lstParameterStrings:={"TRUE", "FALSE"}) @@ -1427,8 +1427,8 @@ Public Class ucrGeom clsgeom_tufteboxplot.AddAesParameter("alpha", strIncludedDataTypes:={"factor", "numeric"}) 'Layer parameters - clsgeom_tufteboxplot.AddLayerParameter("stat", "list", Chr(34) & "fivenumber" & Chr(34), lstParameterStrings:={Chr(34) & "fivenumber" & Chr(34)}) - clsgeom_tufteboxplot.AddLayerParameter("position", "list", Chr(34) & "dodge" & Chr(34), lstParameterStrings:={Chr(34) & "dodge" & Chr(34)}) + clsgeom_tufteboxplot.AddLayerParameter("stat", "editablelist", Chr(34) & "fivenumber" & Chr(34), lstParameterStrings:={Chr(34) & "fivenumber" & Chr(34)}) + clsgeom_tufteboxplot.AddLayerParameter("position", "editablelist", Chr(34) & "dodge" & Chr(34), lstParameterStrings:={Chr(34) & "dodge" & Chr(34)}) clsgeom_tufteboxplot.AddLayerParameter("outlier.colour", "colour", Chr(34) & "black" & Chr(34)) clsgeom_tufteboxplot.AddLayerParameter("outlier.shape", "list", Chr(34) & "circle" & Chr(34), lstParameterStrings:=strShapePoint) clsgeom_tufteboxplot.AddLayerParameter("outlier.size", "numeric", "1.5", lstParameterStrings:={1, 0})