diff --git a/instat/UserTables/sdgTableOptions.vb b/instat/UserTables/sdgTableOptions.vb
index 53386ef1e0b..7140bb5b89d 100644
--- a/instat/UserTables/sdgTableOptions.vb
+++ b/instat/UserTables/sdgTableOptions.vb
@@ -41,16 +41,12 @@ Public Class sdgTableOptions
End Sub
'''
- ''' An R operateor that has a parameter named "gt" set up.
- ''' The parameter should be an R Function that generates script "gt:gt()" as part of the last script statement.
+ ''' Sets up the sub dialog.
+ ''' Expected to be called before showing the dialog.
'''
- '''
+ ''' Name of the data frame contained in the data book
+ ''' R operator that has a 'gt' parameter that produces a 'gt' object.
Public Sub Setup(strDataFrameName As String, clsNewOperator As ROperator)
- If clsTablesUtils.FindRFunctionsParamsWithRCommand({"gt"}, clsNewOperator).Count = 0 Then
- MsgBox("Developer Error: Parameter with 'gt' as name MUST be set up before using this subdialog")
- Exit Sub
- End If
-
clsOperator = clsNewOperator
ucrHeader.Setup(clsOperator)
diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb
index b91b6e66159..122ed4dfdcd 100644
--- a/instat/dlgClimaticSummary.vb
+++ b/instat/dlgClimaticSummary.vb
@@ -194,8 +194,7 @@ Public Class dlgClimaticSummary
'TODO: what defaults do we want?
clsSummariesList.SetRCommand("c")
- clsSummariesList.AddParameter("summary_count_non_missing", Chr(34) & "summary_count_non_missing" & Chr(34), bIncludeArgumentName:=False, iPosition:=1)
- clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False, iPosition:=3)
+ clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False, iPosition:=1)
clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False, iPosition:=11)
clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$calculate_summary")
diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb
index 4a2e6621f6f..1fc55717efa 100644
--- a/instat/dlgColumnStats.vb
+++ b/instat/dlgColumnStats.vb
@@ -109,7 +109,7 @@ Public Class dlgColumnStats
clsConcFunction.SetRCommand("c")
clsSummariesList.SetRCommand("c")
- clsSummariesList.AddParameter("summary_count_non_missing", Chr(34) & "summary_count_non_missing" & Chr(34), bIncludeArgumentName:=False, iPosition:=1)
+ clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False, iPosition:=1)
clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False, iPosition:=11)
clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$calculate_summary")
@@ -220,19 +220,32 @@ Public Class dlgColumnStats
sdgMissingOptions.ShowDialog()
End Sub
- Private Sub ucrReceiverByFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverByFactor.ControlValueChanged, ucrChkStoreResults.ControlValueChanged, ucrChkPrintOutput.ControlValueChanged
- If ucrReceiverByFactor.IsEmpty Then
- clsDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=3)
- clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4)
- ucrBase.clsRsyntax.iCallType = 2
- Else
- clsDefaultFunction.RemoveParameterByName("return_output")
- If ucrChkStoreResults.Checked Then
- clsDefaultFunction.AddParameter("store_results", "TRUE", iPosition:=3)
+ Private Sub ucrReceiverByFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverByFactor.ControlValueChanged, ucrChkStoreResults.ControlValueChanged, ucrChkPrintOutput.ControlValueChanged, ucrReceiverSelectedVariables.ControlValueChanged, ucrChkOriginalLevel.ControlValueChanged
+ If Not ucrChkOriginalLevel.Checked Then
+ If ucrReceiverByFactor.IsEmpty AndAlso Not ucrReceiverSelectedVariables.IsEmpty Then
+ clsDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=3)
+ clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4)
+ ucrBase.clsRsyntax.iCallType = 2
+ Else
+ clsDefaultFunction.RemoveParameterByName("return_output")
+ If ucrChkStoreResults.Checked Then
+ clsDefaultFunction.AddParameter("store_results", "TRUE", iPosition:=3)
+ Else
+ clsDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=3)
+ End If
+ If ucrChkPrintOutput.Checked Then
+ clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4)
+ Else
+ clsDefaultFunction.AddParameter("return_output", "FALSE", iPosition:=4)
+ End If
End If
+ Else
If ucrChkPrintOutput.Checked Then
clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4)
+ Else
+ clsDefaultFunction.RemoveParameterByName("return_output")
End If
+ clsDefaultFunction.AddParameter("store_results", "TRUE", iPosition:=3)
End If
End Sub
diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb
index c4cb6d97038..93808123a65 100644
--- a/instat/dlgDisplayDailyData.vb
+++ b/instat/dlgDisplayDailyData.vb
@@ -156,7 +156,7 @@ Public Class dlgDisplayDailyData
ucrChkIQR.SetParameter(New RParameter("IQR", 5), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "IQR" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34))
ucrChkIQR.SetText("IQR")
- ucrChkSumMissing.SetParameter(New RParameter("summary_count_missing", 6), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_missing" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34))
+ ucrChkSumMissing.SetParameter(New RParameter("summary_count_miss", 6), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_miss" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34))
ucrChkSumMissing.SetText("N Missing")
ucrNudNumberOfColumns.SetParameter(New RParameter("ncol", 1))
diff --git a/instat/dlgDistances.vb b/instat/dlgDistances.vb
index 0e3ccc3a91f..763ca781446 100644
--- a/instat/dlgDistances.vb
+++ b/instat/dlgDistances.vb
@@ -37,6 +37,7 @@ Public Class dlgDistances
autoTranslate(Me)
End Sub
Private Sub InitialiseDialog()
+ ucrBase.iHelpTopicID = 145
ucrSelectorDistance.SetParameter(New RParameter("df", 0))
ucrSelectorDistance.SetParameterIsrfunction()
diff --git a/instat/dlgExtremesClimatic.vb b/instat/dlgExtremesClimatic.vb
index 6c6052c193c..06d745e640b 100644
--- a/instat/dlgExtremesClimatic.vb
+++ b/instat/dlgExtremesClimatic.vb
@@ -447,7 +447,7 @@ Public Class dlgExtremesClimatic
clsNSummary.AddParameter("save", "2", iPosition:=4)
clsNSummary.SetAssignTo("n_dates_summary")
- clsNFunction.SetRCommand("summary_count")
+ clsNFunction.SetRCommand("summary_count_all")
clsNFunction.bToScriptAsRString = True
clsFilterExtremeCalc.SetRCommand("instat_calculation$new")
diff --git a/instat/dlgOneVariableSummarise.vb b/instat/dlgOneVariableSummarise.vb
index 1726ec12348..c973af6015f 100644
--- a/instat/dlgOneVariableSummarise.vb
+++ b/instat/dlgOneVariableSummarise.vb
@@ -248,8 +248,8 @@ Public Class dlgOneVariableSummarise
strObjectName:="last_table")
clsSummariesList.SetRCommand("c")
- clsSummariesList.AddParameter("summary_count_non_missing", Chr(34) & "summary_count_non_missing" & Chr(34), bIncludeArgumentName:=False)
clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False)
+ clsSummariesList.AddParameter("summary_count_all", Chr(34) & "summary_count_all" & Chr(34), bIncludeArgumentName:=False)
clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False)
clsSummaryFunction.SetRCommand("summary")
diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb
index cc8ebfa2823..dc580406db6 100644
--- a/instat/dlgSummaryTables.Designer.vb
+++ b/instat/dlgSummaryTables.Designer.vb
@@ -42,12 +42,12 @@ Partial Class dlgSummaryTables
Me.lblFactors = New System.Windows.Forms.Label()
Me.cmdSummaries = New System.Windows.Forms.Button()
Me.grpDisplay = New System.Windows.Forms.GroupBox()
- Me.ucrReceiverColumnFactor = New instat.ucrReceiverSingle()
- Me.rdoVariable = New System.Windows.Forms.RadioButton()
- Me.rdoSummaryVariable = New System.Windows.Forms.RadioButton()
- Me.rdoFactorVariable = New System.Windows.Forms.RadioButton()
- Me.rdoNoColumnFactor = New System.Windows.Forms.RadioButton()
- Me.ucrPnlColumnFactor = New instat.UcrPanel()
+ Me.lblColumnSummariesFactors = New System.Windows.Forms.Label()
+ Me.UcrNudColumnSumFactors = New instat.ucrNud()
+ Me.lblPositionSum = New System.Windows.Forms.Label()
+ Me.lblPositionVar = New System.Windows.Forms.Label()
+ Me.ucrNudPositionVar = New instat.ucrNud()
+ Me.ucrNudPositionSum = New instat.ucrNud()
Me.grpMargin = New System.Windows.Forms.GroupBox()
Me.rdoBoth = New System.Windows.Forms.RadioButton()
Me.rdoSummary = New System.Windows.Forms.RadioButton()
@@ -65,26 +65,29 @@ Partial Class dlgSummaryTables
Me.ucrChkDisplayAsPercentage = New instat.ucrCheck()
Me.lblFrequencyMarginName = New System.Windows.Forms.Label()
Me.cmdMissingOptions = New System.Windows.Forms.Button()
- Me.ucrChkFrequencyDisplayMargins = New instat.ucrCheck()
+ Me.rdoMultipleResponse = New System.Windows.Forms.RadioButton()
+ Me.ttMultipleResponse = New System.Windows.Forms.ToolTip(Me.components)
+ Me.lblSigFigs = New System.Windows.Forms.Label()
+ Me.lblColumnFactors = New System.Windows.Forms.Label()
+ Me.btnMoreOptions = New System.Windows.Forms.Button()
+ Me.ucrNudColFactors = New instat.ucrNud()
+ Me.ucrNudSigFigs = New instat.ucrNud()
Me.ucrPnlSummaryFrequencyTables = New instat.UcrPanel()
+ Me.ucrReorderSummary = New instat.ucrReorder()
Me.ucrInputMarginName = New instat.ucrInputTextBox()
Me.ucrSaveTable = New instat.ucrSave()
Me.ucrChkOmitMissing = New instat.ucrCheck()
Me.ucrChkStoreResults = New instat.ucrCheck()
Me.ucrChkDisplayMargins = New instat.ucrCheck()
- Me.ucrChkSummaries = New instat.ucrCheck()
Me.ucrBase = New instat.ucrButtons()
Me.ucrReceiverSummaryCols = New instat.ucrReceiverMultiple()
Me.ucrReceiverFactors = New instat.ucrReceiverMultiple()
Me.ucrReceiverWeights = New instat.ucrReceiverSingle()
Me.ucrChkWeight = New instat.ucrCheck()
- Me.ucrInputFrequencyMarginName = New instat.ucrInputTextBox()
- Me.rdoMultipleResponse = New System.Windows.Forms.RadioButton()
- Me.ttMultipleResponse = New System.Windows.Forms.ToolTip(Me.components)
- Me.ucrReorderSummary = New instat.ucrReorder()
Me.ucrSelectorSummaryTables = New instat.ucrSelectorByDataFrameAddRemove()
- Me.ucrNudSigFigs = New instat.ucrNud()
- Me.lblSigFigs = New System.Windows.Forms.Label()
+ Me.ucrInputFrequencyMarginName = New instat.ucrInputTextBox()
+ Me.ucrChkFrequencyDisplayMargins = New instat.ucrCheck()
+ Me.ucrChkDropLevels = New instat.ucrCheck()
Me.grpDisplay.SuspendLayout()
Me.grpMargin.SuspendLayout()
Me.grpPercentages.SuspendLayout()
@@ -94,9 +97,10 @@ Partial Class dlgSummaryTables
'
Me.lblFactors.AutoSize = True
Me.lblFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblFactors.Location = New System.Drawing.Point(286, 43)
+ Me.lblFactors.Location = New System.Drawing.Point(429, 64)
+ Me.lblFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.lblFactors.Name = "lblFactors"
- Me.lblFactors.Size = New System.Drawing.Size(48, 13)
+ Me.lblFactors.Size = New System.Drawing.Size(71, 20)
Me.lblFactors.TabIndex = 1
Me.lblFactors.Tag = "Factors:"
Me.lblFactors.Text = "Factors :"
@@ -104,92 +108,108 @@ Partial Class dlgSummaryTables
'cmdSummaries
'
Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdSummaries.Location = New System.Drawing.Point(286, 280)
+ Me.cmdSummaries.Location = New System.Drawing.Point(429, 420)
+ Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4)
Me.cmdSummaries.Name = "cmdSummaries"
- Me.cmdSummaries.Size = New System.Drawing.Size(104, 23)
+ Me.cmdSummaries.Size = New System.Drawing.Size(156, 34)
Me.cmdSummaries.TabIndex = 13
Me.cmdSummaries.Text = "Summaries..."
Me.cmdSummaries.UseVisualStyleBackColor = True
'
'grpDisplay
'
- Me.grpDisplay.Controls.Add(Me.ucrReceiverColumnFactor)
- Me.grpDisplay.Controls.Add(Me.rdoVariable)
- Me.grpDisplay.Controls.Add(Me.rdoSummaryVariable)
- Me.grpDisplay.Controls.Add(Me.rdoFactorVariable)
- Me.grpDisplay.Controls.Add(Me.rdoNoColumnFactor)
- Me.grpDisplay.Controls.Add(Me.ucrPnlColumnFactor)
- Me.grpDisplay.Location = New System.Drawing.Point(10, 379)
+ Me.grpDisplay.Controls.Add(Me.lblColumnSummariesFactors)
+ Me.grpDisplay.Controls.Add(Me.UcrNudColumnSumFactors)
+ Me.grpDisplay.Controls.Add(Me.lblPositionSum)
+ Me.grpDisplay.Controls.Add(Me.lblPositionVar)
+ Me.grpDisplay.Controls.Add(Me.ucrNudPositionVar)
+ Me.grpDisplay.Controls.Add(Me.ucrNudPositionSum)
+ Me.grpDisplay.Location = New System.Drawing.Point(15, 597)
+ Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4)
Me.grpDisplay.Name = "grpDisplay"
- Me.grpDisplay.Size = New System.Drawing.Size(270, 103)
+ Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4)
+ Me.grpDisplay.Size = New System.Drawing.Size(368, 133)
Me.grpDisplay.TabIndex = 11
Me.grpDisplay.TabStop = False
- Me.grpDisplay.Text = "Display Column Factors"
- '
- 'ucrReceiverColumnFactor
- '
- Me.ucrReceiverColumnFactor.AutoSize = True
- Me.ucrReceiverColumnFactor.frmParent = Me
- Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(140, 35)
- Me.ucrReceiverColumnFactor.Margin = New System.Windows.Forms.Padding(0)
- Me.ucrReceiverColumnFactor.Name = "ucrReceiverColumnFactor"
- Me.ucrReceiverColumnFactor.Selector = Nothing
- Me.ucrReceiverColumnFactor.Size = New System.Drawing.Size(120, 20)
- Me.ucrReceiverColumnFactor.strNcFilePath = ""
- Me.ucrReceiverColumnFactor.TabIndex = 34
- Me.ucrReceiverColumnFactor.ucrSelector = Nothing
- '
- 'rdoVariable
- '
- Me.rdoVariable.AutoSize = True
- Me.rdoVariable.Location = New System.Drawing.Point(14, 74)
- Me.rdoVariable.Name = "rdoVariable"
- Me.rdoVariable.Size = New System.Drawing.Size(63, 17)
- Me.rdoVariable.TabIndex = 32
- Me.rdoVariable.TabStop = True
- Me.rdoVariable.Text = "Variable"
- Me.rdoVariable.UseVisualStyleBackColor = True
- '
- 'rdoSummaryVariable
- '
- Me.rdoSummaryVariable.AutoSize = True
- Me.rdoSummaryVariable.Location = New System.Drawing.Point(14, 55)
- Me.rdoSummaryVariable.Name = "rdoSummaryVariable"
- Me.rdoSummaryVariable.Size = New System.Drawing.Size(109, 17)
- Me.rdoSummaryVariable.TabIndex = 31
- Me.rdoSummaryVariable.TabStop = True
- Me.rdoSummaryVariable.Text = "Summary-Variable"
- Me.rdoSummaryVariable.UseVisualStyleBackColor = True
- '
- 'rdoFactorVariable
- '
- Me.rdoFactorVariable.AutoSize = True
- Me.rdoFactorVariable.Checked = True
- Me.rdoFactorVariable.Location = New System.Drawing.Point(14, 36)
- Me.rdoFactorVariable.Name = "rdoFactorVariable"
- Me.rdoFactorVariable.Size = New System.Drawing.Size(96, 17)
- Me.rdoFactorVariable.TabIndex = 30
- Me.rdoFactorVariable.TabStop = True
- Me.rdoFactorVariable.Text = "Factor Variable"
- Me.rdoFactorVariable.UseVisualStyleBackColor = True
- '
- 'rdoNoColumnFactor
- '
- Me.rdoNoColumnFactor.AutoSize = True
- Me.rdoNoColumnFactor.Location = New System.Drawing.Point(14, 17)
- Me.rdoNoColumnFactor.Name = "rdoNoColumnFactor"
- Me.rdoNoColumnFactor.Size = New System.Drawing.Size(110, 17)
- Me.rdoNoColumnFactor.TabIndex = 29
- Me.rdoNoColumnFactor.Text = "No Column Factor"
- Me.rdoNoColumnFactor.UseVisualStyleBackColor = True
- '
- 'ucrPnlColumnFactor
- '
- Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(11, 17)
- Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor"
- Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(124, 80)
- Me.ucrPnlColumnFactor.TabIndex = 29
+ Me.grpDisplay.Text = "Layout"
+ '
+ 'lblColumnSummariesFactors
+ '
+ Me.lblColumnSummariesFactors.AutoSize = True
+ Me.lblColumnSummariesFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblColumnSummariesFactors.Location = New System.Drawing.Point(39, 23)
+ Me.lblColumnSummariesFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
+ Me.lblColumnSummariesFactors.Name = "lblColumnSummariesFactors"
+ Me.lblColumnSummariesFactors.Size = New System.Drawing.Size(137, 20)
+ Me.lblColumnSummariesFactors.TabIndex = 38
+ Me.lblColumnSummariesFactors.Tag = "Significant_Figures:"
+ Me.lblColumnSummariesFactors.Text = "Column ""Factors"":"
+ '
+ 'UcrNudColumnSumFactors
+ '
+ Me.UcrNudColumnSumFactors.AutoSize = True
+ Me.UcrNudColumnSumFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.UcrNudColumnSumFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.UcrNudColumnSumFactors.Location = New System.Drawing.Point(245, 18)
+ Me.UcrNudColumnSumFactors.Margin = New System.Windows.Forms.Padding(9)
+ Me.UcrNudColumnSumFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
+ Me.UcrNudColumnSumFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.UcrNudColumnSumFactors.Name = "UcrNudColumnSumFactors"
+ Me.UcrNudColumnSumFactors.Size = New System.Drawing.Size(75, 30)
+ Me.UcrNudColumnSumFactors.TabIndex = 37
+ Me.UcrNudColumnSumFactors.Value = New Decimal(New Integer() {0, 0, 0, 0})
+ '
+ 'lblPositionSum
+ '
+ Me.lblPositionSum.AutoSize = True
+ Me.lblPositionSum.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblPositionSum.Location = New System.Drawing.Point(8, 98)
+ Me.lblPositionSum.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
+ Me.lblPositionSum.Name = "lblPositionSum"
+ Me.lblPositionSum.Size = New System.Drawing.Size(171, 20)
+ Me.lblPositionSum.TabIndex = 36
+ Me.lblPositionSum.Tag = "Significant_Figures:"
+ Me.lblPositionSum.Text = "Position of Summaries:"
+ '
+ 'lblPositionVar
+ '
+ Me.lblPositionVar.AutoSize = True
+ Me.lblPositionVar.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblPositionVar.Location = New System.Drawing.Point(19, 62)
+ Me.lblPositionVar.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
+ Me.lblPositionVar.Name = "lblPositionVar"
+ Me.lblPositionVar.Size = New System.Drawing.Size(157, 20)
+ Me.lblPositionVar.TabIndex = 35
+ Me.lblPositionVar.Tag = "Significant_Figures:"
+ Me.lblPositionVar.Text = "Position of Variables:"
+ '
+ 'ucrNudPositionVar
+ '
+ Me.ucrNudPositionVar.AutoSize = True
+ Me.ucrNudPositionVar.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudPositionVar.Increment = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.ucrNudPositionVar.Location = New System.Drawing.Point(245, 57)
+ Me.ucrNudPositionVar.Margin = New System.Windows.Forms.Padding(9)
+ Me.ucrNudPositionVar.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
+ Me.ucrNudPositionVar.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudPositionVar.Name = "ucrNudPositionVar"
+ Me.ucrNudPositionVar.Size = New System.Drawing.Size(75, 30)
+ Me.ucrNudPositionVar.TabIndex = 34
+ Me.ucrNudPositionVar.Value = New Decimal(New Integer() {0, 0, 0, 0})
+ '
+ 'ucrNudPositionSum
+ '
+ Me.ucrNudPositionSum.AutoSize = True
+ Me.ucrNudPositionSum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudPositionSum.Increment = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.ucrNudPositionSum.Location = New System.Drawing.Point(245, 95)
+ Me.ucrNudPositionSum.Margin = New System.Windows.Forms.Padding(9)
+ Me.ucrNudPositionSum.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
+ Me.ucrNudPositionSum.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudPositionSum.Name = "ucrNudPositionSum"
+ Me.ucrNudPositionSum.Size = New System.Drawing.Size(75, 30)
+ Me.ucrNudPositionSum.TabIndex = 33
+ Me.ucrNudPositionSum.Value = New Decimal(New Integer() {0, 0, 0, 0})
'
'grpMargin
'
@@ -197,9 +217,11 @@ Partial Class dlgSummaryTables
Me.grpMargin.Controls.Add(Me.rdoSummary)
Me.grpMargin.Controls.Add(Me.rdoOuter)
Me.grpMargin.Controls.Add(Me.ucrPnlMargin)
- Me.grpMargin.Location = New System.Drawing.Point(10, 313)
+ Me.grpMargin.Location = New System.Drawing.Point(15, 480)
+ Me.grpMargin.Margin = New System.Windows.Forms.Padding(4)
Me.grpMargin.Name = "grpMargin"
- Me.grpMargin.Size = New System.Drawing.Size(213, 40)
+ Me.grpMargin.Padding = New System.Windows.Forms.Padding(4)
+ Me.grpMargin.Size = New System.Drawing.Size(320, 60)
Me.grpMargin.TabIndex = 13
Me.grpMargin.TabStop = False
'
@@ -207,9 +229,10 @@ Partial Class dlgSummaryTables
'
Me.rdoBoth.AutoSize = True
Me.rdoBoth.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoBoth.Location = New System.Drawing.Point(140, 17)
+ Me.rdoBoth.Location = New System.Drawing.Point(210, 36)
+ Me.rdoBoth.Margin = New System.Windows.Forms.Padding(4)
Me.rdoBoth.Name = "rdoBoth"
- Me.rdoBoth.Size = New System.Drawing.Size(47, 17)
+ Me.rdoBoth.Size = New System.Drawing.Size(68, 24)
Me.rdoBoth.TabIndex = 16
Me.rdoBoth.TabStop = True
Me.rdoBoth.Text = "Both"
@@ -219,9 +242,10 @@ Partial Class dlgSummaryTables
'
Me.rdoSummary.AutoSize = True
Me.rdoSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoSummary.Location = New System.Drawing.Point(67, 17)
+ Me.rdoSummary.Location = New System.Drawing.Point(100, 36)
+ Me.rdoSummary.Margin = New System.Windows.Forms.Padding(4)
Me.rdoSummary.Name = "rdoSummary"
- Me.rdoSummary.Size = New System.Drawing.Size(68, 17)
+ Me.rdoSummary.Size = New System.Drawing.Size(101, 24)
Me.rdoSummary.TabIndex = 16
Me.rdoSummary.TabStop = True
Me.rdoSummary.Text = "Summary"
@@ -231,9 +255,10 @@ Partial Class dlgSummaryTables
'
Me.rdoOuter.AutoSize = True
Me.rdoOuter.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoOuter.Location = New System.Drawing.Point(10, 17)
+ Me.rdoOuter.Location = New System.Drawing.Point(15, 36)
+ Me.rdoOuter.Margin = New System.Windows.Forms.Padding(4)
Me.rdoOuter.Name = "rdoOuter"
- Me.rdoOuter.Size = New System.Drawing.Size(51, 17)
+ Me.rdoOuter.Size = New System.Drawing.Size(74, 24)
Me.rdoOuter.TabIndex = 15
Me.rdoOuter.TabStop = True
Me.rdoOuter.Text = "Outer"
@@ -243,7 +268,8 @@ Partial Class dlgSummaryTables
'
Me.ucrPnlMargin.AutoSize = True
Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrPnlMargin.Location = New System.Drawing.Point(6, 14)
+ Me.ucrPnlMargin.Location = New System.Drawing.Point(9, 21)
+ Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(9)
Me.ucrPnlMargin.Name = "ucrPnlMargin"
Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0)
Me.ucrPnlMargin.TabIndex = 13
@@ -252,9 +278,10 @@ Partial Class dlgSummaryTables
'
Me.lblMarginName.AutoSize = True
Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblMarginName.Location = New System.Drawing.Point(159, 288)
+ Me.lblMarginName.Location = New System.Drawing.Point(238, 452)
+ Me.lblMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.lblMarginName.Name = "lblMarginName"
- Me.lblMarginName.Size = New System.Drawing.Size(41, 13)
+ Me.lblMarginName.Size = New System.Drawing.Size(59, 20)
Me.lblMarginName.TabIndex = 15
Me.lblMarginName.Text = "Name :"
'
@@ -262,9 +289,10 @@ Partial Class dlgSummaryTables
'
Me.lblVariables.AutoSize = True
Me.lblVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblVariables.Location = New System.Drawing.Point(285, 162)
+ Me.lblVariables.Location = New System.Drawing.Point(428, 243)
+ Me.lblVariables.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.lblVariables.Name = "lblVariables"
- Me.lblVariables.Size = New System.Drawing.Size(56, 13)
+ Me.lblVariables.Size = New System.Drawing.Size(83, 20)
Me.lblVariables.TabIndex = 17
Me.lblVariables.Tag = ""
Me.lblVariables.Text = "Variables :"
@@ -272,9 +300,10 @@ Partial Class dlgSummaryTables
'cmdFormatTable
'
Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFormatTable.Location = New System.Drawing.Point(286, 464)
+ Me.cmdFormatTable.Location = New System.Drawing.Point(429, 696)
+ Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4)
Me.cmdFormatTable.Name = "cmdFormatTable"
- Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23)
+ Me.cmdFormatTable.Size = New System.Drawing.Size(156, 34)
Me.cmdFormatTable.TabIndex = 19
Me.cmdFormatTable.Text = "Format Table..."
Me.cmdFormatTable.UseVisualStyleBackColor = True
@@ -288,9 +317,10 @@ Partial Class dlgSummaryTables
Me.rdoFrequencyTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
Me.rdoFrequencyTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.rdoFrequencyTable.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoFrequencyTable.Location = New System.Drawing.Point(51, 7)
+ Me.rdoFrequencyTable.Location = New System.Drawing.Point(76, 0)
+ Me.rdoFrequencyTable.Margin = New System.Windows.Forms.Padding(4)
Me.rdoFrequencyTable.Name = "rdoFrequencyTable"
- Me.rdoFrequencyTable.Size = New System.Drawing.Size(129, 27)
+ Me.rdoFrequencyTable.Size = New System.Drawing.Size(194, 40)
Me.rdoFrequencyTable.TabIndex = 22
Me.rdoFrequencyTable.TabStop = True
Me.rdoFrequencyTable.Text = "Frequency"
@@ -305,9 +335,10 @@ Partial Class dlgSummaryTables
Me.rdoSummaryTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
Me.rdoSummaryTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.rdoSummaryTable.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoSummaryTable.Location = New System.Drawing.Point(178, 7)
+ Me.rdoSummaryTable.Location = New System.Drawing.Point(267, 0)
+ Me.rdoSummaryTable.Margin = New System.Windows.Forms.Padding(4)
Me.rdoSummaryTable.Name = "rdoSummaryTable"
- Me.rdoSummaryTable.Size = New System.Drawing.Size(133, 27)
+ Me.rdoSummaryTable.Size = New System.Drawing.Size(200, 40)
Me.rdoSummaryTable.TabIndex = 21
Me.rdoSummaryTable.TabStop = True
Me.rdoSummaryTable.Text = "Summary"
@@ -320,9 +351,11 @@ Partial Class dlgSummaryTables
Me.grpPercentages.Controls.Add(Me.lblFactorsAsPercentage)
Me.grpPercentages.Controls.Add(Me.ucrChkPercentageProportion)
Me.grpPercentages.Controls.Add(Me.ucrChkDisplayAsPercentage)
- Me.grpPercentages.Location = New System.Drawing.Point(286, 178)
+ Me.grpPercentages.Location = New System.Drawing.Point(429, 267)
+ Me.grpPercentages.Margin = New System.Windows.Forms.Padding(4)
Me.grpPercentages.Name = "grpPercentages"
- Me.grpPercentages.Size = New System.Drawing.Size(174, 89)
+ Me.grpPercentages.Padding = New System.Windows.Forms.Padding(4)
+ Me.grpPercentages.Size = New System.Drawing.Size(261, 134)
Me.grpPercentages.TabIndex = 23
Me.grpPercentages.TabStop = False
Me.grpPercentages.Text = "Percentages"
@@ -331,11 +364,11 @@ Partial Class dlgSummaryTables
'
Me.ucrReceiverPercentages.AutoSize = True
Me.ucrReceiverPercentages.frmParent = Me
- Me.ucrReceiverPercentages.Location = New System.Drawing.Point(16, 60)
+ Me.ucrReceiverPercentages.Location = New System.Drawing.Point(24, 90)
Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages"
Me.ucrReceiverPercentages.Selector = Nothing
- Me.ucrReceiverPercentages.Size = New System.Drawing.Size(120, 20)
+ Me.ucrReceiverPercentages.Size = New System.Drawing.Size(180, 30)
Me.ucrReceiverPercentages.strNcFilePath = ""
Me.ucrReceiverPercentages.TabIndex = 4
Me.ucrReceiverPercentages.ucrSelector = Nothing
@@ -344,9 +377,10 @@ Partial Class dlgSummaryTables
'
Me.lblFactorsAsPercentage.AutoSize = True
Me.lblFactorsAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(18, 44)
+ Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(27, 66)
+ Me.lblFactorsAsPercentage.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.lblFactorsAsPercentage.Name = "lblFactorsAsPercentage"
- Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(100, 13)
+ Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(150, 20)
Me.lblFactorsAsPercentage.TabIndex = 1
Me.lblFactorsAsPercentage.Tag = "Factors as Percentage:"
Me.lblFactorsAsPercentage.Text = "of Factor (Optional):"
@@ -355,131 +389,216 @@ Partial Class dlgSummaryTables
'
Me.ucrChkPercentageProportion.AutoSize = True
Me.ucrChkPercentageProportion.Checked = False
- Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(5, 171)
+ Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(8, 256)
+ Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9)
Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion"
- Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(160, 23)
+ Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(240, 51)
Me.ucrChkPercentageProportion.TabIndex = 3
'
'ucrChkDisplayAsPercentage
'
Me.ucrChkDisplayAsPercentage.AutoSize = True
Me.ucrChkDisplayAsPercentage.Checked = False
- Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19)
+ Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(21, 28)
+ Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9)
Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage"
- Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23)
+ Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(202, 51)
Me.ucrChkDisplayAsPercentage.TabIndex = 0
'
'lblFrequencyMarginName
'
Me.lblFrequencyMarginName.AutoSize = True
Me.lblFrequencyMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblFrequencyMarginName.Location = New System.Drawing.Point(7, 275)
+ Me.lblFrequencyMarginName.Location = New System.Drawing.Point(10, 412)
+ Me.lblFrequencyMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.lblFrequencyMarginName.Name = "lblFrequencyMarginName"
- Me.lblFrequencyMarginName.Size = New System.Drawing.Size(76, 13)
+ Me.lblFrequencyMarginName.Size = New System.Drawing.Size(111, 20)
Me.lblFrequencyMarginName.TabIndex = 25
Me.lblFrequencyMarginName.Text = "Margin Name :"
'
'cmdMissingOptions
'
Me.cmdMissingOptions.Enabled = False
- Me.cmdMissingOptions.Location = New System.Drawing.Point(205, 261)
+ Me.cmdMissingOptions.Location = New System.Drawing.Point(308, 406)
+ Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4)
Me.cmdMissingOptions.Name = "cmdMissingOptions"
- Me.cmdMissingOptions.Size = New System.Drawing.Size(75, 23)
+ Me.cmdMissingOptions.Size = New System.Drawing.Size(112, 34)
Me.cmdMissingOptions.TabIndex = 27
Me.cmdMissingOptions.Text = "Options"
Me.cmdMissingOptions.UseVisualStyleBackColor = True
'
- 'ucrChkFrequencyDisplayMargins
+ 'rdoMultipleResponse
'
- Me.ucrChkFrequencyDisplayMargins.AutoSize = True
- Me.ucrChkFrequencyDisplayMargins.Checked = False
- Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(10, 245)
- Me.ucrChkFrequencyDisplayMargins.Name = "ucrChkFrequencyDisplayMargins"
- Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(213, 23)
- Me.ucrChkFrequencyDisplayMargins.TabIndex = 24
+ Me.rdoMultipleResponse.Appearance = System.Windows.Forms.Appearance.Button
+ Me.rdoMultipleResponse.Enabled = False
+ Me.rdoMultipleResponse.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoMultipleResponse.FlatAppearance.BorderSize = 2
+ Me.rdoMultipleResponse.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoMultipleResponse.Location = New System.Drawing.Point(464, 0)
+ Me.rdoMultipleResponse.Margin = New System.Windows.Forms.Padding(4)
+ Me.rdoMultipleResponse.Name = "rdoMultipleResponse"
+ Me.rdoMultipleResponse.Size = New System.Drawing.Size(200, 40)
+ Me.rdoMultipleResponse.TabIndex = 28
+ Me.rdoMultipleResponse.TabStop = True
+ Me.rdoMultipleResponse.Text = "Multiple Response"
+ Me.rdoMultipleResponse.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
+ Me.ttMultipleResponse.SetToolTip(Me.rdoMultipleResponse, "Not Yet Available")
+ Me.rdoMultipleResponse.UseVisualStyleBackColor = True
+ '
+ 'lblSigFigs
+ '
+ Me.lblSigFigs.AutoSize = True
+ Me.lblSigFigs.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblSigFigs.Location = New System.Drawing.Point(22, 538)
+ Me.lblSigFigs.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
+ Me.lblSigFigs.Name = "lblSigFigs"
+ Me.lblSigFigs.Size = New System.Drawing.Size(144, 20)
+ Me.lblSigFigs.TabIndex = 29
+ Me.lblSigFigs.Tag = "Significant_Figures:"
+ Me.lblSigFigs.Text = "Significant Figures:"
+ '
+ 'lblColumnFactors
+ '
+ Me.lblColumnFactors.AutoSize = True
+ Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblColumnFactors.Location = New System.Drawing.Point(34, 506)
+ Me.lblColumnFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
+ Me.lblColumnFactors.Name = "lblColumnFactors"
+ Me.lblColumnFactors.Size = New System.Drawing.Size(125, 20)
+ Me.lblColumnFactors.TabIndex = 32
+ Me.lblColumnFactors.Tag = "Significant_Figures:"
+ Me.lblColumnFactors.Text = "Column Factors:"
+ '
+ 'btnMoreOptions
+ '
+ Me.btnMoreOptions.Location = New System.Drawing.Point(15, 310)
+ Me.btnMoreOptions.Margin = New System.Windows.Forms.Padding(4)
+ Me.btnMoreOptions.Name = "btnMoreOptions"
+ Me.btnMoreOptions.Size = New System.Drawing.Size(212, 32)
+ Me.btnMoreOptions.TabIndex = 33
+ Me.btnMoreOptions.Text = "Table Options"
+ Me.btnMoreOptions.UseVisualStyleBackColor = True
+ '
+ 'ucrNudColFactors
+ '
+ Me.ucrNudColFactors.AutoSize = True
+ Me.ucrNudColFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudColFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.ucrNudColFactors.Location = New System.Drawing.Point(178, 501)
+ Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(9)
+ Me.ucrNudColFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
+ Me.ucrNudColFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudColFactors.Name = "ucrNudColFactors"
+ Me.ucrNudColFactors.Size = New System.Drawing.Size(75, 30)
+ Me.ucrNudColFactors.TabIndex = 31
+ Me.ucrNudColFactors.Value = New Decimal(New Integer() {0, 0, 0, 0})
+ '
+ 'ucrNudSigFigs
+ '
+ Me.ucrNudSigFigs.AutoSize = True
+ Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.ucrNudSigFigs.Location = New System.Drawing.Point(177, 534)
+ Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(9)
+ Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
+ Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudSigFigs.Name = "ucrNudSigFigs"
+ Me.ucrNudSigFigs.Size = New System.Drawing.Size(75, 30)
+ Me.ucrNudSigFigs.TabIndex = 30
+ Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0})
'
'ucrPnlSummaryFrequencyTables
'
Me.ucrPnlSummaryFrequencyTables.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(44, 3)
+ Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(66, -6)
+ Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(9)
Me.ucrPnlSummaryFrequencyTables.Name = "ucrPnlSummaryFrequencyTables"
- Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(407, 33)
+ Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(610, 50)
Me.ucrPnlSummaryFrequencyTables.TabIndex = 20
'
+ 'ucrReorderSummary
+ '
+ Me.ucrReorderSummary.AutoSize = True
+ Me.ucrReorderSummary.Location = New System.Drawing.Point(429, 458)
+ Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(9)
+ Me.ucrReorderSummary.Name = "ucrReorderSummary"
+ Me.ucrReorderSummary.Size = New System.Drawing.Size(300, 234)
+ Me.ucrReorderSummary.TabIndex = 18
+ Me.ucrReorderSummary.ucrDataFrameList = Nothing
+ Me.ucrReorderSummary.ucrReceiver = Nothing
+ '
'ucrInputMarginName
'
Me.ucrInputMarginName.AddQuotesIfUnrecognised = True
Me.ucrInputMarginName.AutoSize = True
Me.ucrInputMarginName.IsMultiline = False
Me.ucrInputMarginName.IsReadOnly = False
- Me.ucrInputMarginName.Location = New System.Drawing.Point(206, 285)
+ Me.ucrInputMarginName.Location = New System.Drawing.Point(309, 447)
+ Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(14)
Me.ucrInputMarginName.Name = "ucrInputMarginName"
- Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21)
+ Me.ucrInputMarginName.Size = New System.Drawing.Size(111, 32)
Me.ucrInputMarginName.TabIndex = 16
'
'ucrSaveTable
'
Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrSaveTable.Location = New System.Drawing.Point(10, 490)
- Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
+ Me.ucrSaveTable.Location = New System.Drawing.Point(15, 735)
+ Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8)
Me.ucrSaveTable.Name = "ucrSaveTable"
- Me.ucrSaveTable.Size = New System.Drawing.Size(319, 24)
+ Me.ucrSaveTable.Size = New System.Drawing.Size(478, 36)
Me.ucrSaveTable.TabIndex = 12
'
'ucrChkOmitMissing
'
Me.ucrChkOmitMissing.AutoSize = True
Me.ucrChkOmitMissing.Checked = False
- Me.ucrChkOmitMissing.Location = New System.Drawing.Point(10, 266)
+ Me.ucrChkOmitMissing.Location = New System.Drawing.Point(15, 414)
+ Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9)
Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing"
- Me.ucrChkOmitMissing.Size = New System.Drawing.Size(152, 23)
+ Me.ucrChkOmitMissing.Size = New System.Drawing.Size(228, 34)
Me.ucrChkOmitMissing.TabIndex = 9
'
'ucrChkStoreResults
'
Me.ucrChkStoreResults.AutoSize = True
Me.ucrChkStoreResults.Checked = False
- Me.ucrChkStoreResults.Location = New System.Drawing.Point(10, 219)
+ Me.ucrChkStoreResults.Location = New System.Drawing.Point(15, 350)
+ Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(9)
Me.ucrChkStoreResults.Name = "ucrChkStoreResults"
- Me.ucrChkStoreResults.Size = New System.Drawing.Size(230, 23)
+ Me.ucrChkStoreResults.Size = New System.Drawing.Size(345, 34)
Me.ucrChkStoreResults.TabIndex = 8
'
'ucrChkDisplayMargins
'
Me.ucrChkDisplayMargins.AutoSize = True
Me.ucrChkDisplayMargins.Checked = False
- Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(10, 287)
+ Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(15, 450)
+ Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9)
Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins"
- Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(150, 23)
+ Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(225, 34)
Me.ucrChkDisplayMargins.TabIndex = 10
'
- 'ucrChkSummaries
- '
- Me.ucrChkSummaries.AutoSize = True
- Me.ucrChkSummaries.Checked = False
- Me.ucrChkSummaries.Location = New System.Drawing.Point(10, 244)
- Me.ucrChkSummaries.Name = "ucrChkSummaries"
- Me.ucrChkSummaries.Size = New System.Drawing.Size(242, 23)
- Me.ucrChkSummaries.TabIndex = 7
- '
'ucrBase
'
Me.ucrBase.AutoSize = True
Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrBase.Location = New System.Drawing.Point(10, 517)
+ Me.ucrBase.Location = New System.Drawing.Point(15, 776)
+ Me.ucrBase.Margin = New System.Windows.Forms.Padding(6)
Me.ucrBase.Name = "ucrBase"
- Me.ucrBase.Size = New System.Drawing.Size(408, 52)
+ Me.ucrBase.Size = New System.Drawing.Size(611, 77)
Me.ucrBase.TabIndex = 14
'
'ucrReceiverSummaryCols
'
Me.ucrReceiverSummaryCols.AutoSize = True
Me.ucrReceiverSummaryCols.frmParent = Me
- Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(286, 178)
+ Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(429, 267)
Me.ucrReceiverSummaryCols.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverSummaryCols.Name = "ucrReceiverSummaryCols"
Me.ucrReceiverSummaryCols.Selector = Nothing
- Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(120, 100)
+ Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(180, 150)
Me.ucrReceiverSummaryCols.strNcFilePath = ""
Me.ucrReceiverSummaryCols.TabIndex = 4
Me.ucrReceiverSummaryCols.ucrSelector = Nothing
@@ -488,11 +607,11 @@ Partial Class dlgSummaryTables
'
Me.ucrReceiverFactors.AutoSize = True
Me.ucrReceiverFactors.frmParent = Me
- Me.ucrReceiverFactors.Location = New System.Drawing.Point(286, 59)
+ Me.ucrReceiverFactors.Location = New System.Drawing.Point(429, 88)
Me.ucrReceiverFactors.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverFactors.Name = "ucrReceiverFactors"
Me.ucrReceiverFactors.Selector = Nothing
- Me.ucrReceiverFactors.Size = New System.Drawing.Size(120, 100)
+ Me.ucrReceiverFactors.Size = New System.Drawing.Size(180, 150)
Me.ucrReceiverFactors.strNcFilePath = ""
Me.ucrReceiverFactors.TabIndex = 2
Me.ucrReceiverFactors.ucrSelector = Nothing
@@ -501,11 +620,11 @@ Partial Class dlgSummaryTables
'
Me.ucrReceiverWeights.AutoSize = True
Me.ucrReceiverWeights.frmParent = Me
- Me.ucrReceiverWeights.Location = New System.Drawing.Point(109, 222)
+ Me.ucrReceiverWeights.Location = New System.Drawing.Point(164, 333)
Me.ucrReceiverWeights.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverWeights.Name = "ucrReceiverWeights"
Me.ucrReceiverWeights.Selector = Nothing
- Me.ucrReceiverWeights.Size = New System.Drawing.Size(120, 20)
+ Me.ucrReceiverWeights.Size = New System.Drawing.Size(180, 30)
Me.ucrReceiverWeights.strNcFilePath = ""
Me.ucrReceiverWeights.TabIndex = 6
Me.ucrReceiverWeights.ucrSelector = Nothing
@@ -514,98 +633,70 @@ Partial Class dlgSummaryTables
'
Me.ucrChkWeight.AutoSize = True
Me.ucrChkWeight.Checked = False
- Me.ucrChkWeight.Location = New System.Drawing.Point(10, 222)
+ Me.ucrChkWeight.Location = New System.Drawing.Point(15, 333)
+ Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(9)
Me.ucrChkWeight.Name = "ucrChkWeight"
- Me.ucrChkWeight.Size = New System.Drawing.Size(84, 23)
+ Me.ucrChkWeight.Size = New System.Drawing.Size(126, 34)
Me.ucrChkWeight.TabIndex = 5
'
- 'ucrInputFrequencyMarginName
- '
- Me.ucrInputFrequencyMarginName.AddQuotesIfUnrecognised = True
- Me.ucrInputFrequencyMarginName.AutoSize = True
- Me.ucrInputFrequencyMarginName.IsMultiline = False
- Me.ucrInputFrequencyMarginName.IsReadOnly = False
- Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(92, 271)
- Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName"
- Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(70, 21)
- Me.ucrInputFrequencyMarginName.TabIndex = 26
- '
- 'rdoMultipleResponse
- '
- Me.rdoMultipleResponse.Appearance = System.Windows.Forms.Appearance.Button
- Me.rdoMultipleResponse.Enabled = False
- Me.rdoMultipleResponse.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption
- Me.rdoMultipleResponse.FlatAppearance.BorderSize = 2
- Me.rdoMultipleResponse.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
- Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoMultipleResponse.Location = New System.Drawing.Point(309, 7)
- Me.rdoMultipleResponse.Name = "rdoMultipleResponse"
- Me.rdoMultipleResponse.Size = New System.Drawing.Size(133, 27)
- Me.rdoMultipleResponse.TabIndex = 28
- Me.rdoMultipleResponse.TabStop = True
- Me.rdoMultipleResponse.Text = "Multiple Response"
- Me.rdoMultipleResponse.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
- Me.ttMultipleResponse.SetToolTip(Me.rdoMultipleResponse, "Not Yet Available")
- Me.rdoMultipleResponse.UseVisualStyleBackColor = True
- '
- 'ucrReorderSummary
- '
- Me.ucrReorderSummary.AutoSize = True
- Me.ucrReorderSummary.Location = New System.Drawing.Point(286, 305)
- Me.ucrReorderSummary.Name = "ucrReorderSummary"
- Me.ucrReorderSummary.Size = New System.Drawing.Size(200, 156)
- Me.ucrReorderSummary.TabIndex = 18
- Me.ucrReorderSummary.ucrDataFrameList = Nothing
- Me.ucrReorderSummary.ucrReceiver = Nothing
- '
'ucrSelectorSummaryTables
'
Me.ucrSelectorSummaryTables.AutoSize = True
Me.ucrSelectorSummaryTables.bDropUnusedFilterLevels = False
Me.ucrSelectorSummaryTables.bShowHiddenColumns = False
Me.ucrSelectorSummaryTables.bUseCurrentFilter = True
- Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(10, 30)
+ Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(15, 36)
Me.ucrSelectorSummaryTables.Margin = New System.Windows.Forms.Padding(0)
Me.ucrSelectorSummaryTables.Name = "ucrSelectorSummaryTables"
- Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(213, 183)
+ Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(320, 274)
Me.ucrSelectorSummaryTables.TabIndex = 0
'
- 'ucrNudSigFigs
+ 'ucrInputFrequencyMarginName
'
- Me.ucrNudSigFigs.AutoSize = True
- Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
- Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0})
- Me.ucrNudSigFigs.Location = New System.Drawing.Point(118, 356)
- Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
- Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
- Me.ucrNudSigFigs.Name = "ucrNudSigFigs"
- Me.ucrNudSigFigs.Size = New System.Drawing.Size(50, 20)
- Me.ucrNudSigFigs.TabIndex = 30
- Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrInputFrequencyMarginName.AddQuotesIfUnrecognised = True
+ Me.ucrInputFrequencyMarginName.AutoSize = True
+ Me.ucrInputFrequencyMarginName.IsMultiline = False
+ Me.ucrInputFrequencyMarginName.IsReadOnly = False
+ Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(138, 422)
+ Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(14)
+ Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName"
+ Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(105, 32)
+ Me.ucrInputFrequencyMarginName.TabIndex = 26
'
- 'lblSigFigs
+ 'ucrChkFrequencyDisplayMargins
'
- Me.lblSigFigs.AutoSize = True
- Me.lblSigFigs.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblSigFigs.Location = New System.Drawing.Point(15, 359)
- Me.lblSigFigs.Name = "lblSigFigs"
- Me.lblSigFigs.Size = New System.Drawing.Size(96, 13)
- Me.lblSigFigs.TabIndex = 29
- Me.lblSigFigs.Tag = "Significant_Figures:"
- Me.lblSigFigs.Text = "Significant Figures:"
+ Me.ucrChkFrequencyDisplayMargins.AutoSize = True
+ Me.ucrChkFrequencyDisplayMargins.Checked = False
+ Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(15, 382)
+ Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(9)
+ Me.ucrChkFrequencyDisplayMargins.Name = "ucrChkFrequencyDisplayMargins"
+ Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(320, 34)
+ Me.ucrChkFrequencyDisplayMargins.TabIndex = 24
+ '
+ 'ucrChkDropLevels
+ '
+ Me.ucrChkDropLevels.AutoSize = True
+ Me.ucrChkDropLevels.Checked = False
+ Me.ucrChkDropLevels.Location = New System.Drawing.Point(15, 381)
+ Me.ucrChkDropLevels.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6)
+ Me.ucrChkDropLevels.Name = "ucrChkDropLevels"
+ Me.ucrChkDropLevels.Size = New System.Drawing.Size(225, 34)
+ Me.ucrChkDropLevels.TabIndex = 34
'
'dlgSummaryTables
'
- Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi
Me.AutoSize = True
- Me.ClientSize = New System.Drawing.Size(489, 571)
+ Me.ClientSize = New System.Drawing.Size(734, 860)
+ Me.Controls.Add(Me.ucrChkDropLevels)
+ Me.Controls.Add(Me.btnMoreOptions)
+ Me.Controls.Add(Me.lblColumnFactors)
+ Me.Controls.Add(Me.ucrNudColFactors)
Me.Controls.Add(Me.ucrNudSigFigs)
Me.Controls.Add(Me.lblSigFigs)
Me.Controls.Add(Me.rdoMultipleResponse)
Me.Controls.Add(Me.cmdMissingOptions)
- Me.Controls.Add(Me.ucrChkFrequencyDisplayMargins)
Me.Controls.Add(Me.grpPercentages)
Me.Controls.Add(Me.rdoFrequencyTable)
Me.Controls.Add(Me.rdoSummaryTable)
@@ -621,7 +712,6 @@ Partial Class dlgSummaryTables
Me.Controls.Add(Me.cmdSummaries)
Me.Controls.Add(Me.ucrChkDisplayMargins)
Me.Controls.Add(Me.grpDisplay)
- Me.Controls.Add(Me.ucrChkSummaries)
Me.Controls.Add(Me.ucrBase)
Me.Controls.Add(Me.ucrReceiverSummaryCols)
Me.Controls.Add(Me.ucrReceiverFactors)
@@ -632,7 +722,9 @@ Partial Class dlgSummaryTables
Me.Controls.Add(Me.grpMargin)
Me.Controls.Add(Me.lblFrequencyMarginName)
Me.Controls.Add(Me.ucrInputFrequencyMarginName)
+ Me.Controls.Add(Me.ucrChkFrequencyDisplayMargins)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
+ Me.Margin = New System.Windows.Forms.Padding(4)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "dlgSummaryTables"
@@ -656,7 +748,6 @@ Partial Class dlgSummaryTables
Friend WithEvents ucrReceiverFactors As ucrReceiverMultiple
Friend WithEvents ucrReceiverSummaryCols As ucrReceiverMultiple
Friend WithEvents ucrBase As ucrButtons
- Friend WithEvents ucrChkSummaries As ucrCheck
Friend WithEvents cmdSummaries As Button
Friend WithEvents ucrChkDisplayMargins As ucrCheck
Friend WithEvents ucrChkOmitMissing As ucrCheck
@@ -687,12 +778,16 @@ Partial Class dlgSummaryTables
Friend WithEvents cmdMissingOptions As Button
Friend WithEvents rdoMultipleResponse As RadioButton
Friend WithEvents ttMultipleResponse As ToolTip
- Friend WithEvents ucrReceiverColumnFactor As ucrReceiverSingle
- Friend WithEvents rdoVariable As RadioButton
- Friend WithEvents rdoSummaryVariable As RadioButton
- Friend WithEvents rdoFactorVariable As RadioButton
- Friend WithEvents rdoNoColumnFactor As RadioButton
- Friend WithEvents ucrPnlColumnFactor As UcrPanel
Friend WithEvents ucrNudSigFigs As ucrNud
Friend WithEvents lblSigFigs As Label
+ Friend WithEvents lblColumnFactors As Label
+ Friend WithEvents ucrNudColFactors As ucrNud
+ Friend WithEvents btnMoreOptions As Button
+ Friend WithEvents lblPositionSum As Label
+ Friend WithEvents lblPositionVar As Label
+ Friend WithEvents ucrNudPositionVar As ucrNud
+ Friend WithEvents ucrNudPositionSum As ucrNud
+ Friend WithEvents lblColumnSummariesFactors As Label
+ Friend WithEvents UcrNudColumnSumFactors As ucrNud
+ Friend WithEvents ucrChkDropLevels As ucrCheck
End Class
\ No newline at end of file
diff --git a/instat/dlgSummaryTables.resx b/instat/dlgSummaryTables.resx
index c838926ad7f..b97a603004a 100644
--- a/instat/dlgSummaryTables.resx
+++ b/instat/dlgSummaryTables.resx
@@ -118,7 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- 52
+ 25
17, 17
diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb
index f69bfc8f878..909a040bf87 100644
--- a/instat/dlgSummaryTables.vb
+++ b/instat/dlgSummaryTables.vb
@@ -22,14 +22,15 @@ Public Class dlgSummaryTables
Private clsSummariesList As New RFunction
Private bResetSubdialog As Boolean = False
Private bResetFormatSubdialog As Boolean = False
- Private clsSummaryDefaultFunction, clsFrequencyDefaultFunction As New RFunction
+ Private clsSummaryDefaultFunction, clsArrangeFunction, clsFrequencyDefaultFunction As New RFunction
Private bRCodeSet As Boolean = True
Private clsPivotWiderFunction As New RFunction
+ Private ClsTabSpannerDelimFunction As New RFunction
Private iUcrBaseXLocation, iDialogueXsize As Integer
Private clsDummyFunction As New RFunction
- Private clsSummaryOperator, clsFrequencyOperator, clsJoiningPipeOperator As New ROperator
+ Private clsSummaryOperator, clsFrequencyOperator, clsJoiningPipeOperator, clsSpannerOperator As New ROperator
Private Sub dlgNewSummaryTables_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstload Then
@@ -80,7 +81,7 @@ Public Class dlgSummaryTables
ucrReceiverPercentages.SetDataType("factor") ' TODO data this accepts must be in the other receiver too
ucrReceiverPercentages.SetLinkedDisplayControl(lblFactorsAsPercentage)
- ucrChkStoreResults.SetText("Store Output")
+ ucrChkStoreResults.SetText("Store Summaries")
ucrChkStoreResults.SetParameter(New RParameter("store_table", 4))
ucrChkStoreResults.SetValuesCheckedAndUnchecked("TRUE", "FALSE")
ucrChkStoreResults.SetRDefault("FALSE")
@@ -117,14 +118,19 @@ Public Class dlgSummaryTables
ucrInputMarginName.SetParameter(New RParameter("margin_name", iNewPosition:=5))
ucrInputMarginName.SetLinkedDisplayControl(lblMarginName)
- ucrChkSummaries.SetParameter(New RParameter("treat_columns_as_factor", 8))
- ucrChkSummaries.SetValuesCheckedAndUnchecked("TRUE", "FALSE")
- ucrChkSummaries.SetText("Treat Summaries as a Further Factor")
+ ucrChkDropLevels.SetParameter(New RParameter("drop", 9))
+ ucrChkDropLevels.SetValuesCheckedAndUnchecked("TRUE", "FALSE")
+ ucrChkDropLevels.SetText("Drop Unused Levels")
ucrNudSigFigs.SetParameter(New RParameter("signif_fig", 9))
ucrNudSigFigs.SetMinMax(0, 22)
ucrNudSigFigs.SetRDefault(2)
+ ucrNudColFactors.SetLinkedDisplayControl(lblColumnFactors)
+ ucrNudPositionSum.SetLinkedDisplayControl(lblPositionSum)
+ ucrNudPositionVar.SetLinkedDisplayControl(lblPositionVar)
+ UcrNudColumnSumFactors.SetLinkedDisplayControl(lblColumnSummariesFactors)
+
ucrChkWeight.SetText("Weights")
ucrChkWeight.SetParameter(ucrReceiverWeights.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True)
ucrChkWeight.AddToLinkedControls(ucrReceiverWeights, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
@@ -139,11 +145,9 @@ Public Class dlgSummaryTables
ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrReceiverSummaryCols}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True)
ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrReorderSummary}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True)
ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkDisplayAsPercentage}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True)
- ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkSummaries}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True)
ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkDisplayMargins}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True)
- ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkFrequencyDisplayMargins}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True)
+ ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkFrequencyDisplayMargins, ucrNudColFactors}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True)
ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkOmitMissing}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True)
- ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrPnlColumnFactor}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True)
ucrChkDisplayAsPercentage.SetParameter(New RParameter("percentage_type", 2))
ucrChkDisplayAsPercentage.SetText("As Percentages")
@@ -160,20 +164,6 @@ Public Class dlgSummaryTables
ucrChkPercentageProportion.SetText("Display as Decimal")
ucrChkPercentageProportion.SetRDefault("FALSE")
- ucrPnlColumnFactor.AddRadioButton(rdoNoColumnFactor)
- ucrPnlColumnFactor.AddRadioButton(rdoFactorVariable)
- ucrPnlColumnFactor.AddRadioButton(rdoSummaryVariable)
- ucrPnlColumnFactor.AddRadioButton(rdoVariable)
- ucrPnlColumnFactor.AddParameterValuesCondition(rdoNoColumnFactor, "factor_cols", "NoColFactor")
- ucrPnlColumnFactor.AddParameterValuesCondition(rdoFactorVariable, "factor_cols", "FactorVar")
- ucrPnlColumnFactor.AddParameterValuesCondition(rdoSummaryVariable, "factor_cols", "SumVar")
- ucrPnlColumnFactor.AddParameterValuesCondition(rdoVariable, "factor_cols", "Var")
- ucrPnlColumnFactor.AddToLinkedControls(ucrReceiverColumnFactor, {rdoFactorVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
-
- ucrReceiverColumnFactor.SetParameter(New RParameter("names_from", 0))
- ucrReceiverColumnFactor.Selector = ucrSelectorSummaryTables
- ucrReceiverColumnFactor.SetDataType("factor")
-
ucrSaveTable.SetPrefix("summary_table")
ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html)
ucrSaveTable.SetDataFrameSelector(ucrSelectorSummaryTables.ucrAvailableDataFrames)
@@ -182,6 +172,7 @@ Public Class dlgSummaryTables
ucrSaveTable.SetAssignToIfUncheckedValue("last_table")
ucrReorderSummary.bDataIsSummaries = True
+ DialogueSize()
End Sub
Private Sub SetDefaults()
@@ -190,10 +181,13 @@ Public Class dlgSummaryTables
clsSummariesList = New RFunction
clsDummyFunction = New RFunction
clsPivotWiderFunction = New RFunction
+ ClsTabSpannerDelimFunction = New RFunction
+ clsArrangeFunction = New RFunction
clsJoiningPipeOperator = New ROperator
clsSummaryOperator = New ROperator
clsFrequencyOperator = New ROperator
+ clsSpannerOperator = New ROperator
ucrReceiverFactors.SetMeAsReceiver()
ucrSelectorSummaryTables.Reset()
@@ -207,41 +201,54 @@ Public Class dlgSummaryTables
clsPivotWiderFunction.SetRCommand("pivot_wider")
clsPivotWiderFunction.AddParameter("values_from", "value", iPosition:=1)
+ clsPivotWiderFunction.AddParameter("names_sort", "TRUE", iPosition:=2)
clsSummariesList.SetRCommand("c")
clsSummariesList.AddParameter("summary_mean", Chr(34) & "summary_mean" & Chr(34), bIncludeArgumentName:=False) ' TODO decide which default(s) to use?
clsSummaryDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table")
- clsSummaryDefaultFunction.AddParameter("treat_columns_as_factor", "FALSE", iPosition:=8)
+ clsSummaryDefaultFunction.AddParameter("treat_columns_as_factor", "TRUE", iPosition:=8)
+ clsSummaryDefaultFunction.AddParameter("drop", "TRUE", iPosition:=9)
clsSummaryDefaultFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesList, iPosition:=12)
clsSummaryDefaultFunction.SetAssignToObject("summary_table")
clsFrequencyDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table")
clsFrequencyDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=8)
clsFrequencyDefaultFunction.AddParameter("treat_columns_as_factor", "FALSE", iPosition:=10)
+ clsFrequencyDefaultFunction.AddParameter("drop", "TRUE", iPosition:=9)
clsFrequencyDefaultFunction.AddParameter("summaries", "count_label", iPosition:=11)
clsFrequencyDefaultFunction.SetAssignToObject("frequency_table")
-
' Gt function
Dim clsGtFunction As New RFunction
clsGtFunction.SetPackageName("gt")
clsGtFunction.SetRCommand("gt")
+ ClsTabSpannerDelimFunction.SetPackageName("gt")
+ ClsTabSpannerDelimFunction.SetRCommand("tab_spanner_delim")
+ ClsTabSpannerDelimFunction.AddParameter("delim", Chr(34) & "_" & Chr(34))
+
+ clsArrangeFunction.SetRCommand("arrange")
+
clsSummaryOperator.SetOperation("%>%")
clsSummaryOperator.bBrackets = False
clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsSummaryDefaultFunction, iPosition:=0)
- clsSummaryOperator.AddParameter("gt", clsRFunctionParameter:=clsGtFunction.Clone, iPosition:=2)
+ clsSummaryOperator.AddParameter("right", clsROperatorParameter:=clsSpannerOperator, iPosition:=3)
+
+ clsSpannerOperator.SetOperation("%>%")
+ clsSpannerOperator.AddParameter("gt", clsRFunctionParameter:=clsGtFunction.Clone, iPosition:=0)
+ clsSpannerOperator.AddParameter("tableFun", clsRFunctionParameter:=ClsTabSpannerDelimFunction, iPosition:=2)
clsFrequencyOperator.SetOperation("%>%")
clsFrequencyOperator.bBrackets = False
clsFrequencyOperator.AddParameter("tableFun", clsRFunctionParameter:=clsFrequencyDefaultFunction, iPosition:=0)
- clsFrequencyOperator.AddParameter("gt", clsRFunctionParameter:=clsGtFunction.Clone, iPosition:=2)
+ clsFrequencyOperator.AddParameter("right", clsROperatorParameter:=clsSpannerOperator, iPosition:=3)
clsJoiningPipeOperator.SetOperation("%>%")
clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0)
ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator)
+
clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table",
strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table,
strRObjectFormatToAssignTo:=RObjectFormat.Html,
@@ -251,6 +258,7 @@ Public Class dlgSummaryTables
bResetSubdialog = True
bResetFormatSubdialog = True
TestOKEnabled()
+ SetDefaultValues()
End Sub
Public Sub SetRCodeForControls(bReset As Boolean)
@@ -259,6 +267,7 @@ Public Class dlgSummaryTables
ucrChkStoreResults.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrChkStoreResults.GetParameter, iAdditionalPairNo:=1)
ucrNudSigFigs.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrNudSigFigs.GetParameter, iAdditionalPairNo:=1)
ucrReceiverFactors.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrReceiverFactors.GetParameter, iAdditionalPairNo:=1)
+ ucrChkDropLevels.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrChkDropLevels.GetParameter, iAdditionalPairNo:=1)
ucrSelectorSummaryTables.SetRCode(clsSummaryDefaultFunction, bReset)
ucrChkOmitMissing.SetRCode(clsSummaryDefaultFunction, bReset)
@@ -266,19 +275,24 @@ Public Class dlgSummaryTables
ucrChkFrequencyDisplayMargins.SetRCode(clsFrequencyDefaultFunction, bReset)
ucrNudSigFigs.SetRCode(clsSummaryDefaultFunction, bReset)
ucrReceiverWeights.SetRCode(clsSummaryDefaultFunction, bReset)
- ucrChkSummaries.SetRCode(clsSummaryDefaultFunction, bReset)
+ ucrChkDropLevels.SetRCode(clsSummaryDefaultFunction, bReset)
ucrChkWeight.SetRCode(clsSummaryDefaultFunction, bReset)
- ucrPnlSummaryFrequencyTables.SetRCode(clsDummyFunction, bReset)
ucrChkStoreResults.SetRCode(clsSummaryDefaultFunction, bReset)
ucrChkDisplayAsPercentage.SetRCode(clsFrequencyDefaultFunction, bReset)
- ucrPnlColumnFactor.SetRCode(clsDummyFunction, bReset)
ucrSaveTable.SetRCode(clsJoiningPipeOperator, bReset)
If bReset Then
ucrReceiverSummaryCols.SetRCode(clsSummaryDefaultFunction, bReset)
ucrReceiverFactors.SetRCode(clsSummaryDefaultFunction, bReset)
+ ucrNudColFactors.SetRCode(clsFrequencyDefaultFunction, bReset)
+ ucrPnlSummaryFrequencyTables.SetRCode(clsDummyFunction, bReset)
+ UcrNudColumnSumFactors.SetRCode(clsSummaryDefaultFunction, bReset)
+ ucrNudPositionSum.SetRCode(clsSummaryDefaultFunction, bReset)
+ ucrNudPositionVar.SetRCode(clsSummaryDefaultFunction, bReset)
End If
bRCodeSet = True
FillListView()
+ SetDefaultValues()
+ SetColFactorDefaults()
End Sub
Private Sub TestOKEnabled()
@@ -299,7 +313,11 @@ Public Class dlgSummaryTables
End If
End Sub
+ Private Sub btnMoreOptions_Click(sender As Object, e As EventArgs) Handles btnMoreOptions.Click
+ sdgTableOptions.Setup(ucrSelectorSummaryTables.strCurrentDataFrame, clsJoiningPipeOperator)
+ sdgTableOptions.ShowDialog(Me)
+ End Sub
Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset
SetDefaults()
SetRCodeForControls(True)
@@ -315,6 +333,8 @@ Public Class dlgSummaryTables
sdgSummaries.ShowDialog()
sdgSummaries.bEnable2VariableTab = True
FillListView()
+ SetSummariesDefaults()
+ SetVariableDefaults()
TestOKEnabled()
End Sub
@@ -350,74 +370,59 @@ Public Class dlgSummaryTables
Private Sub ucrCoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFactors.ControlContentsChanged, ucrSaveTable.ControlContentsChanged,
ucrChkWeight.ControlContentsChanged, ucrReceiverWeights.ControlContentsChanged, ucrReceiverSummaryCols.ControlContentsChanged,
- ucrPnlSummaryFrequencyTables.ControlContentsChanged, ucrPnlColumnFactor.ControlContentsChanged, ucrReceiverColumnFactor.ControlContentsChanged
+ ucrPnlSummaryFrequencyTables.ControlContentsChanged
TestOKEnabled()
End Sub
- Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnFactor.ControlValueChanged,
- ucrChkSummaries.ControlValueChanged, ucrPnlSummaryFrequencyTables.ControlValueChanged, ucrReceiverColumnFactor.ControlValueChanged,
- ucrReceiverFactors.ControlValueChanged
+ Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudColFactors.ControlValueChanged, UcrNudColumnSumFactors.ControlValueChanged,
+ ucrReceiverFactors.ControlValueChanged, ucrNudPositionSum.ControlValueChanged, ucrNudPositionVar.ControlValueChanged, ucrReceiverSummaryCols.ControlValueChanged
+
+ SetDefaultValues()
+ SetColFactorDefaults()
+ SettingParameters()
+ AddPivotWiderVariables()
+ End Sub
+
+ Private Sub ucrPnlSummaryFrequencyTables_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSummaryFrequencyTables.ControlValueChanged
cmdSummaries.Visible = rdoSummaryTable.Checked
cmdFormatTable.Location = New Point(286, If(rdoSummaryTable.Checked, 464, 273))
+
+ DialogueSize()
+ SettingParameters()
+ SetDefaultValues()
+ SetVariableDefaults()
+ SetSummariesDefaults()
+ SetColFactorDefaults()
+ AddPivotWiderVariables()
+ End Sub
+
+ Private Sub SettingParameters()
If rdoFrequencyTable.Checked Then
grpDisplay.Visible = False
- rdoVariable.Visible = False
clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsFrequencyOperator, iPosition:=0)
- clsDummyFunction.AddParameter("rdo_checked", "rdoFrequency", iPosition:=1)
ucrSaveTable.SetPrefix("frequency_table")
- rdoSummaryVariable.Text = "Summary-Variable"
Else
grpDisplay.Visible = True
clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0)
- clsDummyFunction.AddParameter("rdo_checked", "rdoSummary", iPosition:=1)
ucrSaveTable.SetPrefix("summary_table")
- If ucrChkSummaries.Checked Then
- rdoSummaryVariable.Text = "Summary"
- rdoVariable.Visible = True
- Else
- rdoSummaryVariable.Text = "Summary-Variable"
- rdoVariable.Visible = False
- End If
+
End If
If bRCodeSet Then
- If rdoNoColumnFactor.Checked Then
- clsSummaryOperator.RemoveParameterByName("col_factor")
- clsFrequencyOperator.RemoveParameterByName("col_factor")
- clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=2)
- Else
- clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1)
- clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1)
- If rdoFactorVariable.Checked Then
- ucrReceiverColumnFactor.SetMeAsReceiver()
- clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=2)
- clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0)
- ElseIf rdoSummaryVariable.Checked Then
- clsDummyFunction.AddParameter("factor_cols", "SumVar", iPosition:=2)
- If rdoFrequencyTable.Checked Then
- clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0)
- Else
- If ucrChkSummaries.Checked Then
- clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0)
- Else
- clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0)
- End If
- End If
- ElseIf rdoVariable.Checked Then
- clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=2)
- clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0)
+ If rdoFrequencyTable.Checked Then
+ If ucrNudColFactors.Value = 0 Then
+ clsFrequencyOperator.RemoveParameterByName("col_factor")
+ Else
+ clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1)
End If
- End If
- End If
-
- If rdoVariable.Checked Then
- If Not ucrChkSummaries.Checked Then
- rdoSummaryVariable.Checked = True
Else
- rdoVariable.Checked = True
+ If UcrNudColumnSumFactors.Value = 0 Then
+ clsSummaryOperator.RemoveParameterByName("col_factor")
+ Else
+ clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1)
+ End If
End If
End If
- AddingColumnFactor()
- DialogueSize()
+ AddPivotWiderVariables()
End Sub
Private Sub FillListView()
@@ -448,6 +453,9 @@ Public Class dlgSummaryTables
clsSummariesList.AddParameter(clsParameter)
iPosition += 1
Next
+ SetSummariesDefaults()
+ SetColFactorDefaults()
+ SetVariableDefaults()
End Sub
Private Sub ucrChkDisplayAsPercentage_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayAsPercentage.ControlValueChanged
@@ -461,45 +469,215 @@ Public Class dlgSummaryTables
Private Sub DialogueSize()
If rdoFrequencyTable.Checked Then
- Me.Size = New Size(505, iDialogueXsize * 0.75)
- Me.ucrNudSigFigs.Location = New Point(119, 304)
- Me.lblSigFigs.Location = New Point(7, 307)
- Me.ucrSaveTable.Location = New Point(10, 340)
- Me.ucrBase.Location = New Point(iUcrBaseXLocation, 370)
+ Me.Size = New Size(505, iDialogueXsize * 0.6)
+ Me.ucrNudSigFigs.Location = New Point(119, 309)
+ Me.lblSigFigs.Location = New Point(7, 312)
+ Me.ucrSaveTable.Location = New Point(10, 360)
+ Me.ucrBase.Location = New Point(iUcrBaseXLocation, 390)
Else
Me.Size = New Size(505, iDialogueXsize)
- Me.ucrNudSigFigs.Location = New Point(119, 356)
- Me.lblSigFigs.Location = New Point(7, 359)
- Me.ucrSaveTable.Location = New Point(10, 495)
- Me.ucrBase.Location = New Point(iUcrBaseXLocation, 524)
+ Me.ucrNudSigFigs.Location = New Point(119, 376)
+ Me.lblSigFigs.Location = New Point(7, 379)
+ Me.ucrSaveTable.Location = New Point(10, 520)
+ Me.ucrBase.Location = New Point(iUcrBaseXLocation, 544)
End If
End Sub
- Private Sub AddingColumnFactor()
- Dim lstVariables As New List(Of String)
- Dim iXVarCount As Integer
+ Private Sub AddPivotWiderVariables()
+ If rdoFrequencyTable.Checked Then
+ ' Get the number of variables to use from ucrNudColFactors
+ Dim numVars As Integer = ucrNudColFactors.Value
- iXVarCount = lstVariables.Count
- If bRCodeSet Then
- If lstVariables.Contains(ucrReceiverColumnFactor.GetVariableNames(False)) OrElse
- Not ucrReceiverFactors.GetVariableNamesAsList().Contains(ucrReceiverColumnFactor.GetVariableNames(False)) Then
- ucrReceiverColumnFactor.Clear()
- ucrReceiverFactors.SetMeAsReceiver()
+ ' Get the list of selected variable names from ucrReceiverFactors
+ Dim varNames As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList()
+
+ ' Create a new list to store the selected variables for names_from
+ Dim selectedVars As New List(Of String)
+
+ ' Loop through the ucrReceiverFactors and get only the first numVars items
+ For i As Integer = varNames.Count - 1 To Math.Max(varNames.Count - numVars, 0) Step -1
+ selectedVars.Add(varNames(i)) ' Add the variable name to selectedVars
+ Next
+
+ ' Create a comma-separated string from the selected variables for names_from
+ Dim varsString As String = "c(" & String.Join(",", selectedVars) & ")"
+
+ ' Pass the selected variables to the clsPivotWiderFunction's names_from parameter
+ clsPivotWiderFunction.AddParameter("names_from", varsString, iPosition:=0)
+
+ ' Check if all variables are added to names_from
+ If selectedVars.Count = varNames.Count Then
+ ' If all variables are added to names_from, remove the arrange parameter
+ clsFrequencyOperator.RemoveParameterByName("arrange")
+ Else
+ clsFrequencyOperator.AddParameter("arrange", clsRFunctionParameter:=clsArrangeFunction, iPosition:=2)
End If
- If iXVarCount = 0 AndAlso ucrReceiverFactors.lstSelectedVariables.Items.Count >= 1 AndAlso
- ucrReceiverColumnFactor.IsEmpty() Then
- ucrReceiverColumnFactor.Add(ucrReceiverFactors.lstSelectedVariables.Items(0).Text)
- ucrReceiverFactors.SetMeAsReceiver()
- ElseIf ucrReceiverFactors.IsEmpty Then
- ucrReceiverColumnFactor.Clear()
+
+ ' Get the remaining variables that were not added to names_from
+ Dim remainingVars As New List(Of String)
+
+ For i As Integer = 0 To varNames.Count - numVars - 1
+ remainingVars.Add(varNames(i)) ' Add the remaining variables to arrange
+ Next
+
+ ' Create a comma-separated string for the remaining variables
+ Dim arrangeString As String = String.Join(",", remainingVars)
+
+ ' Pass the remaining variables to the arrange parameter in clsArrangeFunction
+ clsArrangeFunction.AddParameter("arrange", arrangeString, iPosition:=0, bIncludeArgumentName:=False)
+
+
+ Else
+ ' Step 1: Define the number of items to add based on UcrNudColumnSumFactors
+ Dim numSumm As Integer = UcrNudColumnSumFactors.Value
+
+ ' Step 2: Get the list of variables in ucrReceiverFactors
+ Dim varNames As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList()
+
+ ' Step 3: Set up local variables to represent the adjusted positions without changing control values
+ Dim positionVar As Integer = ucrNudPositionVar.Value
+ Dim positionSum As Integer = ucrNudPositionSum.Value
+
+ ' Step 4: Adjust positions if ucrNudPositionVar equals ucrNudPositionSum
+ If positionVar = positionSum Then
+ ' If both are at their maximum values, position "variable" one step lower than positionVar
+ If positionVar = ucrNudPositionVar.Maximum Then
+ positionVar = Math.Max(1, positionVar - 1)
+ Else
+ ' If not at maximum, position "summary" one step higher than positionSum
+ positionSum = Math.Min(ucrNudPositionSum.Maximum, positionSum + 1)
+ End If
End If
- lstVariables = ucrReceiverFactors.GetVariableNamesAsList()
- If ucrReceiverFactors.lstSelectedVariables.Items.Count >= 1 Then
- Dim iIndex = ucrReceiverFactors.lstSelectedVariables.Items.Count - 1
- ucrReceiverPercentages.Add(ucrReceiverFactors.lstSelectedVariables.Items(iIndex).Text)
- ucrReceiverFactors.SetMeAsReceiver()
+
+ ' Step 5: Add "variable" if condition is met and place it at adjusted positionVar
+ If ucrReceiverSummaryCols.Count > 1 AndAlso numSumm > 0 Then
+ Dim variableIndex As Integer = Math.Max(0, Math.Min(positionVar - 1, varNames.Count))
+ If variableIndex < varNames.Count Then
+ varNames.Insert(variableIndex, "variable")
+ Else
+ varNames.Add("variable")
+ End If
+ End If
+
+ ' Step 6: Add "summary" if condition is met and place it at adjusted positionSum
+ If ucrReorderSummary.Count > 1 AndAlso numSumm >= 1 Then
+ Dim summaryIndex As Integer = Math.Max(0, Math.Min(positionSum - 1, varNames.Count))
+ If summaryIndex < varNames.Count Then
+ varNames.Insert(summaryIndex, "summary")
+ Else
+ varNames.Add("summary")
+ End If
+ End If
+
+ ' Step 7: Trim the list to include only the highest-positioned items, up to numSumm
+ Dim namesFromList As New List(Of String)
+ For i As Integer = varNames.Count - 1 To Math.Max(varNames.Count - numSumm, 0) Step -1
+ namesFromList.Add(varNames(i))
+ Next
+
+ ' Convert namesFromList to a comma-separated string for names_from parameter
+ Dim varsSummary As String = "c(" & String.Join(",", namesFromList) & ")"
+ clsPivotWiderFunction.AddParameter("names_from", varsSummary, iPosition:=0)
+
+ ' Step 8: Identify remaining variables that were not added to names_from
+ Dim remainingVars As List(Of String) = varNames.Except(namesFromList).ToList()
+
+ ' Check if all variables are added to names_from
+ If remainingVars.Count = 0 Then
+ ' If all variables are added to names_from, remove the arrange parameter
+ clsSummaryOperator.RemoveParameterByName("arrange")
+ Else
+ ' Convert remaining variables to a comma-separated string for arrange parameter
+ Dim arrangeVars As String = String.Join(",", remainingVars)
+ clsArrangeFunction.AddParameter("arrange", arrangeVars, iPosition:=0)
+ clsSummaryOperator.AddParameter("arrange", clsRFunctionParameter:=clsArrangeFunction, iPosition:=2)
End If
+
+ End If
+ End Sub
+
+ Private Sub ucrReceiverFactors_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverFactors.SelectionChanged, ucrReceiverSummaryCols.SelectionChanged, ucrReorderSummary.SelectedIndexChanged
+ SetDefaultValues()
+ SetSummariesDefaults()
+ SetVariableDefaults()
+ SetColFactorDefaults()
+ End Sub
+
+ Private Sub SetDefaultValues()
+ Dim selectedVariables As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList ' Example, adjust based on your control
+ Dim selectedCount As Integer = selectedVariables.Count
+ ' Ensure ucrNudColFactors.Maximum does not exceed the number of selected variables
+ If selectedCount > 0 Then
+ ucrNudColFactors.Maximum = selectedCount
+
+ If ucrNudColFactors.Value > selectedCount Then
+ ucrNudColFactors.Value = selectedCount
+ End If
+
+ ucrNudColFactors.Minimum = 0
+
+ Else
+ ucrNudColFactors.Minimum = 0
+ End If
+
+ End Sub
+
+ Private Sub SetVariableDefaults()
+ Dim selectedColumns As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() ' Example, adjust based on your control
+ Dim defaultVariables As Integer = selectedColumns.Count
+
+ If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count = 1 Then
+ ucrNudPositionVar.Maximum = defaultVariables + 1
+ ucrNudPositionVar.Minimum = 1
+ ucrNudPositionVar.Value = defaultVariables + 1
+ ucrNudPositionVar.Enabled = True
+ ElseIf ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then
+ ucrNudPositionVar.Maximum = defaultVariables + 2
+ ucrNudPositionVar.Minimum = 1
+ ucrNudPositionVar.Value = defaultVariables + 1
+ ucrNudPositionVar.Enabled = True
+ Else
+ ucrNudPositionVar.Value = 1
+ ucrNudPositionVar.Enabled = False
+ End If
+
+ End Sub
+
+ Private Sub SetSummariesDefaults()
+ Dim selectedSummaries As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList ' Example, adjust based on your control
+ Dim defaultSummaries As Integer = selectedSummaries.Count
+
+ If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then
+ ucrNudPositionSum.Maximum = defaultSummaries + 2
+ ucrNudPositionSum.Minimum = 1
+ ucrNudPositionSum.Value = defaultSummaries + 2
+ ucrNudPositionSum.Enabled = True
+ ElseIf ucrReceiverSummaryCols.Count = 1 AndAlso ucrReorderSummary.Count > 1 Then
+ ucrNudPositionSum.Maximum = defaultSummaries + 1
+ ucrNudPositionSum.Minimum = 1
+ ucrNudPositionSum.Value = defaultSummaries + 1
+ ucrNudPositionSum.Enabled = True
+ Else
+ ucrNudPositionSum.Maximum = 1
+ ucrNudPositionSum.Minimum = 1
+ ucrNudPositionSum.Value = 1
+ ucrNudPositionSum.Enabled = False
+ End If
+
+ End Sub
+
+ Private Sub SetColFactorDefaults()
+ Dim selectedColFactors As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList()
+ Dim defaultColFactors As Integer = selectedColFactors.Count
+
+ If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then
+ UcrNudColumnSumFactors.Maximum = defaultColFactors + 2
+ ElseIf ucrReceiverSummaryCols.Count > 1 OrElse ucrReorderSummary.Count > 1 Then
+ UcrNudColumnSumFactors.Maximum = defaultColFactors + 1
+ Else
+ UcrNudColumnSumFactors.Maximum = defaultColFactors
End If
+ UcrNudColumnSumFactors.Minimum = 0
End Sub
End Class
diff --git a/instat/dlgUseTable.Designer.vb b/instat/dlgUseTable.Designer.vb
index 31ab547960e..6b0aaf480b9 100644
--- a/instat/dlgUseTable.Designer.vb
+++ b/instat/dlgUseTable.Designer.vb
@@ -22,27 +22,47 @@ Partial Class dlgUseTable
'Do not modify it using the code editor.
_
Private Sub InitializeComponent()
- Me.ucrBase = New instat.ucrButtons()
- Me.ucrTablesReceiver = New instat.ucrReceiverSingle()
- Me.lblTablesToUse = New System.Windows.Forms.Label()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(dlgUseTable))
+ Me.btnTableOptions = New System.Windows.Forms.Button()
+ Me.lblTable = New System.Windows.Forms.Label()
Me.ucrSaveTable = New instat.ucrSave()
- Me.ucrPnlExportOptions = New instat.UcrPanel()
- Me.rdoAsHTML = New System.Windows.Forms.RadioButton()
- Me.rdoAsRTF = New System.Windows.Forms.RadioButton()
- Me.rdoAsWord = New System.Windows.Forms.RadioButton()
- Me.rdoAsLaTex = New System.Windows.Forms.RadioButton()
- Me.cmdFormatOptions = New System.Windows.Forms.Button()
- Me.lblExportTable = New System.Windows.Forms.Label()
+ Me.ucrTablesReceiver = New instat.ucrReceiverSingle()
Me.ucrTablesSelector = New instat.ucrSelectorByDataFrameAddRemove()
+ Me.ucrBase = New instat.ucrButtons()
+ Me.ucrPnlOptions = New instat.UcrPanel()
+ Me.ucrFilePath = New instat.ucrFilePath()
+ Me.lblFileType = New System.Windows.Forms.Label()
+ Me.ucrChkExport = New instat.ucrCheck()
+ Me.cboFileType = New System.Windows.Forms.ComboBox()
Me.SuspendLayout()
'
- 'ucrBase
+ 'btnTableOptions
'
- Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrBase.Location = New System.Drawing.Point(2, 397)
- Me.ucrBase.Name = "ucrBase"
- Me.ucrBase.Size = New System.Drawing.Size(407, 52)
- Me.ucrBase.TabIndex = 0
+ Me.btnTableOptions.Location = New System.Drawing.Point(8, 214)
+ Me.btnTableOptions.Name = "btnTableOptions"
+ Me.btnTableOptions.Size = New System.Drawing.Size(135, 23)
+ Me.btnTableOptions.TabIndex = 11
+ Me.btnTableOptions.Text = "Table Options"
+ Me.btnTableOptions.UseVisualStyleBackColor = True
+ '
+ 'lblTable
+ '
+ Me.lblTable.AutoSize = True
+ Me.lblTable.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblTable.Location = New System.Drawing.Point(258, 43)
+ Me.lblTable.Name = "lblTable"
+ Me.lblTable.Size = New System.Drawing.Size(37, 13)
+ Me.lblTable.TabIndex = 25
+ Me.lblTable.Text = "Table:"
+ '
+ 'ucrSaveTable
+ '
+ Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrSaveTable.Location = New System.Drawing.Point(11, 251)
+ Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
+ Me.ucrSaveTable.Name = "ucrSaveTable"
+ Me.ucrSaveTable.Size = New System.Drawing.Size(390, 34)
+ Me.ucrSaveTable.TabIndex = 4
'
'ucrTablesReceiver
'
@@ -57,96 +77,6 @@ Partial Class dlgUseTable
Me.ucrTablesReceiver.TabIndex = 2
Me.ucrTablesReceiver.ucrSelector = Nothing
'
- 'lblTablesToUse
- '
- Me.lblTablesToUse.AutoSize = True
- Me.lblTablesToUse.Location = New System.Drawing.Point(255, 43)
- Me.lblTablesToUse.Name = "lblTablesToUse"
- Me.lblTablesToUse.Size = New System.Drawing.Size(75, 13)
- Me.lblTablesToUse.TabIndex = 3
- Me.lblTablesToUse.Text = "Table To Use:"
- '
- 'ucrSaveTable
- '
- Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrSaveTable.Location = New System.Drawing.Point(10, 360)
- Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
- Me.ucrSaveTable.Name = "ucrSaveTable"
- Me.ucrSaveTable.Size = New System.Drawing.Size(390, 34)
- Me.ucrSaveTable.TabIndex = 4
- '
- 'ucrPnlExportOptions
- '
- Me.ucrPnlExportOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrPnlExportOptions.Enabled = False
- Me.ucrPnlExportOptions.Location = New System.Drawing.Point(8, 243)
- Me.ucrPnlExportOptions.Name = "ucrPnlExportOptions"
- Me.ucrPnlExportOptions.Size = New System.Drawing.Size(105, 110)
- Me.ucrPnlExportOptions.TabIndex = 5
- '
- 'rdoAsHTML
- '
- Me.rdoAsHTML.AutoSize = True
- Me.rdoAsHTML.Location = New System.Drawing.Point(14, 250)
- Me.rdoAsHTML.Name = "rdoAsHTML"
- Me.rdoAsHTML.Size = New System.Drawing.Size(55, 17)
- Me.rdoAsHTML.TabIndex = 6
- Me.rdoAsHTML.TabStop = True
- Me.rdoAsHTML.Text = "HTML"
- Me.rdoAsHTML.UseVisualStyleBackColor = True
- '
- 'rdoAsRTF
- '
- Me.rdoAsRTF.AutoSize = True
- Me.rdoAsRTF.Location = New System.Drawing.Point(14, 275)
- Me.rdoAsRTF.Name = "rdoAsRTF"
- Me.rdoAsRTF.Size = New System.Drawing.Size(46, 17)
- Me.rdoAsRTF.TabIndex = 7
- Me.rdoAsRTF.TabStop = True
- Me.rdoAsRTF.Text = "RTF"
- Me.rdoAsRTF.UseVisualStyleBackColor = True
- '
- 'rdoAsWord
- '
- Me.rdoAsWord.AutoSize = True
- Me.rdoAsWord.Location = New System.Drawing.Point(14, 300)
- Me.rdoAsWord.Name = "rdoAsWord"
- Me.rdoAsWord.Size = New System.Drawing.Size(51, 17)
- Me.rdoAsWord.TabIndex = 8
- Me.rdoAsWord.TabStop = True
- Me.rdoAsWord.Text = "Word"
- Me.rdoAsWord.UseVisualStyleBackColor = True
- '
- 'rdoAsLaTex
- '
- Me.rdoAsLaTex.AutoSize = True
- Me.rdoAsLaTex.Location = New System.Drawing.Point(14, 325)
- Me.rdoAsLaTex.Name = "rdoAsLaTex"
- Me.rdoAsLaTex.Size = New System.Drawing.Size(55, 17)
- Me.rdoAsLaTex.TabIndex = 9
- Me.rdoAsLaTex.TabStop = True
- Me.rdoAsLaTex.Text = "LaTex"
- Me.rdoAsLaTex.UseVisualStyleBackColor = True
- '
- 'cmdFormatOptions
- '
- Me.cmdFormatOptions.Location = New System.Drawing.Point(256, 183)
- Me.cmdFormatOptions.Name = "cmdFormatOptions"
- Me.cmdFormatOptions.Size = New System.Drawing.Size(135, 23)
- Me.cmdFormatOptions.TabIndex = 11
- Me.cmdFormatOptions.Text = "Format Options"
- Me.cmdFormatOptions.UseVisualStyleBackColor = True
- '
- 'lblExportTable
- '
- Me.lblExportTable.AutoSize = True
- Me.lblExportTable.Enabled = False
- Me.lblExportTable.Location = New System.Drawing.Point(5, 227)
- Me.lblExportTable.Name = "lblExportTable"
- Me.lblExportTable.Size = New System.Drawing.Size(119, 13)
- Me.lblExportTable.TabIndex = 12
- Me.lblExportTable.Text = "Export Table Object As:"
- '
'ucrTablesSelector
'
Me.ucrTablesSelector.AutoSize = True
@@ -159,23 +89,84 @@ Partial Class dlgUseTable
Me.ucrTablesSelector.Size = New System.Drawing.Size(213, 183)
Me.ucrTablesSelector.TabIndex = 1
'
+ 'ucrBase
+ '
+ Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrBase.Location = New System.Drawing.Point(2, 397)
+ Me.ucrBase.Name = "ucrBase"
+ Me.ucrBase.Size = New System.Drawing.Size(407, 52)
+ Me.ucrBase.TabIndex = 0
+ '
+ 'ucrPnlOptions
+ '
+ Me.ucrPnlOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrPnlOptions.Location = New System.Drawing.Point(8, 263)
+ Me.ucrPnlOptions.Margin = New System.Windows.Forms.Padding(5)
+ Me.ucrPnlOptions.Name = "ucrPnlOptions"
+ Me.ucrPnlOptions.Size = New System.Drawing.Size(158, 106)
+ Me.ucrPnlOptions.TabIndex = 27
+ '
+ 'ucrFilePath
+ '
+ Me.ucrFilePath.AutoSize = True
+ Me.ucrFilePath.DefaultFileSuggestionName = ""
+ Me.ucrFilePath.FilePath = ""
+ Me.ucrFilePath.FilePathBrowseText = "Browse"
+ Me.ucrFilePath.FilePathDialogFilter = resources.GetString("ucrFilePath.FilePathDialogFilter")
+ Me.ucrFilePath.FilePathDialogTitle = "Export Data File"
+ Me.ucrFilePath.FilePathLabel = "Save As:"
+ Me.ucrFilePath.FolderBrowse = False
+ Me.ucrFilePath.Location = New System.Drawing.Point(30, 346)
+ Me.ucrFilePath.Name = "ucrFilePath"
+ Me.ucrFilePath.SelectedFileFilterIndex = 1
+ Me.ucrFilePath.Size = New System.Drawing.Size(365, 34)
+ Me.ucrFilePath.TabIndex = 28
+ '
+ 'lblFileType
+ '
+ Me.lblFileType.AutoSize = True
+ Me.lblFileType.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblFileType.Location = New System.Drawing.Point(31, 320)
+ Me.lblFileType.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0)
+ Me.lblFileType.Name = "lblFileType"
+ Me.lblFileType.Size = New System.Drawing.Size(86, 13)
+ Me.lblFileType.TabIndex = 30
+ Me.lblFileType.Text = "Select File Type:"
+ '
+ 'ucrChkExport
+ '
+ Me.ucrChkExport.AutoSize = True
+ Me.ucrChkExport.Checked = False
+ Me.ucrChkExport.Location = New System.Drawing.Point(12, 290)
+ Me.ucrChkExport.Name = "ucrChkExport"
+ Me.ucrChkExport.Size = New System.Drawing.Size(253, 23)
+ Me.ucrChkExport.TabIndex = 31
+ '
+ 'cboFileType
+ '
+ Me.cboFileType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
+ Me.cboFileType.FormattingEnabled = True
+ Me.cboFileType.Location = New System.Drawing.Point(164, 313)
+ Me.cboFileType.Name = "cboFileType"
+ Me.cboFileType.Size = New System.Drawing.Size(170, 21)
+ Me.cboFileType.TabIndex = 32
+ '
'dlgUseTable
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(411, 450)
- Me.Controls.Add(Me.lblExportTable)
- Me.Controls.Add(Me.cmdFormatOptions)
- Me.Controls.Add(Me.rdoAsLaTex)
- Me.Controls.Add(Me.rdoAsWord)
- Me.Controls.Add(Me.rdoAsRTF)
- Me.Controls.Add(Me.rdoAsHTML)
- Me.Controls.Add(Me.ucrPnlExportOptions)
+ Me.ClientSize = New System.Drawing.Size(411, 452)
+ Me.Controls.Add(Me.cboFileType)
+ Me.Controls.Add(Me.ucrChkExport)
+ Me.Controls.Add(Me.lblFileType)
+ Me.Controls.Add(Me.ucrFilePath)
+ Me.Controls.Add(Me.lblTable)
+ Me.Controls.Add(Me.btnTableOptions)
Me.Controls.Add(Me.ucrSaveTable)
- Me.Controls.Add(Me.lblTablesToUse)
Me.Controls.Add(Me.ucrTablesReceiver)
Me.Controls.Add(Me.ucrTablesSelector)
Me.Controls.Add(Me.ucrBase)
+ Me.Controls.Add(Me.ucrPnlOptions)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.MaximizeBox = False
Me.MinimizeBox = False
@@ -190,13 +181,12 @@ Partial Class dlgUseTable
Friend WithEvents ucrBase As ucrButtons
Friend WithEvents ucrTablesSelector As ucrSelectorByDataFrameAddRemove
Friend WithEvents ucrTablesReceiver As ucrReceiverSingle
- Friend WithEvents lblTablesToUse As Label
- Friend WithEvents ucrPnlExportOptions As UcrPanel
Friend WithEvents ucrSaveTable As ucrSave
- Friend WithEvents rdoAsWord As RadioButton
- Friend WithEvents rdoAsRTF As RadioButton
- Friend WithEvents rdoAsHTML As RadioButton
- Friend WithEvents cmdFormatOptions As Button
- Friend WithEvents rdoAsLaTex As RadioButton
- Friend WithEvents lblExportTable As Label
+ Friend WithEvents btnTableOptions As Button
+ Friend WithEvents lblTable As Label
+ Friend WithEvents ucrPnlOptions As UcrPanel
+ Friend WithEvents ucrFilePath As ucrFilePath
+ Friend WithEvents lblFileType As Label
+ Friend WithEvents ucrChkExport As ucrCheck
+ Friend WithEvents cboFileType As ComboBox
End Class
diff --git a/instat/dlgUseTable.resx b/instat/dlgUseTable.resx
index 1af7de150c9..e280411fe39 100644
--- a/instat/dlgUseTable.resx
+++ b/instat/dlgUseTable.resx
@@ -117,4 +117,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Comma separated file (*.csv)|*.csv|Excel files (*.xlsx)|*.xlsx|TAB-separated data (*.tsv)|*.tsv|Pipe-separated data (*.psv)|*.psv|Feather r / Python interchange format (*.feather)|*.feather|Fixed-Width format data (*.fwf)|*.fwf|Serialized r objects (*.rds)|*.rds|Saved r objects (*.RData)|*.RData|JSON(*.json)|*.json|YAML(*.yml)|*.yml|Stata(*.dta)|*.dta|SPSS(*.sav)|*.sav|XBASE database files (*.dbf)|*.dbf| Weka Attribute - Relation File Format (*.arff)|*.arff|r syntax object (*.R)|*.R|Xml(*.xml)|*.xml|HTML(*.html)|*.html
+
\ No newline at end of file
diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb
index 1757a270ecf..5cdd08a8585 100644
--- a/instat/dlgUseTable.vb
+++ b/instat/dlgUseTable.vb
@@ -13,22 +13,13 @@
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see .
-
+Imports System.IO
Imports instat.Translations
Public Class dlgUseTable
Private bFirstLoad As Boolean = True
Private bReset As Boolean = True
- Private clsRFunctionAsHTML, clsRFunctionAsRTF, clsRFunctionAsWord, clsRFunctionAsLaTex, clsUseTableFunction As New RFunction
-
- Private clsTableTitleFunction, clsTabFootnoteTitleFunction, clsTableSourcenoteFunction, clsDummyFunction,
- clsThemesTabOptionsFunction, clsFootnoteCellFunction, clsSecondFootnoteCellBodyFunction,
- clsFootnoteTitleLocationFunction, clsFootnoteCellBodyFunction,
- clsFootnoteSubtitleLocationFunction, clsTabFootnoteSubtitleFunction,
- clsSecondFootnoteCellFunction, clsTabStyleCellTitleFunction,
- clsTabStyleCellTextFunction, clsTabStyleFunction, clsTabStylePxFunction,
- clsgtExtraThemesFunction As New RFunction
-
- Private clsPipeOperator, clsSummaryOperator, clsJoiningPipeOperator As ROperator
+ Private clsGetGtTableFunction, clsSaveGtRFunction As New RFunction
+ Private clsGtTableROperator, clsBaseOperator As New ROperator
Private Sub dlgUseTable_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
@@ -56,150 +47,74 @@ Public Class dlgUseTable
ucrTablesReceiver.strSelectorHeading = "Tables"
ucrTablesReceiver.SetItemType(RObjectTypeLabel.Table)
- ''To Be enabled later when the formats are supported.
- rdoAsHTML.Enabled = False
- rdoAsLaTex.Enabled = False
- rdoAsRTF.Enabled = False
- rdoAsWord.Enabled = False
- 'ucrPnlExportOptions.AddRadioButton(rdoAsHTML)
- 'ucrPnlExportOptions.AddRadioButton(rdoAsRTF)
- 'ucrPnlExportOptions.AddRadioButton(rdoAsWord)
- 'ucrPnlExportOptions.AddRadioButton(rdoAsLaTex)
- 'ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsHTML, "as_raw_html")
- 'ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsRTF, "as_rtf")
- 'ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsWord, "as_word")
- 'ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsLaTex, "as_word")
-
ucrSaveTable.SetPrefix("use_table")
ucrSaveTable.SetSaveType(strRObjectType:=RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html)
ucrSaveTable.SetDataFrameSelector(ucrTablesSelector.ucrAvailableDataFrames)
ucrSaveTable.SetCheckBoxText("Store New Table")
ucrSaveTable.SetIsComboBox()
- ucrSaveTable.SetAssignToIfUncheckedValue("table")
+ ucrSaveTable.SetAssignToIfUncheckedValue("last_table")
+
+ ucrChkExport.SetText("Export Table")
+ ucrChkExport.Checked = True ' Forces the controls to be hidden
+ 'cboFileType.Items.AddRange({"HTML (*.html)", "PDF (*.pdf)", "PNG (*.png)", "LaTeX (*.tex)", "RTF (*.rtf)", "Word (*.docx)"})
+ cboFileType.Items.AddRange({"HTML (*.html)", "LaTeX (*.tex)", "RTF (*.rtf)"})
End Sub
Private Sub SetDefaults()
- clsRFunctionAsHTML = New RFunction
- clsRFunctionAsRTF = New RFunction
- clsRFunctionAsWord = New RFunction
- clsRFunctionAsLaTex = New RFunction
- clsUseTableFunction = New RFunction
- clsPipeOperator = New ROperator
-
- clsTableTitleFunction = New RFunction
- clsTabFootnoteTitleFunction = New RFunction
- clsTableSourcenoteFunction = New RFunction
- clsDummyFunction = New RFunction
- clsThemesTabOptionsFunction = New RFunction
- clsFootnoteCellFunction = New RFunction
- clsSecondFootnoteCellBodyFunction = New RFunction
- clsFootnoteTitleLocationFunction = New RFunction
- clsFootnoteCellBodyFunction = New RFunction
- clsFootnoteSubtitleLocationFunction = New RFunction
- clsTabFootnoteSubtitleFunction = New RFunction
- clsSecondFootnoteCellFunction = New RFunction
- clsTabStyleCellTextFunction = New RFunction
- clsTabStyleFunction = New RFunction
- clsTabStylePxFunction = New RFunction
- clsTabStyleCellTitleFunction = New RFunction
- clsSummaryOperator = New ROperator
- clsJoiningPipeOperator = New ROperator
- clsgtExtraThemesFunction = New RFunction
-
- 'rdoAsHTML.Checked = True
- ucrTablesReceiver.SetMeAsReceiver()
+ clsGtTableROperator = New ROperator
+ clsBaseOperator = New ROperator
+ clsGetGtTableFunction = New RFunction
+ clsSaveGtRFunction = New RFunction
+
ucrTablesSelector.Reset()
+ ucrTablesReceiver.SetMeAsReceiver()
ucrSaveTable.Reset()
-
- clsDummyFunction.AddParameter("theme", "select", iPosition:=11)
-
- clsgtExtraThemesFunction.SetPackageName("gtExtras")
-
- clsJoiningPipeOperator.SetOperation("%>%")
- clsJoiningPipeOperator.AddParameter("object", clsRFunctionParameter:=clsUseTableFunction, iPosition:=0)
-
- clsSummaryOperator.SetOperation("+")
-
- clsTabStyleFunction.SetRCommand("tab_style")
- clsTabStyleFunction.SetPackageName("gt")
- clsTabStyleFunction.AddParameter("style", clsRFunctionParameter:=clsTabStyleCellTextFunction, iPosition:=0)
- clsTabStyleFunction.AddParameter("location", clsRFunctionParameter:=clsTabStyleCellTitleFunction, iPosition:=1)
-
- clsTabStyleCellTitleFunction.SetPackageName("gt")
- clsTabStyleCellTitleFunction.SetRCommand("cells_title")
- clsTabStyleCellTitleFunction.AddParameter("groups", Chr(34) & "title" & Chr(34), iPosition:=0)
-
- clsTabStyleCellTextFunction.SetPackageName("gt")
- clsTabStyleCellTextFunction.SetRCommand("cell_text")
- clsTabStyleCellTextFunction.AddParameter("size", clsRFunctionParameter:=clsTabStylePxFunction, iPosition:=0)
-
- clsTabStylePxFunction.SetPackageName("gt")
- clsTabStylePxFunction.SetRCommand("px")
- clsTabStylePxFunction.AddParameter("size", "18", bIncludeArgumentName:=False, iPosition:=0)
-
- clsTableTitleFunction.SetPackageName("gt")
- clsTableTitleFunction.SetRCommand("tab_header")
-
- clsTabFootnoteTitleFunction.SetPackageName("gt")
- clsTabFootnoteTitleFunction.SetRCommand("tab_footnote")
-
- clsTabFootnoteSubtitleFunction.SetPackageName("gt")
- clsTabFootnoteSubtitleFunction.SetRCommand("tab_footnote")
-
- clsFootnoteCellFunction.SetPackageName("gt")
- clsFootnoteCellFunction.SetRCommand("tab_footnote")
-
- clsSecondFootnoteCellFunction.SetPackageName("gt")
- clsSecondFootnoteCellFunction.SetRCommand("tab_footnote")
-
- clsFootnoteTitleLocationFunction.SetPackageName("gt")
- clsFootnoteTitleLocationFunction.SetRCommand("cells_title")
-
- clsFootnoteSubtitleLocationFunction.SetPackageName("gt")
- clsFootnoteSubtitleLocationFunction.SetRCommand("cells_title")
-
- clsTableSourcenoteFunction.SetPackageName("gt")
- clsTableSourcenoteFunction.SetRCommand("tab_source_note")
-
- clsFootnoteCellBodyFunction.SetPackageName("gt")
- clsFootnoteCellBodyFunction.SetRCommand("cells_body")
-
- clsSecondFootnoteCellBodyFunction.SetPackageName("gt")
- clsSecondFootnoteCellBodyFunction.SetRCommand("cells_body")
-
- clsThemesTabOptionsFunction.SetPackageName("gt")
- clsThemesTabOptionsFunction.SetRCommand("tab_options")
-
- clsRFunctionAsHTML.SetPackageName("gt")
- clsRFunctionAsHTML.SetRCommand("as_raw_html")
-
- clsRFunctionAsRTF.SetPackageName("gt")
- clsRFunctionAsRTF.SetRCommand("as_rtf")
-
- clsRFunctionAsWord.SetPackageName("gt")
- clsRFunctionAsWord.SetRCommand("as_word")
-
- clsRFunctionAsLaTex.SetPackageName("gt")
- clsRFunctionAsLaTex.SetRCommand("as_word")
-
- clsUseTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data")
-
- clsPipeOperator.SetOperation("%>%")
-
- ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator)
+ ucrChkExport.Checked = False
+ cboFileType.SelectedIndex = 0
+ ucrFilePath.ResetPathControl()
+
+ clsGetGtTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data")
+
+ clsGtTableROperator.SetOperation("%>%")
+ clsGtTableROperator.bBrackets = False
+ clsGtTableROperator.AddParameter(strParameterName:="gt_tbl", clsRFunctionParameter:=clsGetGtTableFunction, iPosition:=0, bIncludeArgumentName:=False)
+
+ ' Set base operator
+ clsBaseOperator.SetOperation("%>%")
+ clsBaseOperator.bBrackets = False
+ clsBaseOperator.AddParameter(strParameterName:="gt_tbl_operator", clsROperatorParameter:=clsGtTableROperator, iPosition:=0, bIncludeArgumentName:=False)
+ clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table,
+ strRObjectFormatToAssignTo:=RObjectFormat.Html,
+ strRDataFrameNameToAddObjectTo:=ucrTablesSelector.strCurrentDataFrame,
+ strObjectName:="last_table")
+
+ ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator)
+
+ ' For export operations which is an after code
+ clsSaveGtRFunction.SetPackageName("gt")
+ clsSaveGtRFunction.SetRCommand("gtsave")
+ clsSaveGtRFunction.AddParameter(strParameterName:="data", clsROperatorParameter:=clsGtTableROperator, iPosition:=0)
End Sub
Private Sub SetRCodeForControls(bReset As Boolean)
- ucrTablesSelector.SetRCode(clsUseTableFunction, bReset)
- ucrTablesReceiver.SetRCode(clsUseTableFunction, bReset)
- ucrSaveTable.SetRCode(clsJoiningPipeOperator, bReset)
+ ucrTablesSelector.SetRCode(clsGetGtTableFunction, bReset)
+ ucrTablesReceiver.SetRCode(clsGetGtTableFunction, bReset)
+
+ ucrSaveTable.SetRCode(clsBaseOperator, bReset)
End Sub
Private Sub TestOKEnabled()
+ ucrBase.OKEnabled(False)
+
If Not ucrTablesReceiver.IsEmpty Then
- ucrBase.OKEnabled(True)
- Else
- ucrBase.OKEnabled(False)
+ If ucrSaveTable.IsComplete Then
+ ucrBase.OKEnabled(True)
+ End If
+
+ If ucrChkExport.Checked AndAlso Not ucrFilePath.IsEmpty Then
+ ucrBase.OKEnabled(True)
+ End If
End If
End Sub
@@ -209,30 +124,59 @@ Public Class dlgUseTable
TestOKEnabled()
End Sub
- Private Sub cmdFormatOptions_Click(sender As Object, e As EventArgs) Handles cmdFormatOptions.Click
- sdgFormatSummaryTables.SetRCode(clsNewTableTitleFunction:=clsTableTitleFunction, clsNewTabFootnoteTitleFunction:=clsTabFootnoteTitleFunction, clsNewTableSourcenoteFunction:=clsTableSourcenoteFunction, clsNewDummyFunction:=clsDummyFunction,
- clsNewFootnoteCellFunction:=clsFootnoteCellFunction, clsNewSecondFootnoteCellBodyFunction:=clsSecondFootnoteCellBodyFunction,
- clsNewPipeOperator:=clsPipeOperator, clsNewFootnoteTitleLocationFunction:=clsFootnoteTitleLocationFunction, clsNewFootnoteCellBodyFunction:=clsFootnoteCellBodyFunction,
- clsNewFootnoteSubtitleLocationFunction:=clsFootnoteSubtitleLocationFunction, clsNewTabFootnoteSubtitleFunction:=clsTabFootnoteSubtitleFunction, clsNewJoiningOperator:=clsJoiningPipeOperator,
- clsNewMutableOPerator:=clsSummaryOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction,
- clsNewTabStyleCellTextFunction:=clsTabStyleCellTextFunction, clsNewTabStyleFunction:=clsTabStyleFunction, clsNewTabStylePxFunction:=clsTabStylePxFunction,
- clsNewgtExtraThemesFunction:=clsgtExtraThemesFunction, clsNewThemesTabOptionFunction:=clsThemesTabOptionsFunction, bReset:=bReset)
- sdgFormatSummaryTables.ShowDialog()
+ Private Sub btnTableOptions_Click(sender As Object, e As EventArgs) Handles btnTableOptions.Click
+ sdgTableOptions.Setup(ucrTablesSelector.strCurrentDataFrame, clsGtTableROperator)
+ sdgTableOptions.ShowDialog(Me)
End Sub
Private Sub ucrCoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrTablesReceiver.ControlContentsChanged, ucrSaveTable.ControlContentsChanged
TestOKEnabled()
End Sub
- Private Sub ucrPnlExportOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlExportOptions.ControlValueChanged
- If rdoAsHTML.Checked Then
- clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsHTML)
- ElseIf rdoAsRTF.Checked Then
- clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsRTF)
- ElseIf rdoAsWord.Checked Then
- clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsWord)
+ Private Sub ucrChkExport_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrChkExport.ControlContentsChanged
+ If ucrChkExport.Checked Then
+ lblFileType.Visible = True
+ cboFileType.Visible = True
+ ucrFilePath.Visible = True
+ ucrBase.clsRsyntax.AddToAfterCodes(clsSaveGtRFunction)
Else
- clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsLaTex)
+ lblFileType.Visible = False
+ cboFileType.Visible = False
+ ucrFilePath.Visible = False
+ ucrBase.clsRsyntax.GetAfterCodes().Clear()
+ End If
+ TestOKEnabled()
+ End Sub
+
+ Private Sub cboFileType_SelectedValueChanged(sender As Object, e As EventArgs) Handles cboFileType.SelectedValueChanged
+ ucrFilePath.Clear()
+ ucrFilePath.FilePathDialogFilter = GetFilePathDialogFilterText(cboFileType.SelectedItem)
+ End Sub
+
+ Private Sub ucrFilePath_FilePathChanged() Handles ucrFilePath.FilePathChanged
+ If Not ucrFilePath.IsEmpty Then
+ Dim strFileName As String = Path.GetFileName(ucrFilePath.FilePath)
+ Dim strFilePath As String = Path.GetDirectoryName(ucrFilePath.FilePath).Replace("\", "/")
+
+ clsSaveGtRFunction.AddParameter("filename", Chr(34) & strFileName & Chr(34), iPosition:=1)
+ clsSaveGtRFunction.AddParameter("path", Chr(34) & strFilePath & Chr(34), iPosition:=2)
End If
+ TestOKEnabled()
End Sub
+
+ '''
+ ''' TODO. Later push this functionality to ucrFilePath control. It's also needed by dlgExportDataset
+ ''' Expected string format: "filetype (*.ext)"
+ '''
+ '''
+ '''
+ Private Function GetFilePathDialogFilterText(strText As String) As String
+ If String.IsNullOrEmpty(strText) Then
+ Return ""
+ End If
+
+ 'example of filter string format returned: Excel files|*.xlsx
+ Dim arrStr() As String = strText.Split({"(", ")"}, StringSplitOptions.RemoveEmptyEntries)
+ Return arrStr(0) & "|" & arrStr(1)
+ End Function
End Class
\ No newline at end of file
diff --git a/instat/dlgView.Designer.vb b/instat/dlgView.Designer.vb
index 08105f3c44f..0c941632055 100644
--- a/instat/dlgView.Designer.vb
+++ b/instat/dlgView.Designer.vb
@@ -41,31 +41,28 @@ Partial Class dlgView
Me.lblSelected = New System.Windows.Forms.Label()
Me.rdoDispSepOutputWindow = New System.Windows.Forms.RadioButton()
Me.rdoDispOutputWindow = New System.Windows.Forms.RadioButton()
- Me.rdoBottom = New System.Windows.Forms.RadioButton()
- Me.rdoTop = New System.Windows.Forms.RadioButton()
- Me.lblDisplayFrom = New System.Windows.Forms.Label()
- Me.lblNumberofRows = New System.Windows.Forms.Label()
Me.rdoHTMLOutputWindow = New System.Windows.Forms.RadioButton()
- Me.rdoViewAll = New System.Windows.Forms.RadioButton()
- Me.rdoViewSelectedColumnsRows = New System.Windows.Forms.RadioButton()
+ Me.cmdTableOptions = New System.Windows.Forms.Button()
+ Me.ucrChkDisplayFromTop = New instat.ucrCheck()
Me.ucrSaveData = New instat.ucrSave()
- Me.ucrPnlViewData = New instat.UcrPanel()
Me.ucrReceiverSortCol = New instat.ucrReceiverSingle()
Me.ucrChkSortColumn = New instat.ucrCheck()
Me.ucrNudNumberRows = New instat.ucrNud()
- Me.ucrPnlDisplayFrom = New instat.UcrPanel()
- Me.ucrChkSpecifyRows = New instat.ucrCheck()
Me.ucrPnlDisplayWindow = New instat.UcrPanel()
Me.ucrReceiverView = New instat.ucrReceiverMultiple()
Me.ucrSelectorForView = New instat.ucrSelectorByDataFrameAddRemove()
Me.ucrBase = New instat.ucrButtons()
+ Me.ucrViewChkPreview = New instat.ucrCheck()
+ Me.ucrViewNudPreview = New instat.ucrNud()
+ Me.lblNumberofRows = New System.Windows.Forms.Label()
+ Me.ucrChkRowNumbers = New instat.ucrCheck()
Me.SuspendLayout()
'
'lblSelected
'
Me.lblSelected.AutoSize = True
Me.lblSelected.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblSelected.Location = New System.Drawing.Point(248, 80)
+ Me.lblSelected.Location = New System.Drawing.Point(248, 41)
Me.lblSelected.Name = "lblSelected"
Me.lblSelected.Size = New System.Drawing.Size(97, 13)
Me.lblSelected.TabIndex = 4
@@ -75,7 +72,7 @@ Partial Class dlgView
'rdoDispSepOutputWindow
'
Me.rdoDispSepOutputWindow.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoDispSepOutputWindow.Location = New System.Drawing.Point(10, 284)
+ Me.rdoDispSepOutputWindow.Location = New System.Drawing.Point(10, 245)
Me.rdoDispSepOutputWindow.Name = "rdoDispSepOutputWindow"
Me.rdoDispSepOutputWindow.Size = New System.Drawing.Size(210, 17)
Me.rdoDispSepOutputWindow.TabIndex = 6
@@ -86,7 +83,7 @@ Partial Class dlgView
'rdoDispOutputWindow
'
Me.rdoDispOutputWindow.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoDispOutputWindow.Location = New System.Drawing.Point(10, 261)
+ Me.rdoDispOutputWindow.Location = New System.Drawing.Point(10, 222)
Me.rdoDispOutputWindow.Name = "rdoDispOutputWindow"
Me.rdoDispOutputWindow.Size = New System.Drawing.Size(210, 17)
Me.rdoDispOutputWindow.TabIndex = 7
@@ -94,56 +91,10 @@ Partial Class dlgView
Me.rdoDispOutputWindow.Text = "Display in Output Window"
Me.rdoDispOutputWindow.UseVisualStyleBackColor = True
'
- 'rdoBottom
- '
- Me.rdoBottom.AutoSize = True
- Me.rdoBottom.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoBottom.Location = New System.Drawing.Point(325, 301)
- Me.rdoBottom.Name = "rdoBottom"
- Me.rdoBottom.Size = New System.Drawing.Size(58, 17)
- Me.rdoBottom.TabIndex = 16
- Me.rdoBottom.TabStop = True
- Me.rdoBottom.Text = "Bottom"
- Me.rdoBottom.UseVisualStyleBackColor = True
- '
- 'rdoTop
- '
- Me.rdoTop.AutoSize = True
- Me.rdoTop.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoTop.Location = New System.Drawing.Point(325, 278)
- Me.rdoTop.Name = "rdoTop"
- Me.rdoTop.Size = New System.Drawing.Size(44, 17)
- Me.rdoTop.TabIndex = 15
- Me.rdoTop.TabStop = True
- Me.rdoTop.Text = "Top"
- Me.rdoTop.UseVisualStyleBackColor = True
- '
- 'lblDisplayFrom
- '
- Me.lblDisplayFrom.AutoSize = True
- Me.lblDisplayFrom.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblDisplayFrom.Location = New System.Drawing.Point(248, 279)
- Me.lblDisplayFrom.Name = "lblDisplayFrom"
- Me.lblDisplayFrom.Size = New System.Drawing.Size(70, 13)
- Me.lblDisplayFrom.TabIndex = 14
- Me.lblDisplayFrom.Tag = ""
- Me.lblDisplayFrom.Text = "Display From:"
- '
- 'lblNumberofRows
- '
- Me.lblNumberofRows.AutoSize = True
- Me.lblNumberofRows.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblNumberofRows.Location = New System.Drawing.Point(248, 258)
- Me.lblNumberofRows.Name = "lblNumberofRows"
- Me.lblNumberofRows.Size = New System.Drawing.Size(89, 13)
- Me.lblNumberofRows.TabIndex = 10
- Me.lblNumberofRows.Tag = "Number_of_rows"
- Me.lblNumberofRows.Text = "Number of Rows:"
- '
'rdoHTMLOutputWindow
'
Me.rdoHTMLOutputWindow.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoHTMLOutputWindow.Location = New System.Drawing.Point(10, 238)
+ Me.rdoHTMLOutputWindow.Location = New System.Drawing.Point(10, 199)
Me.rdoHTMLOutputWindow.Name = "rdoHTMLOutputWindow"
Me.rdoHTMLOutputWindow.Size = New System.Drawing.Size(210, 17)
Me.rdoHTMLOutputWindow.TabIndex = 8
@@ -151,60 +102,38 @@ Partial Class dlgView
Me.rdoHTMLOutputWindow.Text = "Display HTML in Output Window"
Me.rdoHTMLOutputWindow.UseVisualStyleBackColor = True
'
- 'rdoViewAll
- '
- Me.rdoViewAll.Appearance = System.Windows.Forms.Appearance.Button
- Me.rdoViewAll.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption
- Me.rdoViewAll.FlatAppearance.BorderSize = 2
- Me.rdoViewAll.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
- Me.rdoViewAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.rdoViewAll.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoViewAll.Location = New System.Drawing.Point(67, 6)
- Me.rdoViewAll.Name = "rdoViewAll"
- Me.rdoViewAll.Size = New System.Drawing.Size(140, 34)
- Me.rdoViewAll.TabIndex = 1
- Me.rdoViewAll.Text = "All Columns"
- Me.rdoViewAll.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
- Me.rdoViewAll.UseVisualStyleBackColor = True
- '
- 'rdoViewSelectedColumnsRows
- '
- Me.rdoViewSelectedColumnsRows.Appearance = System.Windows.Forms.Appearance.Button
- Me.rdoViewSelectedColumnsRows.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption
- Me.rdoViewSelectedColumnsRows.FlatAppearance.BorderSize = 2
- Me.rdoViewSelectedColumnsRows.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
- Me.rdoViewSelectedColumnsRows.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.rdoViewSelectedColumnsRows.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoViewSelectedColumnsRows.Location = New System.Drawing.Point(207, 6)
- Me.rdoViewSelectedColumnsRows.Name = "rdoViewSelectedColumnsRows"
- Me.rdoViewSelectedColumnsRows.Size = New System.Drawing.Size(143, 34)
- Me.rdoViewSelectedColumnsRows.TabIndex = 2
- Me.rdoViewSelectedColumnsRows.Text = "Choose Columns"
- Me.rdoViewSelectedColumnsRows.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
- Me.rdoViewSelectedColumnsRows.UseVisualStyleBackColor = True
+ 'cmdTableOptions
+ '
+ Me.cmdTableOptions.Location = New System.Drawing.Point(248, 199)
+ Me.cmdTableOptions.Name = "cmdTableOptions"
+ Me.cmdTableOptions.Size = New System.Drawing.Size(141, 23)
+ Me.cmdTableOptions.TabIndex = 26
+ Me.cmdTableOptions.Text = "Table Options"
+ Me.cmdTableOptions.UseVisualStyleBackColor = True
+ '
+ 'ucrChkDisplayFromTop
+ '
+ Me.ucrChkDisplayFromTop.AutoSize = True
+ Me.ucrChkDisplayFromTop.Checked = False
+ Me.ucrChkDisplayFromTop.Location = New System.Drawing.Point(248, 222)
+ Me.ucrChkDisplayFromTop.Name = "ucrChkDisplayFromTop"
+ Me.ucrChkDisplayFromTop.Size = New System.Drawing.Size(130, 23)
+ Me.ucrChkDisplayFromTop.TabIndex = 20
'
'ucrSaveData
'
Me.ucrSaveData.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrSaveData.Location = New System.Drawing.Point(10, 309)
+ Me.ucrSaveData.Location = New System.Drawing.Point(10, 270)
Me.ucrSaveData.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.ucrSaveData.Name = "ucrSaveData"
Me.ucrSaveData.Size = New System.Drawing.Size(308, 27)
Me.ucrSaveData.TabIndex = 18
'
- 'ucrPnlViewData
- '
- Me.ucrPnlViewData.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrPnlViewData.Location = New System.Drawing.Point(56, 5)
- Me.ucrPnlViewData.Name = "ucrPnlViewData"
- Me.ucrPnlViewData.Size = New System.Drawing.Size(298, 35)
- Me.ucrPnlViewData.TabIndex = 0
- '
'ucrReceiverSortCol
'
Me.ucrReceiverSortCol.AutoSize = True
Me.ucrReceiverSortCol.frmParent = Me
- Me.ucrReceiverSortCol.Location = New System.Drawing.Point(274, 256)
+ Me.ucrReceiverSortCol.Location = New System.Drawing.Point(274, 217)
Me.ucrReceiverSortCol.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverSortCol.Name = "ucrReceiverSortCol"
Me.ucrReceiverSortCol.Selector = Nothing
@@ -217,7 +146,7 @@ Partial Class dlgView
'
Me.ucrChkSortColumn.AutoSize = True
Me.ucrChkSortColumn.Checked = False
- Me.ucrChkSortColumn.Location = New System.Drawing.Point(248, 235)
+ Me.ucrChkSortColumn.Location = New System.Drawing.Point(248, 203)
Me.ucrChkSortColumn.Name = "ucrChkSortColumn"
Me.ucrChkSortColumn.Size = New System.Drawing.Size(100, 23)
Me.ucrChkSortColumn.TabIndex = 9
@@ -227,35 +156,18 @@ Partial Class dlgView
Me.ucrNudNumberRows.AutoSize = True
Me.ucrNudNumberRows.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
Me.ucrNudNumberRows.Increment = New Decimal(New Integer() {1, 0, 0, 0})
- Me.ucrNudNumberRows.Location = New System.Drawing.Point(343, 256)
+ Me.ucrNudNumberRows.Location = New System.Drawing.Point(343, 167)
Me.ucrNudNumberRows.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
- Me.ucrNudNumberRows.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudNumberRows.Minimum = New Decimal(New Integer() {100, 0, 0, -2147483648})
Me.ucrNudNumberRows.Name = "ucrNudNumberRows"
Me.ucrNudNumberRows.Size = New System.Drawing.Size(50, 20)
Me.ucrNudNumberRows.TabIndex = 13
- Me.ucrNudNumberRows.Value = New Decimal(New Integer() {0, 0, 0, 0})
- '
- 'ucrPnlDisplayFrom
- '
- Me.ucrPnlDisplayFrom.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrPnlDisplayFrom.Location = New System.Drawing.Point(325, 278)
- Me.ucrPnlDisplayFrom.Name = "ucrPnlDisplayFrom"
- Me.ucrPnlDisplayFrom.Size = New System.Drawing.Size(66, 40)
- Me.ucrPnlDisplayFrom.TabIndex = 14
- '
- 'ucrChkSpecifyRows
- '
- Me.ucrChkSpecifyRows.AutoSize = True
- Me.ucrChkSpecifyRows.Checked = False
- Me.ucrChkSpecifyRows.Location = New System.Drawing.Point(248, 235)
- Me.ucrChkSpecifyRows.Name = "ucrChkSpecifyRows"
- Me.ucrChkSpecifyRows.Size = New System.Drawing.Size(100, 23)
- Me.ucrChkSpecifyRows.TabIndex = 5
+ Me.ucrNudNumberRows.Value = New Decimal(New Integer() {6, 0, 0, 0})
'
'ucrPnlDisplayWindow
'
Me.ucrPnlDisplayWindow.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrPnlDisplayWindow.Location = New System.Drawing.Point(10, 235)
+ Me.ucrPnlDisplayWindow.Location = New System.Drawing.Point(10, 192)
Me.ucrPnlDisplayWindow.Name = "ucrPnlDisplayWindow"
Me.ucrPnlDisplayWindow.Size = New System.Drawing.Size(221, 83)
Me.ucrPnlDisplayWindow.TabIndex = 7
@@ -264,7 +176,7 @@ Partial Class dlgView
'
Me.ucrReceiverView.AutoSize = True
Me.ucrReceiverView.frmParent = Me
- Me.ucrReceiverView.Location = New System.Drawing.Point(248, 95)
+ Me.ucrReceiverView.Location = New System.Drawing.Point(248, 56)
Me.ucrReceiverView.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverView.Name = "ucrReceiverView"
Me.ucrReceiverView.Selector = Nothing
@@ -279,7 +191,7 @@ Partial Class dlgView
Me.ucrSelectorForView.bDropUnusedFilterLevels = False
Me.ucrSelectorForView.bShowHiddenColumns = False
Me.ucrSelectorForView.bUseCurrentFilter = True
- Me.ucrSelectorForView.Location = New System.Drawing.Point(10, 45)
+ Me.ucrSelectorForView.Location = New System.Drawing.Point(10, 6)
Me.ucrSelectorForView.Margin = New System.Windows.Forms.Padding(0)
Me.ucrSelectorForView.Name = "ucrSelectorForView"
Me.ucrSelectorForView.Size = New System.Drawing.Size(213, 183)
@@ -289,31 +201,69 @@ Partial Class dlgView
'
Me.ucrBase.AutoSize = True
Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrBase.Location = New System.Drawing.Point(10, 343)
+ Me.ucrBase.Location = New System.Drawing.Point(10, 304)
Me.ucrBase.Name = "ucrBase"
Me.ucrBase.Size = New System.Drawing.Size(408, 52)
Me.ucrBase.TabIndex = 17
'
+ 'ucrViewChkPreview
+ '
+ Me.ucrViewChkPreview.AutoSize = True
+ Me.ucrViewChkPreview.Checked = False
+ Me.ucrViewChkPreview.Location = New System.Drawing.Point(248, 167)
+ Me.ucrViewChkPreview.Margin = New System.Windows.Forms.Padding(6)
+ Me.ucrViewChkPreview.Name = "ucrViewChkPreview"
+ Me.ucrViewChkPreview.Size = New System.Drawing.Size(89, 23)
+ Me.ucrViewChkPreview.TabIndex = 32
+ '
+ 'ucrViewNudPreview
+ '
+ Me.ucrViewNudPreview.AutoSize = True
+ Me.ucrViewNudPreview.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrViewNudPreview.Increment = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.ucrViewNudPreview.Location = New System.Drawing.Point(343, 167)
+ Me.ucrViewNudPreview.Margin = New System.Windows.Forms.Padding(6)
+ Me.ucrViewNudPreview.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
+ Me.ucrViewNudPreview.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.ucrViewNudPreview.Name = "ucrViewNudPreview"
+ Me.ucrViewNudPreview.Size = New System.Drawing.Size(50, 20)
+ Me.ucrViewNudPreview.TabIndex = 33
+ Me.ucrViewNudPreview.Value = New Decimal(New Integer() {1, 0, 0, 0})
+ '
+ 'lblNumberofRows
+ '
+ Me.lblNumberofRows.AutoSize = True
+ Me.lblNumberofRows.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblNumberofRows.Location = New System.Drawing.Point(248, 167)
+ Me.lblNumberofRows.Name = "lblNumberofRows"
+ Me.lblNumberofRows.Size = New System.Drawing.Size(89, 13)
+ Me.lblNumberofRows.TabIndex = 34
+ Me.lblNumberofRows.Tag = "Number_of_rows"
+ Me.lblNumberofRows.Text = "Number of Rows:"
+ '
+ 'ucrChkRowNumbers
+ '
+ Me.ucrChkRowNumbers.AutoSize = True
+ Me.ucrChkRowNumbers.Checked = True
+ Me.ucrChkRowNumbers.Location = New System.Drawing.Point(249, 165)
+ Me.ucrChkRowNumbers.Name = "ucrChkRowNumbers"
+ Me.ucrChkRowNumbers.Size = New System.Drawing.Size(130, 23)
+ Me.ucrChkRowNumbers.TabIndex = 35
+ Me.ucrChkRowNumbers.Visible = False
+ '
'dlgView
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi
Me.AutoSize = True
- Me.ClientSize = New System.Drawing.Size(416, 393)
+ Me.ClientSize = New System.Drawing.Size(416, 357)
+ Me.Controls.Add(Me.lblNumberofRows)
+ Me.Controls.Add(Me.cmdTableOptions)
+ Me.Controls.Add(Me.ucrChkDisplayFromTop)
Me.Controls.Add(Me.ucrSaveData)
- Me.Controls.Add(Me.rdoViewAll)
- Me.Controls.Add(Me.rdoViewSelectedColumnsRows)
- Me.Controls.Add(Me.ucrPnlViewData)
Me.Controls.Add(Me.ucrReceiverSortCol)
Me.Controls.Add(Me.ucrChkSortColumn)
Me.Controls.Add(Me.rdoHTMLOutputWindow)
- Me.Controls.Add(Me.ucrNudNumberRows)
- Me.Controls.Add(Me.rdoBottom)
- Me.Controls.Add(Me.rdoTop)
- Me.Controls.Add(Me.ucrPnlDisplayFrom)
- Me.Controls.Add(Me.ucrChkSpecifyRows)
- Me.Controls.Add(Me.lblDisplayFrom)
- Me.Controls.Add(Me.lblNumberofRows)
Me.Controls.Add(Me.rdoDispOutputWindow)
Me.Controls.Add(Me.rdoDispSepOutputWindow)
Me.Controls.Add(Me.ucrPnlDisplayWindow)
@@ -321,6 +271,10 @@ Partial Class dlgView
Me.Controls.Add(Me.ucrReceiverView)
Me.Controls.Add(Me.ucrSelectorForView)
Me.Controls.Add(Me.ucrBase)
+ Me.Controls.Add(Me.ucrNudNumberRows)
+ Me.Controls.Add(Me.ucrViewChkPreview)
+ Me.Controls.Add(Me.ucrViewNudPreview)
+ Me.Controls.Add(Me.ucrChkRowNumbers)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.MaximizeBox = False
Me.MinimizeBox = False
@@ -340,17 +294,14 @@ Partial Class dlgView
Friend WithEvents rdoDispOutputWindow As RadioButton
Friend WithEvents ucrPnlDisplayWindow As UcrPanel
Friend WithEvents ucrNudNumberRows As ucrNud
- Friend WithEvents rdoBottom As RadioButton
- Friend WithEvents rdoTop As RadioButton
- Friend WithEvents ucrPnlDisplayFrom As UcrPanel
- Friend WithEvents ucrChkSpecifyRows As ucrCheck
- Friend WithEvents lblDisplayFrom As Label
- Friend WithEvents lblNumberofRows As Label
Friend WithEvents ucrChkSortColumn As ucrCheck
Friend WithEvents rdoHTMLOutputWindow As RadioButton
Friend WithEvents ucrReceiverSortCol As ucrReceiverSingle
- Friend WithEvents rdoViewAll As RadioButton
- Friend WithEvents rdoViewSelectedColumnsRows As RadioButton
- Friend WithEvents ucrPnlViewData As UcrPanel
Friend WithEvents ucrSaveData As ucrSave
+ Friend WithEvents ucrChkDisplayFromTop As ucrCheck
+ Friend WithEvents cmdTableOptions As Button
+ Friend WithEvents ucrViewNudPreview As ucrNud
+ Friend WithEvents ucrViewChkPreview As ucrCheck
+ Friend WithEvents lblNumberofRows As Label
+ Friend WithEvents ucrChkRowNumbers As ucrCheck
End Class
\ No newline at end of file
diff --git a/instat/dlgView.vb b/instat/dlgView.vb
index c326c69f397..2da68d9390f 100644
--- a/instat/dlgView.vb
+++ b/instat/dlgView.vb
@@ -14,12 +14,15 @@
' You should have received a copy of the GNU General Public License
' along with this program. If not, see .
+Imports System.Windows
Imports instat.Translations
Public Class dlgView
+ Private clsBaseOperator As New ROperator
+
Private bFirstLoad As Boolean = True
Private bReset As Boolean = True
- Private clsOutputWindowFunction, clsHTMLFunction, clsAsHtmlWidgetFunction, clsViewColumnsFunction, clsDummyFunction, clsGetObjectDataFunction, clsViewAllFunction As New RFunction
+ Private clsHeadRFunction, clsGtRFunction, clsOutputWindowFunction, clsViewColumnsFunction, clsDummyFunction, clsGetObjectDataFunction As New RFunction
Private bControlsUpdated As Boolean = False
Private Sub dlgView_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -41,7 +44,6 @@ Public Class dlgView
'Needed because window may pop up window which will disappear in a separate thread
ucrBase.clsRsyntax.bSeparateThread = False
- ucrReceiverView.SetParameter(New RParameter("x", 0))
ucrReceiverView.SetParameterIsRFunction()
ucrReceiverView.Selector = ucrSelectorForView
ucrReceiverView.bForceAsDataFrame = True
@@ -53,31 +55,35 @@ Public Class dlgView
ucrPnlDisplayWindow.AddParameterValuesCondition(rdoDispOutputWindow, "checked", "window")
ucrPnlDisplayWindow.AddParameterValuesCondition(rdoDispSepOutputWindow, "checked", "viewer")
- ucrPnlDisplayWindow.AddToLinkedControls(ucrChkSpecifyRows, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True)
+ ucrPnlDisplayWindow.AddToLinkedControls(ucrChkDisplayFromTop, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True)
+ ucrPnlDisplayWindow.AddToLinkedControls(ucrChkRowNumbers, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True)
+ ucrPnlDisplayWindow.AddToLinkedControls(ucrViewChkPreview, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True)
+
+ ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6)
+
- ucrPnlDisplayFrom.AddRadioButton(rdoBottom)
- ucrPnlDisplayFrom.AddRadioButton(rdoTop)
- ucrPnlDisplayFrom.SetLinkedDisplayControl(lblDisplayFrom)
- ucrPnlDisplayFrom.AddFunctionNamesCondition(rdoTop, "head")
- ucrPnlDisplayFrom.AddFunctionNamesCondition(rdoBottom, "tail")
+ ucrNudNumberRows.Visible = rdoDispOutputWindow.Checked
+ ucrReceiverView.SetParameter(New RParameter("x", 1, bNewIncludeArgumentName:=False))
+
+ ucrNudNumberRows.SetParameter(New RParameter("n", 1))
+ 'ucrNudNumberRows.Minimum = 1
+ ucrNudNumberRows.SetRDefault(6)
+ ucrNudNumberRows.SetLinkedDisplayControl(lblNumberofRows)
- ' This linking only applies if rdoDispOutputWindow is checked
- ucrChkSpecifyRows.SetText("Specify Rows")
- ucrChkSpecifyRows.AddToLinkedControls(ucrPnlDisplayFrom, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoTop)
- ucrChkSpecifyRows.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6)
- ucrChkSpecifyRows.AddFunctionNamesCondition(True, {"head", "tail"})
- ucrChkSpecifyRows.AddFunctionNamesCondition(False, {frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data"})
- ' ucrChkSpecifyRows.bAllowNonConditionValues = True
+ ucrChkDisplayFromTop.SetText("Display From Top")
+ ucrChkDisplayFromTop.AddFunctionNamesCondition(True, {"head", "tail"})
- ucrPnlViewData.AddRadioButton(rdoViewAll)
- ucrPnlViewData.AddRadioButton(rdoViewSelectedColumnsRows)
+ ucrViewChkPreview.SetText("Rows")
+ ucrViewChkPreview.AddParameterPresentCondition(True, "head", bNewIsPositive:=True)
+ ucrViewChkPreview.AddParameterPresentCondition(False, "head", bNewIsPositive:=False)
+ ucrViewChkPreview.AddToLinkedControls(ucrViewNudPreview, {True}, bNewLinkedHideIfParameterMissing:=True)
- ucrPnlViewData.AddParameterValueFunctionNamesCondition(rdoViewAll, "x", frmMain.clsRLink.strInstatDataObject & "$get_data_frame")
- ucrPnlViewData.AddParameterValueFunctionNamesCondition(rdoViewSelectedColumnsRows, "x", frmMain.clsRLink.strInstatDataObject & "$get_data_frame", bNewIsPositive:=False)
+ ucrViewNudPreview.SetParameter(New RParameter("x", 0, bNewIncludeArgumentName:=False))
+ ucrViewNudPreview.Minimum = 6
+ ucrViewNudPreview.Maximum = Decimal.MaxValue
+ ucrViewNudPreview.SetRDefault(6)
- ucrPnlViewData.AddToLinkedControls(ucrReceiverView, {rdoViewSelectedColumnsRows}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True)
ucrReceiverView.SetLinkedDisplayControl(lblSelected)
- ucrPnlViewData.AddToLinkedControls(ucrPnlDisplayWindow, {rdoViewSelectedColumnsRows}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True)
ucrChkSortColumn.Visible = False
'ucrPnlDisplayWindow.AddToLinkedControls(ucrChkSortColumn, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True)
@@ -94,13 +100,8 @@ Public Class dlgView
'The sort column checkbox and receiver set to be invisible since the method for allowing variables in receiver1 to be strictly the same variables in receiver2 is yet to be implemented.
'ucrChkSortColumn.SetParameter(ucrReceiverSortCol.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True)
- ucrSelectorForView.SetParameter(New RParameter("title", 1))
ucrSelectorForView.SetParameterIsString()
- ucrNudNumberRows.SetParameter(New RParameter("n", 1))
- ucrNudNumberRows.Minimum = 1
- ucrNudNumberRows.SetLinkedDisplayControl(lblNumberofRows)
-
ucrSaveData.SetCheckBoxText("Store Data")
ucrSaveData.SetPrefix("last_table")
ucrSaveData.SetDataFrameSelector(ucrSelectorForView.ucrAvailableDataFrames)
@@ -108,18 +109,19 @@ Public Class dlgView
ucrSaveData.SetIsComboBox()
ucrSaveData.SetAssignToIfUncheckedValue("last_table")
-
+ ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False
End Sub
Private Sub SetDefaults()
+ clsBaseOperator = New ROperator
clsOutputWindowFunction = New RFunction
clsViewColumnsFunction = New RFunction
- clsHTMLFunction = New RFunction
- clsViewAllFunction = New RFunction
clsGetObjectDataFunction = New RFunction
+ clsHeadRFunction = New RFunction
+ clsGtRFunction = New RFunction
clsDummyFunction = New RFunction
- clsAsHtmlWidgetFunction = New RFunction
+ ucrViewChkPreview.Checked = True
ucrSelectorForView.Reset()
ucrReceiverView.SetMeAsReceiver()
@@ -137,30 +139,25 @@ Public Class dlgView
strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame,
strObjectName:="last_table")
+ clsBaseOperator.SetOperation("%>%")
+ clsBaseOperator.bBrackets = False
+ clsHeadRFunction.SetPackageName("utils")
+ clsHeadRFunction.SetRCommand("head")
+ clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=2, bIncludeArgumentName:=False)
+ clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=3, bIncludeArgumentName:=False)
- clsHTMLFunction.SetPackageName("formattable")
- clsHTMLFunction.SetRCommand("formattable")
- clsHTMLFunction.AddParameter("align", Chr(34) & "l" & Chr(34), iPosition:=1)
-
-
- clsAsHtmlWidgetFunction.SetPackageName("formattable")
- clsAsHtmlWidgetFunction.SetRCommand("as.htmlwidget")
- clsAsHtmlWidgetFunction.AddParameter("x", clsRFunctionParameter:=clsHTMLFunction, iPosition:=0)
- clsAsHtmlWidgetFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_table",
- strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table,
- strRObjectFormatToAssignTo:=RObjectFormat.Html,
- strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame,
- strObjectName:="last_table")
+ clsGtRFunction.SetPackageName("gt")
+ clsGtRFunction.SetRCommand("gt")
+ clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=4, bIncludeArgumentName:=False)
+ clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table,
+ strRObjectFormatToAssignTo:=RObjectFormat.Html,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame,
+ strObjectName:="last_table")
clsViewColumnsFunction.SetPackageName("utils")
clsViewColumnsFunction.SetRCommand("View")
-
- clsViewAllFunction.SetPackageName("utils")
- clsViewAllFunction.SetRCommand("View")
- clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
-
- ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction)
End Sub
Private Sub SetRCodeForControls(bReset As Boolean)
@@ -169,62 +166,39 @@ Public Class dlgView
'Correct maximum is then set in DataFrameLength()
ucrNudNumberRows.Maximum = Decimal.MaxValue
- 'ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("mydf"), iAdditionalPairNo:=1)
- ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("x"), iAdditionalPairNo:=1)
-
- ucrReceiverView.AddAdditionalCodeParameterPair(clsOutputWindowFunction, New RParameter("x"), iAdditionalPairNo:=2)
+ ucrReceiverView.AddAdditionalCodeParameterPair(clsOutputWindowFunction, New RParameter("x"), iAdditionalPairNo:=1)
ucrSelectorForView.AddAdditionalCodeParameterPair(clsViewColumnsFunction, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=1)
ucrSaveData.AddAdditionalRCode(clsOutputWindowFunction, iAdditionalPairNo:=1)
- ucrReceiverView.SetRCode(clsViewColumnsFunction, bReset)
- ucrPnlDisplayWindow.SetRCode(clsDummyFunction, bReset)
+ ucrReceiverView.AddAdditionalCodeParameterPair(clsViewColumnsFunction, New RParameter("x"), iAdditionalPairNo:=2)
- ucrPnlDisplayFrom.SetRCode(clsOutputWindowFunction, bReset)
+ ucrReceiverView.SetRCode(clsBaseOperator, bReset)
+ ucrPnlDisplayWindow.SetRCode(clsDummyFunction, bReset)
+ ucrViewChkPreview.SetRCode(clsBaseOperator, bReset)
+ ucrChkDisplayFromTop.SetRCode(clsOutputWindowFunction, bReset)
ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset)
- ucrChkSpecifyRows.SetRCode(clsOutputWindowFunction, bReset)
- ucrSelectorForView.SetRCode(clsViewAllFunction, bReset)
- ucrPnlViewData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset)
- ucrSaveData.SetRCode(clsAsHtmlWidgetFunction, bReset)
+ ucrViewNudPreview.SetRCode(clsHeadRFunction, bReset)
+ ucrSelectorForView.SetRCode(clsViewColumnsFunction, bReset)
+ ucrSaveData.SetRCode(clsBaseOperator, bReset)
DataFrameLength()
ChangeFunctionParameters()
bControlsUpdated = True
End Sub
- Private Sub SetSelectorParameterType()
- clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
- End Sub
-
Private Sub TestOKEnabled()
- If rdoViewSelectedColumnsRows.Checked Then
- If Not ucrReceiverView.IsEmpty Then
- If rdoDispSepOutputWindow.Checked Then
- ucrBase.OKEnabled(True)
- ElseIf rdoDispOutputWindow.Checked Then
- If ucrChkSpecifyRows.Checked Then
- If ucrNudNumberRows.GetText <> "" AndAlso (rdoTop.Checked OrElse rdoBottom.Checked) Then
- ucrBase.OKEnabled(True)
- Else
- ucrBase.OKEnabled(False)
- End If
- Else
- ucrBase.OKEnabled(True)
- End If
- ElseIf rdoHTMLOutputWindow.Checked AndAlso ((ucrChkSortColumn.Checked AndAlso Not ucrReceiverSortCol.IsEmpty) OrElse Not ucrChkSortColumn.Checked) Then
- ucrBase.OKEnabled(True)
- Else
- ucrBase.OKEnabled(False)
- End If
- Else
- ucrBase.OKEnabled(False)
- End If
- Else
- If ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" Then
+ If Not ucrReceiverView.IsEmpty Then
+ If rdoDispSepOutputWindow.Checked Then
+ ucrBase.OKEnabled(True)
+ ElseIf rdoDispOutputWindow.Checked Then
ucrBase.OKEnabled(True)
Else
- ucrBase.OKEnabled(False)
+ ucrBase.OKEnabled(True)
End If
+ Else
+ ucrBase.OKEnabled(False)
End If
+
End Sub
Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset
@@ -234,44 +208,43 @@ Public Class dlgView
End Sub
Private Sub ChangeFunctionParameters()
- If rdoViewSelectedColumnsRows.Checked Then
- If rdoDispOutputWindow.Checked Then
- clsDummyFunction.AddParameter("checked", "window", iPosition:=0)
-
- ucrSaveData.Visible = True
- ucrBase.clsRsyntax.iCallType = 2
- If ucrChkSpecifyRows.Checked Then
- ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction)
- ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text)
- ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction)
-
- If rdoTop.Checked Then
- clsOutputWindowFunction.SetRCommand("head")
- Else
- clsOutputWindowFunction.SetRCommand("tail")
- End If
+ If rdoDispOutputWindow.Checked Then
+ clsDummyFunction.AddParameter("checked", "window", iPosition:=0)
+ cmdTableOptions.Visible = False
+ ucrSaveData.Visible = True
+ ucrBase.clsRsyntax.iCallType = 2
+ ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction)
+ ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text)
+ If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then
+ ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction)
+
+ If ucrChkDisplayFromTop.Checked Then
+ clsOutputWindowFunction.SetRCommand("head")
Else
- ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True))
+ clsOutputWindowFunction.SetRCommand("tail")
End If
- ElseIf rdoDispSepOutputWindow.Checked Then
- clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0)
-
- ucrBase.clsRsyntax.iCallType = 0
- ucrBase.clsRsyntax.SetBaseRFunction(clsViewColumnsFunction)
- ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction)
- ucrSaveData.Visible = False
Else
- clsDummyFunction.AddParameter("checked", "html", iPosition:=0)
- ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction)
- ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html)
- ucrSaveData.Visible = True
- ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction)
-
+ ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True))
End If
- Else
- ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction)
+ ElseIf rdoDispSepOutputWindow.Checked Then
+ clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0)
ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction)
+ ucrBase.clsRsyntax.iCallType = 0
+ ucrBase.clsRsyntax.SetBaseRFunction(clsViewColumnsFunction)
ucrSaveData.Visible = False
+ cmdTableOptions.Visible = False
+ ucrSaveData.Visible = False
+ Else
+ ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html)
+ clsDummyFunction.AddParameter("checked", "html", iPosition:=0)
+ ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator)
+ cmdTableOptions.Visible = True
+ ucrSaveData.Visible = True
+ If ucrViewChkPreview.Checked Then
+ clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=2, bIncludeArgumentName:=False)
+ Else
+ clsBaseOperator.RemoveParameterByName("head")
+ End If
End If
End Sub
@@ -279,7 +252,8 @@ Public Class dlgView
ucrNudNumberRows.Maximum = ucrSelectorForView.ucrAvailableDataFrames.iDataFrameLength
End Sub
- Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDisplayFrom.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrChkSpecifyRows.ControlValueChanged, ucrReceiverView.ControlValueChanged
+
+ Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrViewChkPreview.ControlValueChanged, ucrViewNudPreview.ControlValueChanged, ucrChkDisplayFromTop.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrReceiverView.ControlValueChanged
If bControlsUpdated Then
ChangeFunctionParameters()
End If
@@ -297,23 +271,18 @@ Public Class dlgView
Private Sub ucrSelectorForView_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorForView.ControlValueChanged
DataFrameLength()
- SetSelectorParameterType()
End Sub
- Private Sub VariablesVisible()
- If rdoViewAll.Checked Then
- ucrSelectorForView.SetVariablesVisible(False)
- Else
- ucrSelectorForView.SetVariablesVisible(True)
- End If
+ Private Sub cmdTableOptions_Click(sender As Object, e As EventArgs) Handles cmdTableOptions.Click
+ sdgTableOptions.Setup(ucrSelectorForView.strCurrentDataFrame, clsBaseOperator)
+ sdgTableOptions.ShowDialog(Me)
End Sub
- Private Sub ucrPnlViewData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlViewData.ControlValueChanged
+ Private Sub ucrPnlViewData_ControlValueChanged(ucrChangedControl As ucrCore)
ChangeFunctionParameters()
- VariablesVisible()
End Sub
- Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverView.ControlContentsChanged, ucrPnlDisplayWindow.ControlContentsChanged, ucrChkSpecifyRows.ControlContentsChanged, ucrNudNumberRows.ControlContentsChanged, ucrPnlDisplayFrom.ControlContentsChanged, ucrChkSortColumn.ControlContentsChanged, ucrReceiverSortCol.ControlContentsChanged, ucrPnlViewData.ControlContentsChanged
+ Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrViewNudPreview.ControlContentsChanged, ucrViewChkPreview.ControlContentsChanged, ucrReceiverView.ControlContentsChanged, ucrPnlDisplayWindow.ControlContentsChanged, ucrNudNumberRows.ControlContentsChanged, ucrChkDisplayFromTop.ControlContentsChanged, ucrChkSortColumn.ControlContentsChanged, ucrReceiverSortCol.ControlContentsChanged
TestOKEnabled()
End Sub
@@ -326,7 +295,7 @@ Public Class dlgView
Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table")
clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1)
ElseIf rdoHTMLOutputWindow.Checked Then
- Dim strPrefix As String = clsAsHtmlWidgetFunction.GetRObjectToAssignTo
+ Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo
clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1)
End If
End Sub
@@ -334,5 +303,4 @@ Public Class dlgView
Private Sub ucrSelectorForView_DataFrameChanged() Handles ucrSelectorForView.DataFrameChanged
clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0)
End Sub
-
End Class
\ No newline at end of file
diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb
index daae5be1236..1ace18cf469 100644
--- a/instat/frmMain.Designer.vb
+++ b/instat/frmMain.Designer.vb
@@ -405,7 +405,9 @@ Partial Class frmMain
Me.toolStripSeparator = New System.Windows.Forms.ToolStripSeparator()
Me.mnuTbLast10Dialogs = New System.Windows.Forms.ToolStripSplitButton()
Me.separator2 = New System.Windows.Forms.ToolStripSeparator()
- Me.mnuTbDataView = New System.Windows.Forms.ToolStripButton()
+ Me.mnuTbDataView = New System.Windows.Forms.ToolStripSplitButton()
+ Me.mnuDataViewWindow = New System.Windows.Forms.ToolStripMenuItem()
+ Me.mnuRDataViewerWindow = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuTbOutput = New System.Windows.Forms.ToolStripSplitButton()
Me.mnuOutputWindow = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuShowRCommand = New System.Windows.Forms.ToolStripMenuItem()
@@ -426,7 +428,11 @@ Partial Class frmMain
Me.ToolStripSeparator76 = New System.Windows.Forms.ToolStripSeparator()
Me.mnuTbResetLayout = New System.Windows.Forms.ToolStripButton()
Me.separator3 = New System.Windows.Forms.ToolStripSeparator()
- Me.mnuTbHelp = New System.Windows.Forms.ToolStripButton()
+ Me.mnuTbHelp = New System.Windows.Forms.ToolStripSplitButton()
+ Me.mnuToolBarHelp = New System.Windows.Forms.ToolStripMenuItem()
+ Me.mnuDataWindowHelp = New System.Windows.Forms.ToolStripMenuItem()
+ Me.mnuOutputHelp = New System.Windows.Forms.ToolStripMenuItem()
+ Me.mnuLogScriptHelp = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator77 = New System.Windows.Forms.ToolStripSeparator()
Me.mnuTbLan = New System.Windows.Forms.ToolStripButton()
Me.separator1 = New System.Windows.Forms.ToolStripSeparator()
@@ -3032,14 +3038,14 @@ Partial Class frmMain
'
Me.mnuUndo.Name = "mnuUndo"
Me.mnuUndo.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Z), System.Windows.Forms.Keys)
- Me.mnuUndo.Size = New System.Drawing.Size(180, 22)
+ Me.mnuUndo.Size = New System.Drawing.Size(167, 22)
Me.mnuUndo.Text = "Undo"
'
'mnuEditFind
'
Me.mnuEditFind.Name = "mnuEditFind"
Me.mnuEditFind.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.F), System.Windows.Forms.Keys)
- Me.mnuEditFind.Size = New System.Drawing.Size(180, 22)
+ Me.mnuEditFind.Size = New System.Drawing.Size(167, 22)
Me.mnuEditFind.Tag = "Find"
Me.mnuEditFind.Text = "Find"
'
@@ -3047,7 +3053,7 @@ Partial Class frmMain
'
Me.mnuEditCopy.Name = "mnuEditCopy"
Me.mnuEditCopy.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.C), System.Windows.Forms.Keys)
- Me.mnuEditCopy.Size = New System.Drawing.Size(180, 22)
+ Me.mnuEditCopy.Size = New System.Drawing.Size(167, 22)
Me.mnuEditCopy.Tag = "Copy"
Me.mnuEditCopy.Text = "Copy"
'
@@ -3055,27 +3061,27 @@ Partial Class frmMain
'
Me.mnuEditPaste.Name = "mnuEditPaste"
Me.mnuEditPaste.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.V), System.Windows.Forms.Keys)
- Me.mnuEditPaste.Size = New System.Drawing.Size(180, 22)
+ Me.mnuEditPaste.Size = New System.Drawing.Size(167, 22)
Me.mnuEditPaste.Tag = "Paste"
Me.mnuEditPaste.Text = "Paste"
'
'mnuEditPasteNew
'
Me.mnuEditPasteNew.Name = "mnuEditPasteNew"
- Me.mnuEditPasteNew.Size = New System.Drawing.Size(180, 22)
+ Me.mnuEditPasteNew.Size = New System.Drawing.Size(167, 22)
Me.mnuEditPasteNew.Text = "Paste New..."
'
'mnuEditWordwrap
'
Me.mnuEditWordwrap.Name = "mnuEditWordwrap"
- Me.mnuEditWordwrap.Size = New System.Drawing.Size(180, 22)
+ Me.mnuEditWordwrap.Size = New System.Drawing.Size(167, 22)
Me.mnuEditWordwrap.Text = "Wordwrap..."
'
'mnuEditSelectAll
'
Me.mnuEditSelectAll.Name = "mnuEditSelectAll"
Me.mnuEditSelectAll.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.A), System.Windows.Forms.Keys)
- Me.mnuEditSelectAll.Size = New System.Drawing.Size(180, 22)
+ Me.mnuEditSelectAll.Size = New System.Drawing.Size(167, 22)
Me.mnuEditSelectAll.Tag = "Select_All"
Me.mnuEditSelectAll.Text = "Select All "
'
@@ -3195,15 +3201,31 @@ Partial Class frmMain
'
'mnuTbDataView
'
- Me.mnuTbDataView.CheckOnClick = True
Me.mnuTbDataView.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
+ Me.mnuTbDataView.DropDownButtonWidth = 18
+ Me.mnuTbDataView.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDataViewWindow, Me.mnuRDataViewerWindow})
Me.mnuTbDataView.Image = Global.instat.My.Resources.Resources.dataframe2
Me.mnuTbDataView.ImageTransparentColor = System.Drawing.Color.Magenta
Me.mnuTbDataView.Margin = New System.Windows.Forms.Padding(2, 1, 2, 2)
Me.mnuTbDataView.Name = "mnuTbDataView"
- Me.mnuTbDataView.Size = New System.Drawing.Size(34, 34)
+ Me.mnuTbDataView.Size = New System.Drawing.Size(53, 34)
Me.mnuTbDataView.ToolTipText = "Toggle Data view open and closed"
'
+ 'mnuDataViewWindow
+ '
+ Me.mnuDataViewWindow.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None
+ Me.mnuDataViewWindow.Name = "mnuDataViewWindow"
+ Me.mnuDataViewWindow.Size = New System.Drawing.Size(180, 22)
+ Me.mnuDataViewWindow.Text = "Data View"
+ '
+ 'mnuRDataViewerWindow
+ '
+ Me.mnuRDataViewerWindow.Enabled = False
+ Me.mnuRDataViewerWindow.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None
+ Me.mnuRDataViewerWindow.Name = "mnuRDataViewerWindow"
+ Me.mnuRDataViewerWindow.Size = New System.Drawing.Size(180, 22)
+ Me.mnuRDataViewerWindow.Text = "R-Data Viewer"
+ '
'mnuTbOutput
'
Me.mnuTbOutput.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
@@ -3359,12 +3381,40 @@ Partial Class frmMain
'mnuTbHelp
'
Me.mnuTbHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
+ Me.mnuTbHelp.DropDownButtonWidth = 18
+ Me.mnuTbHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuToolBarHelp, Me.mnuDataWindowHelp, Me.mnuOutputHelp, Me.mnuLogScriptHelp})
Me.mnuTbHelp.Image = Global.instat.My.Resources.Resources.help2
Me.mnuTbHelp.ImageTransparentColor = System.Drawing.Color.Magenta
- Me.mnuTbHelp.Margin = New System.Windows.Forms.Padding(2, 1, 2, 2)
Me.mnuTbHelp.Name = "mnuTbHelp"
- Me.mnuTbHelp.Size = New System.Drawing.Size(34, 34)
- Me.mnuTbHelp.Text = "He&lp"
+ Me.mnuTbHelp.Size = New System.Drawing.Size(53, 34)
+ Me.mnuTbHelp.Text = "LogScript"
+ Me.mnuTbHelp.ToolTipText = "Help Window"
+ '
+ 'mnuToolBarHelp
+ '
+ Me.mnuToolBarHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None
+ Me.mnuToolBarHelp.Name = "mnuToolBarHelp"
+ Me.mnuToolBarHelp.Size = New System.Drawing.Size(173, 22)
+ Me.mnuToolBarHelp.Text = "Toolbar Help"
+ '
+ 'mnuDataWindowHelp
+ '
+ Me.mnuDataWindowHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None
+ Me.mnuDataWindowHelp.Name = "mnuDataWindowHelp"
+ Me.mnuDataWindowHelp.Size = New System.Drawing.Size(173, 22)
+ Me.mnuDataWindowHelp.Text = "Data Window Help"
+ '
+ 'mnuOutputHelp
+ '
+ Me.mnuOutputHelp.Name = "mnuOutputHelp"
+ Me.mnuOutputHelp.Size = New System.Drawing.Size(173, 22)
+ Me.mnuOutputHelp.Text = "Output Help"
+ '
+ 'mnuLogScriptHelp
+ '
+ Me.mnuLogScriptHelp.Name = "mnuLogScriptHelp"
+ Me.mnuLogScriptHelp.Size = New System.Drawing.Size(173, 22)
+ Me.mnuLogScriptHelp.Text = "Log Script Help"
'
'ToolStripSeparator77
'
@@ -5343,7 +5393,6 @@ Partial Class frmMain
Friend WithEvents toolStripSeparator As ToolStripSeparator
Friend WithEvents separator1 As ToolStripSeparator
Friend WithEvents separator2 As ToolStripSeparator
- Friend WithEvents mnuTbHelp As ToolStripButton
Private WithEvents mnuBar As MenuStrip
Friend WithEvents mnuFile As ToolStripMenuItem
Friend WithEvents mnuFileNewDataFrame As ToolStripMenuItem
@@ -5656,7 +5705,6 @@ Partial Class frmMain
Friend WithEvents mnuClimaticCMSAFPlotRegion As ToolStripMenuItem
Friend WithEvents mnuPrepareColumnDateInfillMissingDates As ToolStripMenuItem
Friend WithEvents mnuTbOpenFromLibrary As ToolStripButton
- Friend WithEvents mnuTbDataView As ToolStripButton
Friend WithEvents separator3 As ToolStripSeparator
Friend WithEvents mnuTbResetLayout As ToolStripButton
Friend WithEvents mnuTbOpen As ToolStripSplitButton
@@ -5981,4 +6029,12 @@ Partial Class frmMain
Friend WithEvents ToolStripSeparator15 As ToolStripSeparator
Friend WithEvents mnuClimaticCheckDataDistances As ToolStripMenuItem
Friend WithEvents mnuUndo As ToolStripMenuItem
+ Friend WithEvents mnuTbHelp As ToolStripSplitButton
+ Friend WithEvents mnuToolBarHelp As ToolStripMenuItem
+ Friend WithEvents mnuDataWindowHelp As ToolStripMenuItem
+ Friend WithEvents mnuOutputHelp As ToolStripMenuItem
+ Friend WithEvents mnuLogScriptHelp As ToolStripMenuItem
+ Friend WithEvents mnuTbDataView As ToolStripSplitButton
+ Friend WithEvents mnuDataViewWindow As ToolStripMenuItem
+ Friend WithEvents mnuRDataViewerWindow As ToolStripMenuItem
End Class
diff --git a/instat/frmMain.vb b/instat/frmMain.vb
index de20ca54564..d5c70d09531 100644
--- a/instat/frmMain.vb
+++ b/instat/frmMain.vb
@@ -303,7 +303,7 @@ Public Class frmMain
mnuDataFrameMetadat.Checked = False
mnuSwapDataLogScript.Checked = False
mnuSwapDataMetadata.Checked = False
- mnuTbDataView.Checked = True
+ mnuDataViewWindow.Checked = True
mnuOutputWindow.Checked = True
mnuLogScript.Checked = False
UpdateLayout()
@@ -364,7 +364,7 @@ Public Class frmMain
MsgBox(ex.Message)
End Try
- mnuTbDataView.Checked = mnuViewDataView.Checked
+ mnuDataViewWindow.Checked = mnuViewDataView.Checked
mnuOutputWindow.Checked = mnuViewOutput.Checked
mnuLogScript.Checked = mnuViewLogScript.Checked
End Sub
@@ -852,13 +852,25 @@ Public Class frmMain
End Sub
Private Sub mnuHelpHelp_Click(sender As Object, e As EventArgs)
- Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TableOfContents, "")
+ Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TopicId, "135")
End Sub
- Private Sub mnuTbHelp_Click(sender As Object, e As EventArgs) Handles mnuTbHelp.Click
+ Private Sub mnuTbHelp_Click(sender As Object, e As EventArgs) Handles mnuTbHelp.ButtonClick, mnuToolBarHelp.Click
mnuHelpHelp_Click(sender, e)
End Sub
+ Private Sub mnuDataWindowHelp_Click(sender As Object, e As EventArgs) Handles mnuDataWindowHelp.Click
+ Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TopicId, "134")
+ End Sub
+
+ Private Sub mnuOutputHelp_Click(sender As Object, e As EventArgs) Handles mnuOutputHelp.Click
+ Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TopicId, "540")
+ End Sub
+
+ Private Sub mnuLogScriptHelp_Click(sender As Object, e As EventArgs) Handles mnuLogScriptHelp.Click
+ Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TopicId, "542")
+ End Sub
+
Private Sub mnuPrepareFactorRecode_Click(sender As Object, e As EventArgs) Handles mnuPrepareColumnFactorRecodeFactor.Click
dlgRecodeFactor.ShowDialog()
End Sub
@@ -1150,7 +1162,7 @@ Public Class frmMain
strCurrentStatus = tstatus.Text
If clsRLink.bInstatObjectExists Then
- tstatus.Text = "Auto saving data..."
+ tstatus.Text = GetTranslation("Auto saving data...")
Cursor = Cursors.WaitCursor
If Not Directory.Exists(strAutoSaveDataFolderPath) Then
Directory.CreateDirectory(strAutoSaveDataFolderPath)
@@ -1168,11 +1180,11 @@ Public Class frmMain
clsSaveRDS.AddParameter("object", clsRLink.strInstatDataObject)
clsSaveRDS.AddParameter("file", Chr(34) & strCurrentAutoSaveDataFilePath.Replace("\", "/") & Chr(34))
clsRLink.RunInternalScript(clsSaveRDS.ToScript(), bSilent:=True, bShowWaitDialogOverride:=False)
+
tstatus.Text = strCurrentStatus
Cursor = Cursors.Default
bFirstBackupDone = True
End If
- autoTranslate(Me)
End Sub
Public Sub DeleteAutoSaveFiles()
@@ -1820,8 +1832,9 @@ Public Class frmMain
dlgInfill.ShowDialog()
End Sub
- Private Sub mnuDataView_Click(sender As Object, e As EventArgs) Handles mnuTbDataView.Click
+ Private Sub mnuDataView_Click(sender As Object, e As EventArgs) Handles mnuTbDataView.ButtonClick, mnuDataViewWindow.Click
mnuViewDataView.Checked = Not mnuViewDataView.Checked
+ mnuDataViewWindow.Checked = mnuViewDataView.Checked
UpdateLayout()
End Sub
diff --git a/instat/sdgSummaries.vb b/instat/sdgSummaries.vb
index 2398fc81117..f9dadb93332 100644
--- a/instat/sdgSummaries.vb
+++ b/instat/sdgSummaries.vb
@@ -45,13 +45,13 @@ Public Class sdgSummaries
ucrPnlPosition.AddToLinkedControls({ucrChkFirst, ucrSelectorOrderBy, ucrReceiverOrderBy, ucrChkOrderBy, ucrChkLast, ucrChknth, ucrChkSample}, {rdoUsePositions}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlPosition.AddToLinkedControls({ucrChkWhichmin, ucrChkWhereMax, ucrChkWhereMin, ucrReceiverInclude, ucrSelectorInclude, ucrChkWhichmax}, {rdoDisplay}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
- ucrChkNonMissing.SetParameter(New RParameter("summary_count_non_missing", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_non_missing" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34))
+ ucrChkNonMissing.SetParameter(New RParameter("summary_count", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34))
ucrChkNonMissing.SetText("N Non Missing")
- ucrChkNMissing.SetParameter(New RParameter("summary_count_missing", 2), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_missing" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34))
+ ucrChkNMissing.SetParameter(New RParameter("summary_count_miss", 2), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_miss" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34))
ucrChkNMissing.SetText("N Missing")
- ucrChkNTotal.SetParameter(New RParameter("summary_count", 3), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34))
+ ucrChkNTotal.SetParameter(New RParameter("summary_count_all", 3), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_all" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34))
ucrChkNTotal.SetText("N Total")
ucrChkMean.SetParameter(New RParameter("summary_mean", 4), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_mean" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34))
diff --git a/instat/static/ClimateObject/R/BackendComponents/summary_functions.R b/instat/static/ClimateObject/R/BackendComponents/summary_functions.R
index dda6d823766..892a6f0f6e1 100644
--- a/instat/static/ClimateObject/R/BackendComponents/summary_functions.R
+++ b/instat/static/ClimateObject/R/BackendComponents/summary_functions.R
@@ -1,7 +1,7 @@
# summary function labels
sum_label="summary_sum"
mode_label="summary_mode"
-count_label="summary_count"
+count_label="summary_count_all"
count_over_threshold_label="summary_count_over_threshold"
sd_label = "summary_sd"
median_label = "summary_median"
diff --git a/instat/static/InstatObject/R/Backend_Components/DisplayDaily.R b/instat/static/InstatObject/R/Backend_Components/DisplayDaily.R
index 58a1eb73504..7d35d107093 100644
--- a/instat/static/InstatObject/R/Backend_Components/DisplayDaily.R
+++ b/instat/static/InstatObject/R/Backend_Components/DisplayDaily.R
@@ -221,9 +221,9 @@ DisplayDaily <- function(Datain,Stations,Variables,option=1,Years,Misscode,Trace
outstats[st,(m+1)] <- gsub("\\s+","",outstats[st,(m+1)])
}
}
- # If all the data is NA, set the stats to NA (except summary_count_missing)
+ # If all the data is NA, set the stats to NA (except summary_count_miss)
if(length(dat[,loc])==length(which(is.na(dat[,loc]==TRUE)))){
- outstats[which(monstats != "summary_count_missing"),(m+1)] <- "NA"
+ outstats[which(monstats != "summary_count_miss"),(m+1)] <- "NA"
}
# If there's no data, set all the stats to NA
if(length(dat[,loc]) == 0) outstats[,(m+1)] <- "NA"
@@ -278,7 +278,7 @@ DisplayDaily <- function(Datain,Stations,Variables,option=1,Years,Misscode,Trace
out[dim(out)[1]+1,] <- "____"
out[dim(out)[1],1] <- "STATS"
# temp fix to shorten display name of summary function
- outstats[,1][outstats[,1] == "summary_count_missing"] <- "n_miss"
+ outstats[,1][outstats[,1] == "summary_count_miss"] <- "n_miss"
out <- rbind(out,outstats)
#----------------------------------------------------------#
diff --git a/instat/static/InstatObject/R/Backend_Components/calculations.R b/instat/static/InstatObject/R/Backend_Components/calculations.R
index 2f3191c2142..ebb95254ec6 100644
--- a/instat/static/InstatObject/R/Backend_Components/calculations.R
+++ b/instat/static/InstatObject/R/Backend_Components/calculations.R
@@ -494,7 +494,10 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list
# if it is a ordered factor...
if (any(stringr::str_detect("ordered", col_data_type))){
# put in here the ones that DO work for ordered factor
- if (any(grepl("summary_count_non_missing|summary_count_missing|summary_count|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){
+
+
+ if (any(grepl("summary_count|summary_count_miss|summary_n_distinct|summary_count_all|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){
+
curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>%
dplyr::summarise(!!calc$result_name := !!rlang::parse_expr(calc$function_exp))
} else {
@@ -505,7 +508,10 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list
# if it is a factor or character, do not work for anything except...
} else if (any(stringr::str_detect("factor | character", col_data_type))){
# put in here the ones that DO work for factor or character
- if (any(grepl("summary_count_non_missing|summary_count_missing|summary_count", formula_fn_exp))){
+
+
+ if (any(grepl("summary_count|summary_count_miss|summary_n_distinct|summary_count_all", formula_fn_exp))){
+
curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>%
dplyr::summarise(!!calc$result_name := !!rlang::parse_expr(calc$function_exp))
} else {
@@ -846,4 +852,4 @@ find_df_from_calc_from <- function(x, column) {
if(column %in% x[[i]]) return(names(x)[i])
}
return("")
-}
\ No newline at end of file
+}
diff --git a/instat/static/InstatObject/R/Backend_Components/summary_functions.R b/instat/static/InstatObject/R/Backend_Components/summary_functions.R
index 397a72b2614..06fcf509536 100644
--- a/instat/static/InstatObject/R/Backend_Components/summary_functions.R
+++ b/instat/static/InstatObject/R/Backend_Components/summary_functions.R
@@ -281,7 +281,7 @@ DataBook$set("public", "summary", function(data_name, columns_to_summarise, summ
calculated_from[[1]] <- list(data_name = data_name, columns = columns_to_summarise)
summaries <- unique(summaries)
summaries <- summaries[order(match(summaries, all_summaries))]
- summaries_count <- summaries[startsWith(summaries, "summary_count")]
+ summaries_count <- summaries[startsWith(summaries, "summary_count_all")]
summaries_other <- setdiff(summaries, summaries_count)
summaries <- c(summaries_count, summaries_other)
count_summaries_max <- length(summaries_count)
@@ -444,9 +444,9 @@ missing_values_check <- function(x) {
# summary function labels
sum_label <- "summary_sum"
mode_label <- "summary_mode"
-count_label <- "summary_count"
-count_missing_label <- "summary_count_missing"
-count_non_missing_label <- "summary_count_non_missing"
+count_label <- "summary_count_all"
+count_missing_label <- "summary_count_miss"
+count_non_missing_label <- "summary_count"
sd_label <- "summary_sd"
var_label <- "summary_var"
median_label <- "summary_median"
@@ -575,13 +575,13 @@ na_check <- function(x, na_type = c(), na_consecutive_n = NULL, na_max_n = NULL,
for (i in seq_along(na_type)) {
type <- na_type[i]
if (type %in% c("n","'n'")) {
- res[i] <- summary_count_missing(x) <= na_max_n
+ res[i] <- summary_count_miss(x) <= na_max_n
}
else if (type %in% c("prop","'prop'")) {
- res[i] <- (summary_count_missing(x) / summary_count(x)) <= na_max_prop / 100
+ res[i] <- (summary_count_miss(x) / summary_count(x)) <= na_max_prop / 100
}
else if (type %in% c("n_non_miss","'n_non_miss'")) {
- res[i] <- summary_count_non_missing(x) >= na_min_n
+ res[i] <- summary_count(x) >= na_min_n
}
else if (type %in% c("FUN","'FUN'")) {
res[i] <- na_FUN(x, ...)
@@ -719,16 +719,16 @@ summary_sum <- function (x, weights = NULL, na.rm = FALSE, na_type = "", ...) {
}
-summary_count <- function(x, ...) {
+summary_count_all <- function(x, ...) {
return(length(x))
}
-summary_count_missing <- function(x, ...) {
+summary_count_miss <- function(x, ...) {
return(sum(is.na(x)))
}
-summary_count_non_missing <- function(x, ...) {
+summary_count <- function(x, ...) {
return(sum(!is.na(x)))
}
@@ -1113,7 +1113,7 @@ summary_nth <- function(x, nth_value, order_by = NULL, ...) {
# n_distinct function
summary_n_distinct<- function(x, na.rm = FALSE, ...) {
- return(dplyr::n_distinct(x = x, na.rm = na.rm))
+ return(dplyr::n_distinct(x, na.rm = na.rm))
}
# sample function
diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R
index 14171b6a9fd..05d230eb34b 100644
--- a/instat/static/InstatObject/R/data_object_R6.R
+++ b/instat/static/InstatObject/R/data_object_R6.R
@@ -4458,8 +4458,8 @@ DataSheet$set("public", "patch_climate_element", function(date_col_name = "", va
}
if (length(col) == dim(curr_data)[[1]]) {
self$add_columns_to_data(col_name = column_name, col_data = col)
- gaps_remaining <- summary_count_missing(col)
- gaps_filled <- (summary_count_missing(curr_data[, var]) - gaps_remaining)
+ gaps_remaining <- summary_count_miss(col)
+ gaps_filled <- (summary_count_miss(curr_data[, var]) - gaps_remaining)
cat(gaps_filled, " gaps filled", gaps_remaining, " remaining.", "\n")
} else if (gaps != 0) {
cat(gaps, " rows for date gaps are missing, fill date gaps before proceeding.", "\n")