From ce874ac26f387c14b9e8709f17fedf18af012e44 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Thu, 24 Nov 2022 10:47:13 +0300 Subject: [PATCH 01/21] changes made --- instat/dlgDescribeTwoVariable.Designer.vb | 939 +++++++++------- instat/dlgDescribeTwoVariable.vb | 1174 +++++++++++++++------ 2 files changed, 1376 insertions(+), 737 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index d2a3d494067..845bf370f0d 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -38,259 +38,73 @@ Partial Class dlgDescribeTwoVariable 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.cmdSummaries = New System.Windows.Forms.Button() - Me.lblFirstVariable = New System.Windows.Forms.Label() - Me.lbSecondVariable = New System.Windows.Forms.Label() - Me.grpOptions = New System.Windows.Forms.GroupBox() - Me.cmdMissingOptions = New System.Windows.Forms.Button() - Me.ucrChkOmitMissing = New instat.ucrCheck() - Me.lblSummary = New System.Windows.Forms.Label() - Me.lblFirstType = New System.Windows.Forms.Label() - Me.lblBy = New System.Windows.Forms.Label() - Me.lblSecondType = New System.Windows.Forms.Label() - Me.lblSummaryName = New System.Windows.Forms.Label() - Me.grpSummaries = New System.Windows.Forms.GroupBox() - Me.rdoCustomize = New System.Windows.Forms.RadioButton() - Me.rdoSkim = New System.Windows.Forms.RadioButton() - Me.lbSecondOpt = New System.Windows.Forms.Label() - Me.lblSecondFactor = New System.Windows.Forms.Label() - Me.lblNumericVariable = New System.Windows.Forms.Label() - Me.lblMarginName = New System.Windows.Forms.Label() - Me.grpDisplay = New System.Windows.Forms.GroupBox() + Me.ucrNudColumnFactors = New instat.ucrNud() Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() Me.lblFactorsAsPercentage = New System.Windows.Forms.Label() Me.ucrChkPercentageProportion = New instat.ucrCheck() - Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() - Me.grpFrequency = New System.Windows.Forms.GroupBox() - Me.ucrNudColumnFactors = New instat.ucrNud() - Me.lblColumnFactors = New System.Windows.Forms.Label() Me.ucrNudSigFigs = New instat.ucrNud() Me.ucrInputMarginName = New instat.ucrInputTextBox() Me.lblSigFigs = New System.Windows.Forms.Label() Me.ucrChkDisplayMargins = New instat.ucrCheck() + Me.grpThreeVariablePercentages = New System.Windows.Forms.GroupBox() + Me.ucrReceiverThreeVariablePercentage = New instat.ucrReceiverSingle() + Me.lblThreeVariableFactorAsPercentages = New System.Windows.Forms.Label() + Me.ucrChkThreeVariablePercentageProportion = New instat.ucrCheck() + Me.ucrChkThreeVariableDisplayAsPercentage = New instat.ucrCheck() Me.rdoThreeVariable = New System.Windows.Forms.RadioButton() + Me.lblColumnFactors = New System.Windows.Forms.Label() + Me.cmdFormatTable = New System.Windows.Forms.Button() + Me.lblThreeVariableSecondFactor = New System.Windows.Forms.Label() + Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() Me.ucrBase = New instat.ucrButtons() - Me.ucrReceiverNumericVariable = New instat.ucrReceiverSingle() - Me.ucrReceiverSecondFactor = New instat.ucrReceiverSingle() - Me.ucrReceiverSecondOpt = New instat.ucrReceiverSingle() + Me.ucrReceiverThreeVariableThirdVariable = New instat.ucrReceiverSingle() + Me.ucrReceiverSecondSkimrGroupByFactor = New instat.ucrReceiverSingle() + Me.ucrReceiverSkimrGroupByFactor = New instat.ucrReceiverSingle() Me.ucrPnlDescribe = New instat.UcrPanel() - Me.ucrReceiverSecondVar = New instat.ucrReceiverSingle() - Me.ucrReceiverFirstVars = New instat.ucrReceiverMultiple() + Me.ucrReceiverSecondTwoVariableFactor = New instat.ucrReceiverSingle() Me.ucrSelectorDescribeTwoVar = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() + Me.cmdSummaries = New System.Windows.Forms.Button() + Me.grpOptions = New System.Windows.Forms.GroupBox() + Me.ucrChkOmitMissing = New instat.ucrCheck() + Me.lbSecondVariable = New System.Windows.Forms.Label() + Me.lblFirstVariable = New System.Windows.Forms.Label() + Me.grpFrequency = New System.Windows.Forms.GroupBox() + Me.lblMarginName = New System.Windows.Forms.Label() + Me.grpSummaries = New System.Windows.Forms.GroupBox() + Me.lblFirstType = New System.Windows.Forms.Label() + Me.lblSecondBy = New System.Windows.Forms.Label() + Me.lblThreeVariableCategorical = New System.Windows.Forms.Label() + Me.lblSummaryName = New System.Windows.Forms.Label() + Me.lblSummary = New System.Windows.Forms.Label() + Me.lblBy = New System.Windows.Forms.Label() + Me.lblSecondType = New System.Windows.Forms.Label() + Me.lblFirstGroupByFactor = New System.Windows.Forms.Label() + Me.rdoSkim = New System.Windows.Forms.RadioButton() + Me.lblThirdVariable = New System.Windows.Forms.Label() + Me.lblSecondGroupByFactor = New System.Windows.Forms.Label() + Me.grpTwoVariablePercentages = New System.Windows.Forms.GroupBox() + Me.rdoTwoVariable = New System.Windows.Forms.RadioButton() + Me.ucrReceiverFirstVars = New instat.ucrReceiverMultiple() + Me.grpThreeVariablePercentages.SuspendLayout() Me.grpOptions.SuspendLayout() - Me.grpSummaries.SuspendLayout() - Me.grpDisplay.SuspendLayout() Me.grpFrequency.SuspendLayout() + Me.grpSummaries.SuspendLayout() + Me.grpTwoVariablePercentages.SuspendLayout() Me.SuspendLayout() ' - 'cmdSummaries - ' - Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdSummaries.Location = New System.Drawing.Point(6, 70) - Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(105, 23) - Me.cmdSummaries.TabIndex = 1 - Me.cmdSummaries.Tag = "Summaries" - Me.cmdSummaries.Text = "Summaries" - Me.cmdSummaries.UseVisualStyleBackColor = True - ' - 'lblFirstVariable - ' - Me.lblFirstVariable.AutoSize = True - Me.lblFirstVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstVariable.Location = New System.Drawing.Point(268, 58) - Me.lblFirstVariable.Name = "lblFirstVariable" - Me.lblFirstVariable.Size = New System.Drawing.Size(75, 13) - Me.lblFirstVariable.TabIndex = 4 - Me.lblFirstVariable.Tag = "" - Me.lblFirstVariable.Text = "First Variables:" - ' - 'lbSecondVariable - ' - Me.lbSecondVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lbSecondVariable.Location = New System.Drawing.Point(268, 164) - Me.lbSecondVariable.Name = "lbSecondVariable" - Me.lbSecondVariable.Size = New System.Drawing.Size(100, 15) - Me.lbSecondVariable.TabIndex = 3 - Me.lbSecondVariable.Tag = "" - Me.lbSecondVariable.Text = "Second Variable:" - ' - 'grpOptions - ' - Me.grpOptions.Controls.Add(Me.cmdMissingOptions) - Me.grpOptions.Controls.Add(Me.ucrChkOmitMissing) - Me.grpOptions.Controls.Add(Me.cmdSummaries) - Me.grpOptions.Location = New System.Drawing.Point(242, 222) - Me.grpOptions.Name = "grpOptions" - Me.grpOptions.Size = New System.Drawing.Size(169, 103) - Me.grpOptions.TabIndex = 12 - Me.grpOptions.TabStop = False - Me.grpOptions.Text = "Options" - ' - 'cmdMissingOptions - ' - Me.cmdMissingOptions.Enabled = False - Me.cmdMissingOptions.Location = New System.Drawing.Point(7, 44) - Me.cmdMissingOptions.Name = "cmdMissingOptions" - Me.cmdMissingOptions.Size = New System.Drawing.Size(104, 23) - Me.cmdMissingOptions.TabIndex = 2 - Me.cmdMissingOptions.Text = "Options" - Me.cmdMissingOptions.UseVisualStyleBackColor = True - ' - 'ucrChkOmitMissing - ' - Me.ucrChkOmitMissing.AutoSize = True - Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(9, 19) - Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) - Me.ucrChkOmitMissing.TabIndex = 0 - ' - 'lblSummary - ' - Me.lblSummary.AutoSize = True - Me.lblSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSummary.Location = New System.Drawing.Point(6, 43) - Me.lblSummary.Name = "lblSummary" - Me.lblSummary.Size = New System.Drawing.Size(53, 13) - Me.lblSummary.TabIndex = 4 - Me.lblSummary.Text = "Summary:" - ' - 'lblFirstType - ' - Me.lblFirstType.ForeColor = System.Drawing.SystemColors.ControlText - Me.lblFirstType.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstType.Location = New System.Drawing.Point(-20, 16) - Me.lblFirstType.Name = "lblFirstType" - Me.lblFirstType.Size = New System.Drawing.Size(83, 13) - Me.lblFirstType.TabIndex = 0 - Me.lblFirstType.TextAlign = System.Drawing.ContentAlignment.TopRight - ' - 'lblBy - ' - Me.lblBy.AutoSize = True - Me.lblBy.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblBy.Location = New System.Drawing.Point(66, 16) - Me.lblBy.Name = "lblBy" - Me.lblBy.Size = New System.Drawing.Size(18, 13) - Me.lblBy.TabIndex = 1 - Me.lblBy.Text = "by" - ' - 'lblSecondType - ' - Me.lblSecondType.AutoSize = True - Me.lblSecondType.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondType.Location = New System.Drawing.Point(85, 18) - Me.lblSecondType.Name = "lblSecondType" - Me.lblSecondType.Size = New System.Drawing.Size(0, 13) - Me.lblSecondType.TabIndex = 2 - ' - 'lblSummaryName - ' - Me.lblSummaryName.AutoSize = True - Me.lblSummaryName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSummaryName.Location = New System.Drawing.Point(60, 43) - Me.lblSummaryName.Name = "lblSummaryName" - Me.lblSummaryName.Size = New System.Drawing.Size(0, 13) - Me.lblSummaryName.TabIndex = 3 - ' - 'grpSummaries - ' - Me.grpSummaries.Controls.Add(Me.lblFirstType) - Me.grpSummaries.Controls.Add(Me.lblSummaryName) - Me.grpSummaries.Controls.Add(Me.lblSummary) - Me.grpSummaries.Controls.Add(Me.lblBy) - Me.grpSummaries.Controls.Add(Me.lblSecondType) - Me.grpSummaries.Location = New System.Drawing.Point(10, 227) - Me.grpSummaries.Name = "grpSummaries" - Me.grpSummaries.Size = New System.Drawing.Size(210, 72) - Me.grpSummaries.TabIndex = 11 - Me.grpSummaries.TabStop = False - ' - 'rdoCustomize - ' - Me.rdoCustomize.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoCustomize.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoCustomize.FlatAppearance.BorderSize = 2 - Me.rdoCustomize.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoCustomize.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoCustomize.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoCustomize.Location = New System.Drawing.Point(144, 12) - Me.rdoCustomize.Name = "rdoCustomize" - Me.rdoCustomize.Size = New System.Drawing.Size(100, 28) - Me.rdoCustomize.TabIndex = 2 - Me.rdoCustomize.Text = "Two Variables" - Me.rdoCustomize.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoCustomize.UseVisualStyleBackColor = True - ' - 'rdoSkim - ' - Me.rdoSkim.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoSkim.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoSkim.FlatAppearance.BorderSize = 2 - Me.rdoSkim.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoSkim.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoSkim.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSkim.Location = New System.Drawing.Point(49, 12) - Me.rdoSkim.Name = "rdoSkim" - Me.rdoSkim.Size = New System.Drawing.Size(100, 28) - Me.rdoSkim.TabIndex = 1 - Me.rdoSkim.Text = "Skim" - Me.rdoSkim.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoSkim.UseVisualStyleBackColor = True - ' - 'lbSecondOpt - ' - Me.lbSecondOpt.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lbSecondOpt.Location = New System.Drawing.Point(271, 163) - Me.lbSecondOpt.Name = "lbSecondOpt" - Me.lbSecondOpt.Size = New System.Drawing.Size(100, 15) - Me.lbSecondOpt.TabIndex = 6 - Me.lbSecondOpt.Tag = "" - Me.lbSecondOpt.Text = "Factor (Optional) :" - ' - 'lblSecondFactor - ' - Me.lblSecondFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondFactor.Location = New System.Drawing.Point(270, 206) - Me.lblSecondFactor.Name = "lblSecondFactor" - Me.lblSecondFactor.Size = New System.Drawing.Size(137, 15) - Me.lblSecondFactor.TabIndex = 8 - Me.lblSecondFactor.Tag = "" - Me.lblSecondFactor.Text = "Second Factor (Optional) :" - ' - 'lblNumericVariable - ' - Me.lblNumericVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblNumericVariable.Location = New System.Drawing.Point(270, 203) - Me.lblNumericVariable.Name = "lblNumericVariable" - Me.lblNumericVariable.Size = New System.Drawing.Size(154, 15) - Me.lblNumericVariable.TabIndex = 10 - Me.lblNumericVariable.Tag = "" - Me.lblNumericVariable.Text = "Numeric Variable (Optional):" - ' - 'lblMarginName - ' - Me.lblMarginName.AutoSize = True - Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(11, 101) - Me.lblMarginName.Name = "lblMarginName" - Me.lblMarginName.Size = New System.Drawing.Size(41, 13) - Me.lblMarginName.TabIndex = 19 - Me.lblMarginName.Text = "Name :" - ' - 'grpDisplay + 'ucrNudColumnFactors ' - Me.grpDisplay.Controls.Add(Me.ucrReceiverPercentages) - Me.grpDisplay.Controls.Add(Me.lblFactorsAsPercentage) - Me.grpDisplay.Controls.Add(Me.ucrChkPercentageProportion) - Me.grpDisplay.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpDisplay.Location = New System.Drawing.Point(239, 250) - Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Size = New System.Drawing.Size(174, 120) - Me.grpDisplay.TabIndex = 21 - Me.grpDisplay.TabStop = False - Me.grpDisplay.Text = "Percentages" + Me.ucrNudColumnFactors.AutoSize = True + Me.ucrNudColumnFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudColumnFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudColumnFactors.Location = New System.Drawing.Point(129, 48) + Me.ucrNudColumnFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudColumnFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudColumnFactors.Name = "ucrNudColumnFactors" + Me.ucrNudColumnFactors.Size = New System.Drawing.Size(50, 20) + Me.ucrNudColumnFactors.TabIndex = 6 + Me.ucrNudColumnFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrReceiverPercentages ' @@ -313,7 +127,7 @@ Partial Class dlgDescribeTwoVariable Me.lblFactorsAsPercentage.Name = "lblFactorsAsPercentage" Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(117, 13) Me.lblFactorsAsPercentage.TabIndex = 1 - Me.lblFactorsAsPercentage.Tag = "Factors as Percentage:" + Me.lblFactorsAsPercentage.Tag = "Of Factor (Optional):" Me.lblFactorsAsPercentage.Text = "Factors as Percentage:" ' 'ucrChkPercentageProportion @@ -325,55 +139,6 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(154, 23) Me.ucrChkPercentageProportion.TabIndex = 3 ' - 'ucrChkDisplayAsPercentage - ' - Me.ucrChkDisplayAsPercentage.AutoSize = True - Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) - Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) - Me.ucrChkDisplayAsPercentage.TabIndex = 0 - ' - 'grpFrequency - ' - Me.grpFrequency.Controls.Add(Me.ucrNudColumnFactors) - Me.grpFrequency.Controls.Add(Me.lblColumnFactors) - Me.grpFrequency.Controls.Add(Me.ucrNudSigFigs) - Me.grpFrequency.Controls.Add(Me.ucrInputMarginName) - Me.grpFrequency.Controls.Add(Me.lblMarginName) - Me.grpFrequency.Controls.Add(Me.lblSigFigs) - Me.grpFrequency.Controls.Add(Me.ucrChkDisplayMargins) - Me.grpFrequency.Location = New System.Drawing.Point(10, 302) - Me.grpFrequency.Name = "grpFrequency" - Me.grpFrequency.Size = New System.Drawing.Size(223, 127) - Me.grpFrequency.TabIndex = 22 - Me.grpFrequency.TabStop = False - Me.grpFrequency.Text = "Display" - ' - 'ucrNudColumnFactors - ' - Me.ucrNudColumnFactors.AutoSize = True - Me.ucrNudColumnFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudColumnFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudColumnFactors.Location = New System.Drawing.Point(129, 48) - Me.ucrNudColumnFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudColumnFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudColumnFactors.Name = "ucrNudColumnFactors" - Me.ucrNudColumnFactors.Size = New System.Drawing.Size(50, 20) - Me.ucrNudColumnFactors.TabIndex = 22 - Me.ucrNudColumnFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblColumnFactors - ' - Me.lblColumnFactors.AutoSize = True - Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblColumnFactors.Location = New System.Drawing.Point(8, 53) - Me.lblColumnFactors.Name = "lblColumnFactors" - Me.lblColumnFactors.Size = New System.Drawing.Size(83, 13) - Me.lblColumnFactors.TabIndex = 21 - Me.lblColumnFactors.Tag = "" - Me.lblColumnFactors.Text = "Column Factors:" - ' 'ucrNudSigFigs ' Me.ucrNudSigFigs.AutoSize = True @@ -396,7 +161,7 @@ Partial Class dlgDescribeTwoVariable Me.ucrInputMarginName.Location = New System.Drawing.Point(53, 98) Me.ucrInputMarginName.Name = "ucrInputMarginName" Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) - Me.ucrInputMarginName.TabIndex = 20 + Me.ucrInputMarginName.TabIndex = 4 ' 'lblSigFigs ' @@ -405,7 +170,7 @@ Partial Class dlgDescribeTwoVariable Me.lblSigFigs.Location = New System.Drawing.Point(8, 25) Me.lblSigFigs.Name = "lblSigFigs" Me.lblSigFigs.Size = New System.Drawing.Size(96, 13) - Me.lblSigFigs.TabIndex = 4 + Me.lblSigFigs.TabIndex = 0 Me.lblSigFigs.Tag = "Significant_Figures:" Me.lblSigFigs.Text = "Significant Figures:" ' @@ -416,7 +181,62 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(9, 74) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(149, 23) - Me.ucrChkDisplayMargins.TabIndex = 17 + Me.ucrChkDisplayMargins.TabIndex = 2 + ' + 'grpThreeVariablePercentages + ' + Me.grpThreeVariablePercentages.Controls.Add(Me.ucrReceiverThreeVariablePercentage) + Me.grpThreeVariablePercentages.Controls.Add(Me.lblThreeVariableFactorAsPercentages) + Me.grpThreeVariablePercentages.Controls.Add(Me.ucrChkThreeVariablePercentageProportion) + Me.grpThreeVariablePercentages.Controls.Add(Me.ucrChkThreeVariableDisplayAsPercentage) + Me.grpThreeVariablePercentages.Location = New System.Drawing.Point(232, 247) + Me.grpThreeVariablePercentages.Name = "grpThreeVariablePercentages" + Me.grpThreeVariablePercentages.Size = New System.Drawing.Size(174, 114) + Me.grpThreeVariablePercentages.TabIndex = 41 + Me.grpThreeVariablePercentages.TabStop = False + Me.grpThreeVariablePercentages.Text = "Percentages" + ' + 'ucrReceiverThreeVariablePercentage + ' + Me.ucrReceiverThreeVariablePercentage.AutoSize = True + Me.ucrReceiverThreeVariablePercentage.frmParent = Me + Me.ucrReceiverThreeVariablePercentage.Location = New System.Drawing.Point(21, 63) + Me.ucrReceiverThreeVariablePercentage.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverThreeVariablePercentage.Name = "ucrReceiverThreeVariablePercentage" + Me.ucrReceiverThreeVariablePercentage.Selector = Nothing + Me.ucrReceiverThreeVariablePercentage.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverThreeVariablePercentage.strNcFilePath = "" + Me.ucrReceiverThreeVariablePercentage.TabIndex = 3 + Me.ucrReceiverThreeVariablePercentage.ucrSelector = Nothing + ' + 'lblThreeVariableFactorAsPercentages + ' + Me.lblThreeVariableFactorAsPercentages.AutoSize = True + Me.lblThreeVariableFactorAsPercentages.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblThreeVariableFactorAsPercentages.Location = New System.Drawing.Point(18, 44) + Me.lblThreeVariableFactorAsPercentages.Name = "lblThreeVariableFactorAsPercentages" + Me.lblThreeVariableFactorAsPercentages.Size = New System.Drawing.Size(102, 13) + Me.lblThreeVariableFactorAsPercentages.TabIndex = 2 + Me.lblThreeVariableFactorAsPercentages.Tag = "Factors as Percentage:" + Me.lblThreeVariableFactorAsPercentages.Text = "Of Factor (Optional):" + ' + 'ucrChkThreeVariablePercentageProportion + ' + Me.ucrChkThreeVariablePercentageProportion.AutoSize = True + Me.ucrChkThreeVariablePercentageProportion.Checked = False + Me.ucrChkThreeVariablePercentageProportion.Location = New System.Drawing.Point(14, 88) + Me.ucrChkThreeVariablePercentageProportion.Name = "ucrChkThreeVariablePercentageProportion" + Me.ucrChkThreeVariablePercentageProportion.Size = New System.Drawing.Size(136, 23) + Me.ucrChkThreeVariablePercentageProportion.TabIndex = 0 + ' + 'ucrChkThreeVariableDisplayAsPercentage + ' + Me.ucrChkThreeVariableDisplayAsPercentage.AutoSize = True + Me.ucrChkThreeVariableDisplayAsPercentage.Checked = False + Me.ucrChkThreeVariableDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) + Me.ucrChkThreeVariableDisplayAsPercentage.Name = "ucrChkThreeVariableDisplayAsPercentage" + Me.ucrChkThreeVariableDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) + Me.ucrChkThreeVariableDisplayAsPercentage.TabIndex = 0 ' 'rdoThreeVariable ' @@ -426,134 +246,426 @@ Partial Class dlgDescribeTwoVariable Me.rdoThreeVariable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoThreeVariable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoThreeVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoThreeVariable.Location = New System.Drawing.Point(242, 12) + Me.rdoThreeVariable.Location = New System.Drawing.Point(235, 9) Me.rdoThreeVariable.Name = "rdoThreeVariable" Me.rdoThreeVariable.Size = New System.Drawing.Size(100, 28) - Me.rdoThreeVariable.TabIndex = 23 + Me.rdoThreeVariable.TabIndex = 26 Me.rdoThreeVariable.Text = "Three Variables" Me.rdoThreeVariable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoThreeVariable.UseVisualStyleBackColor = True ' + 'lblColumnFactors + ' + Me.lblColumnFactors.AutoSize = True + Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblColumnFactors.Location = New System.Drawing.Point(8, 53) + Me.lblColumnFactors.Name = "lblColumnFactors" + Me.lblColumnFactors.Size = New System.Drawing.Size(83, 13) + Me.lblColumnFactors.TabIndex = 1 + Me.lblColumnFactors.Tag = "" + Me.lblColumnFactors.Text = "Column Factors:" + ' + 'cmdFormatTable + ' + Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdFormatTable.Location = New System.Drawing.Point(265, 404) + Me.cmdFormatTable.Name = "cmdFormatTable" + Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23) + Me.cmdFormatTable.TabIndex = 44 + Me.cmdFormatTable.Text = "Format Table..." + Me.cmdFormatTable.UseVisualStyleBackColor = True + ' + 'lblThreeVariableSecondFactor + ' + Me.lblThreeVariableSecondFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblThreeVariableSecondFactor.Location = New System.Drawing.Point(261, 161) + Me.lblThreeVariableSecondFactor.Name = "lblThreeVariableSecondFactor" + Me.lblThreeVariableSecondFactor.Size = New System.Drawing.Size(100, 15) + Me.lblThreeVariableSecondFactor.TabIndex = 35 + Me.lblThreeVariableSecondFactor.Tag = "" + Me.lblThreeVariableSecondFactor.Text = "Second Variable :" + ' + 'ucrReceiverThreeVariableSecondFactor + ' + Me.ucrReceiverThreeVariableSecondFactor.AutoSize = True + Me.ucrReceiverThreeVariableSecondFactor.frmParent = Me + Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(264, 176) + Me.ucrReceiverThreeVariableSecondFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverThreeVariableSecondFactor.Name = "ucrReceiverThreeVariableSecondFactor" + Me.ucrReceiverThreeVariableSecondFactor.Selector = Nothing + Me.ucrReceiverThreeVariableSecondFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverThreeVariableSecondFactor.strNcFilePath = "" + Me.ucrReceiverThreeVariableSecondFactor.TabIndex = 36 + Me.ucrReceiverThreeVariableSecondFactor.ucrSelector = Nothing + ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(8, 435) + Me.ucrBase.Location = New System.Drawing.Point(1, 432) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) - Me.ucrBase.TabIndex = 13 - ' - 'ucrReceiverNumericVariable - ' - Me.ucrReceiverNumericVariable.AutoSize = True - Me.ucrReceiverNumericVariable.frmParent = Me - Me.ucrReceiverNumericVariable.Location = New System.Drawing.Point(272, 222) - Me.ucrReceiverNumericVariable.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverNumericVariable.Name = "ucrReceiverNumericVariable" - Me.ucrReceiverNumericVariable.Selector = Nothing - Me.ucrReceiverNumericVariable.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverNumericVariable.strNcFilePath = "" - Me.ucrReceiverNumericVariable.TabIndex = 11 - Me.ucrReceiverNumericVariable.ucrSelector = Nothing - ' - 'ucrReceiverSecondFactor - ' - Me.ucrReceiverSecondFactor.AutoSize = True - Me.ucrReceiverSecondFactor.frmParent = Me - Me.ucrReceiverSecondFactor.Location = New System.Drawing.Point(272, 222) - Me.ucrReceiverSecondFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverSecondFactor.Name = "ucrReceiverSecondFactor" - Me.ucrReceiverSecondFactor.Selector = Nothing - Me.ucrReceiverSecondFactor.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverSecondFactor.strNcFilePath = "" - Me.ucrReceiverSecondFactor.TabIndex = 9 - Me.ucrReceiverSecondFactor.ucrSelector = Nothing - ' - 'ucrReceiverSecondOpt - ' - Me.ucrReceiverSecondOpt.AutoSize = True - Me.ucrReceiverSecondOpt.frmParent = Me - Me.ucrReceiverSecondOpt.Location = New System.Drawing.Point(271, 179) - Me.ucrReceiverSecondOpt.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverSecondOpt.Name = "ucrReceiverSecondOpt" - Me.ucrReceiverSecondOpt.Selector = Nothing - Me.ucrReceiverSecondOpt.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverSecondOpt.strNcFilePath = "" - Me.ucrReceiverSecondOpt.TabIndex = 7 - Me.ucrReceiverSecondOpt.ucrSelector = Nothing + Me.ucrBase.TabIndex = 43 + ' + 'ucrReceiverThreeVariableThirdVariable + ' + Me.ucrReceiverThreeVariableThirdVariable.AutoSize = True + Me.ucrReceiverThreeVariableThirdVariable.frmParent = Me + Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(265, 219) + Me.ucrReceiverThreeVariableThirdVariable.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverThreeVariableThirdVariable.Name = "ucrReceiverThreeVariableThirdVariable" + Me.ucrReceiverThreeVariableThirdVariable.Selector = Nothing + Me.ucrReceiverThreeVariableThirdVariable.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverThreeVariableThirdVariable.strNcFilePath = "" + Me.ucrReceiverThreeVariableThirdVariable.TabIndex = 38 + Me.ucrReceiverThreeVariableThirdVariable.ucrSelector = Nothing + ' + 'ucrReceiverSecondSkimrGroupByFactor + ' + Me.ucrReceiverSecondSkimrGroupByFactor.AutoSize = True + Me.ucrReceiverSecondSkimrGroupByFactor.frmParent = Me + Me.ucrReceiverSecondSkimrGroupByFactor.Location = New System.Drawing.Point(265, 219) + Me.ucrReceiverSecondSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSecondSkimrGroupByFactor.Name = "ucrReceiverSecondSkimrGroupByFactor" + Me.ucrReceiverSecondSkimrGroupByFactor.Selector = Nothing + Me.ucrReceiverSecondSkimrGroupByFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverSecondSkimrGroupByFactor.strNcFilePath = "" + Me.ucrReceiverSecondSkimrGroupByFactor.TabIndex = 34 + Me.ucrReceiverSecondSkimrGroupByFactor.ucrSelector = Nothing + ' + 'ucrReceiverSkimrGroupByFactor + ' + Me.ucrReceiverSkimrGroupByFactor.AutoSize = True + Me.ucrReceiverSkimrGroupByFactor.frmParent = Me + Me.ucrReceiverSkimrGroupByFactor.Location = New System.Drawing.Point(264, 176) + Me.ucrReceiverSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSkimrGroupByFactor.Name = "ucrReceiverSkimrGroupByFactor" + Me.ucrReceiverSkimrGroupByFactor.Selector = Nothing + Me.ucrReceiverSkimrGroupByFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverSkimrGroupByFactor.strNcFilePath = "" + Me.ucrReceiverSkimrGroupByFactor.TabIndex = 32 + Me.ucrReceiverSkimrGroupByFactor.ucrSelector = Nothing ' 'ucrPnlDescribe ' Me.ucrPnlDescribe.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlDescribe.Location = New System.Drawing.Point(39, 9) + Me.ucrPnlDescribe.Location = New System.Drawing.Point(32, 6) Me.ucrPnlDescribe.Name = "ucrPnlDescribe" Me.ucrPnlDescribe.Size = New System.Drawing.Size(317, 34) - Me.ucrPnlDescribe.TabIndex = 0 + Me.ucrPnlDescribe.TabIndex = 22 + ' + 'ucrReceiverSecondTwoVariableFactor + ' + Me.ucrReceiverSecondTwoVariableFactor.AutoSize = True + Me.ucrReceiverSecondTwoVariableFactor.frmParent = Me + Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(264, 176) + Me.ucrReceiverSecondTwoVariableFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSecondTwoVariableFactor.Name = "ucrReceiverSecondTwoVariableFactor" + Me.ucrReceiverSecondTwoVariableFactor.Selector = Nothing + Me.ucrReceiverSecondTwoVariableFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverSecondTwoVariableFactor.strNcFilePath = "" + Me.ucrReceiverSecondTwoVariableFactor.TabIndex = 25 + Me.ucrReceiverSecondTwoVariableFactor.ucrSelector = Nothing + ' + 'ucrSelectorDescribeTwoVar + ' + Me.ucrSelectorDescribeTwoVar.AutoSize = True + Me.ucrSelectorDescribeTwoVar.bDropUnusedFilterLevels = False + Me.ucrSelectorDescribeTwoVar.bShowHiddenColumns = False + Me.ucrSelectorDescribeTwoVar.bUseCurrentFilter = True + Me.ucrSelectorDescribeTwoVar.Location = New System.Drawing.Point(3, 36) + Me.ucrSelectorDescribeTwoVar.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorDescribeTwoVar.Name = "ucrSelectorDescribeTwoVar" + Me.ucrSelectorDescribeTwoVar.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorDescribeTwoVar.TabIndex = 28 + ' + 'ucrChkDisplayAsPercentage + ' + Me.ucrChkDisplayAsPercentage.AutoSize = True + Me.ucrChkDisplayAsPercentage.Checked = False + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) + Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) + Me.ucrChkDisplayAsPercentage.TabIndex = 0 + ' + 'cmdSummaries + ' + Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdSummaries.Location = New System.Drawing.Point(6, 45) + Me.cmdSummaries.Name = "cmdSummaries" + Me.cmdSummaries.Size = New System.Drawing.Size(105, 23) + Me.cmdSummaries.TabIndex = 1 + Me.cmdSummaries.Tag = "Summaries" + Me.cmdSummaries.Text = "Summaries" + Me.cmdSummaries.UseVisualStyleBackColor = True + ' + 'grpOptions + ' + Me.grpOptions.Controls.Add(Me.ucrChkOmitMissing) + Me.grpOptions.Controls.Add(Me.cmdSummaries) + Me.grpOptions.Location = New System.Drawing.Point(249, 247) + Me.grpOptions.Name = "grpOptions" + Me.grpOptions.Size = New System.Drawing.Size(155, 76) + Me.grpOptions.TabIndex = 40 + Me.grpOptions.TabStop = False + Me.grpOptions.Text = "Options" + ' + 'ucrChkOmitMissing + ' + Me.ucrChkOmitMissing.AutoSize = True + Me.ucrChkOmitMissing.Checked = False + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(9, 19) + Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) + Me.ucrChkOmitMissing.TabIndex = 0 + ' + 'lbSecondVariable + ' + Me.lbSecondVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lbSecondVariable.Location = New System.Drawing.Point(261, 161) + Me.lbSecondVariable.Name = "lbSecondVariable" + Me.lbSecondVariable.Size = New System.Drawing.Size(100, 15) + Me.lbSecondVariable.TabIndex = 27 + Me.lbSecondVariable.Tag = "" + Me.lbSecondVariable.Text = "Second Variable:" + ' + 'lblFirstVariable + ' + Me.lblFirstVariable.AutoSize = True + Me.lblFirstVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFirstVariable.Location = New System.Drawing.Point(261, 55) + Me.lblFirstVariable.Name = "lblFirstVariable" + Me.lblFirstVariable.Size = New System.Drawing.Size(75, 13) + Me.lblFirstVariable.TabIndex = 31 + Me.lblFirstVariable.Tag = "" + Me.lblFirstVariable.Text = "First Variables:" + ' + 'grpFrequency + ' + Me.grpFrequency.Controls.Add(Me.ucrNudColumnFactors) + Me.grpFrequency.Controls.Add(Me.lblColumnFactors) + Me.grpFrequency.Controls.Add(Me.ucrNudSigFigs) + Me.grpFrequency.Controls.Add(Me.ucrInputMarginName) + Me.grpFrequency.Controls.Add(Me.lblMarginName) + Me.grpFrequency.Controls.Add(Me.lblSigFigs) + Me.grpFrequency.Controls.Add(Me.ucrChkDisplayMargins) + Me.grpFrequency.Location = New System.Drawing.Point(3, 299) + Me.grpFrequency.Name = "grpFrequency" + Me.grpFrequency.Size = New System.Drawing.Size(223, 127) + Me.grpFrequency.TabIndex = 42 + Me.grpFrequency.TabStop = False + Me.grpFrequency.Text = "Display" + ' + 'lblMarginName + ' + Me.lblMarginName.AutoSize = True + Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMarginName.Location = New System.Drawing.Point(11, 101) + Me.lblMarginName.Name = "lblMarginName" + Me.lblMarginName.Size = New System.Drawing.Size(41, 13) + Me.lblMarginName.TabIndex = 3 + Me.lblMarginName.Text = "Name :" + ' + 'grpSummaries + ' + Me.grpSummaries.Controls.Add(Me.lblFirstType) + Me.grpSummaries.Controls.Add(Me.lblSecondBy) + Me.grpSummaries.Controls.Add(Me.lblThreeVariableCategorical) + Me.grpSummaries.Controls.Add(Me.lblSummaryName) + Me.grpSummaries.Controls.Add(Me.lblSummary) + Me.grpSummaries.Controls.Add(Me.lblBy) + Me.grpSummaries.Controls.Add(Me.lblSecondType) + Me.grpSummaries.Location = New System.Drawing.Point(3, 224) + Me.grpSummaries.Name = "grpSummaries" + Me.grpSummaries.Size = New System.Drawing.Size(210, 72) + Me.grpSummaries.TabIndex = 39 + Me.grpSummaries.TabStop = False + ' + 'lblFirstType ' - 'ucrReceiverSecondVar + Me.lblFirstType.AutoSize = True + Me.lblFirstType.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFirstType.Location = New System.Drawing.Point(12, 15) + Me.lblFirstType.Name = "lblFirstType" + Me.lblFirstType.Size = New System.Drawing.Size(0, 13) + Me.lblFirstType.TabIndex = 0 + ' + 'lblSecondBy ' - Me.ucrReceiverSecondVar.AutoSize = True - Me.ucrReceiverSecondVar.frmParent = Me - Me.ucrReceiverSecondVar.Location = New System.Drawing.Point(271, 179) - Me.ucrReceiverSecondVar.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverSecondVar.Name = "ucrReceiverSecondVar" - Me.ucrReceiverSecondVar.Selector = Nothing - Me.ucrReceiverSecondVar.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverSecondVar.strNcFilePath = "" - Me.ucrReceiverSecondVar.TabIndex = 2 - Me.ucrReceiverSecondVar.ucrSelector = Nothing + Me.lblSecondBy.AutoSize = True + Me.lblSecondBy.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSecondBy.Location = New System.Drawing.Point(180, 16) + Me.lblSecondBy.Name = "lblSecondBy" + Me.lblSecondBy.Size = New System.Drawing.Size(18, 13) + Me.lblSecondBy.TabIndex = 1 + Me.lblSecondBy.Text = "by" + ' + 'lblThreeVariableCategorical + ' + Me.lblThreeVariableCategorical.AutoSize = True + Me.lblThreeVariableCategorical.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblThreeVariableCategorical.Location = New System.Drawing.Point(12, 33) + Me.lblThreeVariableCategorical.Name = "lblThreeVariableCategorical" + Me.lblThreeVariableCategorical.Size = New System.Drawing.Size(59, 13) + Me.lblThreeVariableCategorical.TabIndex = 3 + Me.lblThreeVariableCategorical.Text = "categorical" + ' + 'lblSummaryName + ' + Me.lblSummaryName.AutoSize = True + Me.lblSummaryName.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSummaryName.Location = New System.Drawing.Point(70, 51) + Me.lblSummaryName.Name = "lblSummaryName" + Me.lblSummaryName.Size = New System.Drawing.Size(0, 13) + Me.lblSummaryName.TabIndex = 5 + ' + 'lblSummary + ' + Me.lblSummary.AutoSize = True + Me.lblSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSummary.Location = New System.Drawing.Point(12, 51) + Me.lblSummary.Name = "lblSummary" + Me.lblSummary.Size = New System.Drawing.Size(53, 13) + Me.lblSummary.TabIndex = 4 + Me.lblSummary.Text = "Summary:" + ' + 'lblBy + ' + Me.lblBy.AutoSize = True + Me.lblBy.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblBy.Location = New System.Drawing.Point(82, 16) + Me.lblBy.Name = "lblBy" + Me.lblBy.Size = New System.Drawing.Size(18, 13) + Me.lblBy.TabIndex = 6 + Me.lblBy.Text = "by" + ' + 'lblSecondType + ' + Me.lblSecondType.AutoSize = True + Me.lblSecondType.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSecondType.Location = New System.Drawing.Point(106, 18) + Me.lblSecondType.Name = "lblSecondType" + Me.lblSecondType.Size = New System.Drawing.Size(0, 13) + Me.lblSecondType.TabIndex = 0 + ' + 'lblFirstGroupByFactor + ' + Me.lblFirstGroupByFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFirstGroupByFactor.Location = New System.Drawing.Point(261, 161) + Me.lblFirstGroupByFactor.Name = "lblFirstGroupByFactor" + Me.lblFirstGroupByFactor.Size = New System.Drawing.Size(100, 15) + Me.lblFirstGroupByFactor.TabIndex = 29 + Me.lblFirstGroupByFactor.Tag = "" + Me.lblFirstGroupByFactor.Text = "Factor (Optional) :" + ' + 'rdoSkim + ' + Me.rdoSkim.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoSkim.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoSkim.FlatAppearance.BorderSize = 2 + Me.rdoSkim.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoSkim.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoSkim.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoSkim.Location = New System.Drawing.Point(42, 9) + Me.rdoSkim.Name = "rdoSkim" + Me.rdoSkim.Size = New System.Drawing.Size(100, 28) + Me.rdoSkim.TabIndex = 23 + Me.rdoSkim.Text = "Skim" + Me.rdoSkim.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoSkim.UseVisualStyleBackColor = True + ' + 'lblThirdVariable + ' + Me.lblThirdVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblThirdVariable.Location = New System.Drawing.Point(263, 200) + Me.lblThirdVariable.Name = "lblThirdVariable" + Me.lblThirdVariable.Size = New System.Drawing.Size(154, 15) + Me.lblThirdVariable.TabIndex = 37 + Me.lblThirdVariable.Tag = "" + Me.lblThirdVariable.Text = "Third Variable :" + ' + 'lblSecondGroupByFactor + ' + Me.lblSecondGroupByFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSecondGroupByFactor.Location = New System.Drawing.Point(263, 203) + Me.lblSecondGroupByFactor.Name = "lblSecondGroupByFactor" + Me.lblSecondGroupByFactor.Size = New System.Drawing.Size(137, 15) + Me.lblSecondGroupByFactor.TabIndex = 33 + Me.lblSecondGroupByFactor.Tag = "" + Me.lblSecondGroupByFactor.Text = "Second Factor (Optional) :" + ' + 'grpTwoVariablePercentages + ' + Me.grpTwoVariablePercentages.Controls.Add(Me.ucrReceiverPercentages) + Me.grpTwoVariablePercentages.Controls.Add(Me.lblFactorsAsPercentage) + Me.grpTwoVariablePercentages.Controls.Add(Me.ucrChkPercentageProportion) + Me.grpTwoVariablePercentages.Controls.Add(Me.ucrChkDisplayAsPercentage) + Me.grpTwoVariablePercentages.Location = New System.Drawing.Point(232, 247) + Me.grpTwoVariablePercentages.Name = "grpTwoVariablePercentages" + Me.grpTwoVariablePercentages.Size = New System.Drawing.Size(174, 120) + Me.grpTwoVariablePercentages.TabIndex = 45 + Me.grpTwoVariablePercentages.TabStop = False + Me.grpTwoVariablePercentages.Text = "Percentages" + ' + 'rdoTwoVariable + ' + Me.rdoTwoVariable.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoTwoVariable.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoTwoVariable.FlatAppearance.BorderSize = 2 + Me.rdoTwoVariable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoTwoVariable.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoTwoVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoTwoVariable.Location = New System.Drawing.Point(137, 9) + Me.rdoTwoVariable.Name = "rdoTwoVariable" + Me.rdoTwoVariable.Size = New System.Drawing.Size(100, 28) + Me.rdoTwoVariable.TabIndex = 24 + Me.rdoTwoVariable.Text = "Two Variables" + Me.rdoTwoVariable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoTwoVariable.UseVisualStyleBackColor = True ' 'ucrReceiverFirstVars ' Me.ucrReceiverFirstVars.AutoSize = True Me.ucrReceiverFirstVars.frmParent = Me - Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(271, 76) + Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(264, 73) Me.ucrReceiverFirstVars.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFirstVars.Name = "ucrReceiverFirstVars" Me.ucrReceiverFirstVars.Selector = Nothing Me.ucrReceiverFirstVars.Size = New System.Drawing.Size(120, 79) Me.ucrReceiverFirstVars.strNcFilePath = "" - Me.ucrReceiverFirstVars.TabIndex = 5 + Me.ucrReceiverFirstVars.TabIndex = 30 Me.ucrReceiverFirstVars.ucrSelector = Nothing ' - 'ucrSelectorDescribeTwoVar - ' - Me.ucrSelectorDescribeTwoVar.AutoSize = True - Me.ucrSelectorDescribeTwoVar.bDropUnusedFilterLevels = False - Me.ucrSelectorDescribeTwoVar.bShowHiddenColumns = False - Me.ucrSelectorDescribeTwoVar.bUseCurrentFilter = True - Me.ucrSelectorDescribeTwoVar.Location = New System.Drawing.Point(10, 39) - Me.ucrSelectorDescribeTwoVar.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorDescribeTwoVar.Name = "ucrSelectorDescribeTwoVar" - Me.ucrSelectorDescribeTwoVar.Size = New System.Drawing.Size(213, 183) - Me.ucrSelectorDescribeTwoVar.TabIndex = 3 - ' 'dlgDescribeTwoVariable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ClientSize = New System.Drawing.Size(419, 491) - Me.Controls.Add(Me.rdoThreeVariable) + Me.Controls.Add(Me.grpThreeVariablePercentages) + Me.Controls.Add(Me.cmdFormatTable) + Me.Controls.Add(Me.lblThreeVariableSecondFactor) + Me.Controls.Add(Me.ucrReceiverThreeVariableSecondFactor) Me.Controls.Add(Me.ucrBase) - Me.Controls.Add(Me.grpFrequency) - Me.Controls.Add(Me.lblNumericVariable) - Me.Controls.Add(Me.lblSecondFactor) - Me.Controls.Add(Me.ucrReceiverSecondFactor) + Me.Controls.Add(Me.ucrReceiverThreeVariableThirdVariable) + Me.Controls.Add(Me.ucrReceiverSecondSkimrGroupByFactor) + Me.Controls.Add(Me.ucrReceiverSkimrGroupByFactor) + Me.Controls.Add(Me.ucrReceiverSecondTwoVariableFactor) + Me.Controls.Add(Me.ucrSelectorDescribeTwoVar) Me.Controls.Add(Me.grpOptions) - Me.Controls.Add(Me.lbSecondOpt) - Me.Controls.Add(Me.ucrReceiverSecondOpt) - Me.Controls.Add(Me.rdoSkim) - Me.Controls.Add(Me.rdoCustomize) - Me.Controls.Add(Me.ucrPnlDescribe) Me.Controls.Add(Me.lbSecondVariable) Me.Controls.Add(Me.lblFirstVariable) - Me.Controls.Add(Me.ucrReceiverSecondVar) - Me.Controls.Add(Me.ucrReceiverFirstVars) - Me.Controls.Add(Me.ucrSelectorDescribeTwoVar) + Me.Controls.Add(Me.grpFrequency) Me.Controls.Add(Me.grpSummaries) - Me.Controls.Add(Me.grpDisplay) - Me.Controls.Add(Me.ucrReceiverNumericVariable) + Me.Controls.Add(Me.lblFirstGroupByFactor) + Me.Controls.Add(Me.lblThirdVariable) + Me.Controls.Add(Me.lblSecondGroupByFactor) + Me.Controls.Add(Me.grpTwoVariablePercentages) + Me.Controls.Add(Me.ucrReceiverFirstVars) + Me.Controls.Add(Me.rdoThreeVariable) + Me.Controls.Add(Me.rdoTwoVariable) + Me.Controls.Add(Me.rdoSkim) + Me.Controls.Add(Me.ucrPnlDescribe) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -561,56 +673,67 @@ Partial Class dlgDescribeTwoVariable Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Describe_Two_Variable" Me.Text = "Describe Two Variables" + Me.grpThreeVariablePercentages.ResumeLayout(False) + Me.grpThreeVariablePercentages.PerformLayout() Me.grpOptions.ResumeLayout(False) Me.grpOptions.PerformLayout() - Me.grpSummaries.ResumeLayout(False) - Me.grpSummaries.PerformLayout() - Me.grpDisplay.ResumeLayout(False) - Me.grpDisplay.PerformLayout() Me.grpFrequency.ResumeLayout(False) Me.grpFrequency.PerformLayout() + Me.grpSummaries.ResumeLayout(False) + Me.grpSummaries.PerformLayout() + Me.grpTwoVariablePercentages.ResumeLayout(False) + Me.grpTwoVariablePercentages.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub + Friend WithEvents ucrNudColumnFactors As ucrNud + Friend WithEvents ucrReceiverPercentages As ucrReceiverSingle + Friend WithEvents grpThreeVariablePercentages As GroupBox + Friend WithEvents ucrReceiverThreeVariablePercentage As ucrReceiverSingle + Friend WithEvents lblThreeVariableFactorAsPercentages As Label + Friend WithEvents ucrChkThreeVariablePercentageProportion As ucrCheck + Friend WithEvents ucrChkThreeVariableDisplayAsPercentage As ucrCheck + Friend WithEvents cmdFormatTable As Button + Friend WithEvents lblThreeVariableSecondFactor As Label + Friend WithEvents ucrReceiverThreeVariableSecondFactor As ucrReceiverSingle Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrReceiverThreeVariableThirdVariable As ucrReceiverSingle + Friend WithEvents ucrReceiverSecondSkimrGroupByFactor As ucrReceiverSingle + Friend WithEvents ucrReceiverSkimrGroupByFactor As ucrReceiverSingle + Friend WithEvents ucrReceiverSecondTwoVariableFactor As ucrReceiverSingle Friend WithEvents ucrSelectorDescribeTwoVar As ucrSelectorByDataFrameAddRemove - Friend WithEvents ucrReceiverFirstVars As ucrReceiverMultiple + Friend WithEvents grpOptions As GroupBox + Friend WithEvents ucrChkOmitMissing As ucrCheck Friend WithEvents cmdSummaries As Button - Friend WithEvents ucrReceiverSecondVar As ucrReceiverSingle - Friend WithEvents lblFirstVariable As Label Friend WithEvents lbSecondVariable As Label - Friend WithEvents ucrChkOmitMissing As ucrCheck - Friend WithEvents grpOptions As GroupBox - Friend WithEvents lblSecondType As Label - Friend WithEvents lblBy As Label - Friend WithEvents lblFirstType As Label - Friend WithEvents lblSummary As Label - Friend WithEvents lblSummaryName As Label - Friend WithEvents grpSummaries As GroupBox - Friend WithEvents ucrPnlDescribe As UcrPanel - Friend WithEvents ucrReceiverSecondOpt As ucrReceiverSingle - Friend WithEvents rdoSkim As RadioButton - Friend WithEvents rdoCustomize As RadioButton - Friend WithEvents lbSecondOpt As Label - Friend WithEvents lblSecondFactor As Label - Friend WithEvents ucrReceiverSecondFactor As ucrReceiverSingle - Friend WithEvents lblNumericVariable As Label - Friend WithEvents ucrReceiverNumericVariable As ucrReceiverSingle - Friend WithEvents ucrChkDisplayMargins As ucrCheck + Friend WithEvents lblFirstVariable As Label + Friend WithEvents grpFrequency As GroupBox + Friend WithEvents lblColumnFactors As Label + Friend WithEvents ucrNudSigFigs As ucrNud Friend WithEvents ucrInputMarginName As ucrInputTextBox Friend WithEvents lblMarginName As Label - Friend WithEvents grpDisplay As GroupBox + Friend WithEvents lblSigFigs As Label + Friend WithEvents ucrChkDisplayMargins As ucrCheck + Friend WithEvents grpSummaries As GroupBox + Friend WithEvents lblFirstType As Label + Friend WithEvents lblSecondBy As Label + Friend WithEvents lblThreeVariableCategorical As Label + Friend WithEvents lblSummaryName As Label + Friend WithEvents lblSummary As Label + Friend WithEvents lblBy As Label + Friend WithEvents lblSecondType As Label + Friend WithEvents lblFirstGroupByFactor As Label + Friend WithEvents lblThirdVariable As Label + Friend WithEvents lblSecondGroupByFactor As Label + Friend WithEvents grpTwoVariablePercentages As GroupBox Friend WithEvents lblFactorsAsPercentage As Label Friend WithEvents ucrChkPercentageProportion As ucrCheck Friend WithEvents ucrChkDisplayAsPercentage As ucrCheck - Friend WithEvents grpFrequency As GroupBox - Friend WithEvents ucrNudColumnFactors As ucrNud - Friend WithEvents lblColumnFactors As Label - Friend WithEvents ucrNudSigFigs As ucrNud - Friend WithEvents lblSigFigs As Label - Friend WithEvents ucrReceiverPercentages As ucrReceiverSingle + Friend WithEvents ucrReceiverFirstVars As ucrReceiverMultiple Friend WithEvents rdoThreeVariable As RadioButton - Friend WithEvents cmdMissingOptions As Button + Friend WithEvents rdoTwoVariable As RadioButton + Friend WithEvents rdoSkim As RadioButton + Friend WithEvents ucrPnlDescribe As UcrPanel End Class diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index f628b431ceb..8bd6a8245d9 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -18,20 +18,43 @@ Imports instat.Translations Public Class dlgDescribeTwoVariable Private bFirstLoad As Boolean = True Private bReset As Boolean = True + Private bRcodeSet As Boolean = True Private bResetSubdialog As Boolean = False Public strFirstVariablesType, strSecondVariableType As String - Public clsGetDataTypeFunction, clsGetSecondDataTypeFunction, clsRCorrelationFunction, clsRCustomSummaryFunction, - clsCombineFunction, clsRAnovaFunction, clsFrequencyTablesFunction, clsSkimrFunction, clsSummariesListFunction, - clsGroupByFunction, clsDummyFunction, clsMmtableFunction, clsHeaderTopLeftFunction, - clsHeaderLeftTopFunction, clsHeaderLeftTopFuncion, clsCombineFrequencyParametersFunction, - clsSummaryMapFunction, clsCombineMultipleColumnsFunction, clsCombineFactorsFunction, - clsMmtableMapFunction, clsHeaderTopLeftSummaryVariableFunction, - clsCombineFrequencyFactorParameterFunction, clsSelectFunction, clsRenameCombineFunction As New RFunction - Private clsGroupByPipeOperator, clsMmtablePlusOperator, clsMapFrequencyPipeOperator, - clsMmtableTildeOperator, clsDataSelectTildeOperator, clsEmptyOperator, clsSecondEmptyOperator As New ROperator + + 'MAPPING AND SUMMARY FUNCTIoNS + Private clsCombineFrequencyParametersFunction, clsCombineFunction, + clsCombineMultipleColumnsFunction, clsDummyFunction, clsFormatTableMapFunction, + clsGroupByFunction, clsHeaderLeftTopFunction, clsHeaderTopLeftFunction, + clsMmtableFunction, clsMmtableMapFunction, clsRAnovaFunction, + clsRCorrelationFunction, clsRCustomSummaryFunction, clsRenameFunction, + clsSecondHeaderFunction, clsSkimrFunction, clsSummariesListFunction, + clsSummaryMapFunction, clsSummaryTableCombineFactorsFunction, + clsSummaryTableFunction, clsThreeVariableCombineFrequencyParametersFunction As New RFunction + + 'FORMAT TABLE FUNCTIONS + Private clsBorderWeightPxFunction, clsCellBorderFunction, clsCellFillFunction, + clsCellTextFunction, clsFootnoteCellBodyFunction, clsFootnoteCellFunction, + clsFootnoteSubtitleLocationFunction, clsFootnoteTitleLocationFunction, + clsHeaderFormatFunction, clsSecondFootnoteCellBodyFunction, + clsSecondFootnoteCellFunction, clsStubHeadFunction, clsStyleListFunction, + clsTabFootnoteSubtitleFunction, clsTabFootnoteTitleFunction, + clsTableSourcenoteFunction, clsTableTitleFunction, clsTabOptionsFunction, + clsTabStyleCellTextFunction, clsTabStyleCellTitleFunction, clsTabStyleFunction, + clsTabStylePxFunction As New RFunction + + Private clsGroupByPipeOperator, clsMmtablePlusOperator, clsMapPipeOperator, + clsMmtableTildeOperator, clsSummaryTildeOperator, clsEmptyOperator, + clsSecondEmptyOperator As New ROperator + 'Frequency Parameters Private lstFrequencyParameters As New List(Of String)({"percentage_type", "margin_name", "perc_total_factors", "perc_decimal", "signif_fig", "include_margins"}) + + 'Format Operators + Private clsPipeOperator, clsTabFootnoteOperator, + clsJoiningPipeOperator, clsFormatTableTildeOperator, + clsFormatTableMappingPipeOperator As ROperator Private iUcrBaseXLocation, iDialogueXsize As Integer Private Sub dlgDescribeTwoVariable_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -51,8 +74,6 @@ Public Class dlgDescribeTwoVariable Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 414 ucrBase.clsRsyntax.iCallType = 2 - rdoThreeVariable.Enabled = False - lblNumericVariable.Visible = False iUcrBaseXLocation = ucrBase.Location.X iDialogueXsize = Me.Size.Width @@ -65,29 +86,29 @@ Public Class dlgDescribeTwoVariable ucrReceiverFirstVars.Selector = ucrSelectorDescribeTwoVar ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) - ucrReceiverSecondVar.SetParameter(New RParameter("factors", 2)) - ucrReceiverSecondVar.SetParameterIsString() - ucrReceiverSecondVar.Selector = ucrSelectorDescribeTwoVar - ucrReceiverSecondVar.SetLinkedDisplayControl(lbSecondVariable) - - ucrReceiverSecondOpt.SetParameter(New RParameter("factors", 2, bNewIncludeArgumentName:=False)) - ucrReceiverSecondOpt.bWithQuotes = False - ucrReceiverSecondOpt.SetParameterIsString() - ucrReceiverSecondOpt.Selector = ucrSelectorDescribeTwoVar - ucrReceiverSecondOpt.SetLinkedDisplayControl(lbSecondOpt) - ucrReceiverSecondOpt.SetDataType("factor") - - ucrReceiverSecondFactor.SetParameter(New RParameter("second_factor", 3, bNewIncludeArgumentName:=False)) - ucrReceiverSecondFactor.bWithQuotes = False - ucrReceiverSecondFactor.SetParameterIsString() - ucrReceiverSecondFactor.Selector = ucrSelectorDescribeTwoVar - ucrReceiverSecondFactor.SetLinkedDisplayControl(lblSecondFactor) - ucrReceiverSecondFactor.SetDataType("factor") - - ucrReceiverNumericVariable.SetParameter(New RParameter("factor_two", 2, bNewIncludeArgumentName:=False)) - ucrReceiverNumericVariable.SetParameterIsString() - ucrReceiverNumericVariable.Selector = ucrSelectorDescribeTwoVar - ucrReceiverNumericVariable.SetLinkedDisplayControl(lblNumericVariable) + ucrReceiverSecondTwoVariableFactor.SetParameter(New RParameter("factors", 2)) + ucrReceiverSecondTwoVariableFactor.SetParameterIsString() + ucrReceiverSecondTwoVariableFactor.Selector = ucrSelectorDescribeTwoVar + ucrReceiverSecondTwoVariableFactor.SetLinkedDisplayControl(lbSecondVariable) + + ucrReceiverSkimrGroupByFactor.SetParameter(New RParameter("factors", 2, bNewIncludeArgumentName:=False)) + ucrReceiverSkimrGroupByFactor.bWithQuotes = False + ucrReceiverSkimrGroupByFactor.SetParameterIsString() + ucrReceiverSkimrGroupByFactor.Selector = ucrSelectorDescribeTwoVar + ucrReceiverSkimrGroupByFactor.SetLinkedDisplayControl(lblFirstGroupByFactor) + ucrReceiverSkimrGroupByFactor.SetDataType("factor") + + ucrReceiverSecondSkimrGroupByFactor.SetParameter(New RParameter("second_factor", 3, bNewIncludeArgumentName:=False)) + ucrReceiverSecondSkimrGroupByFactor.bWithQuotes = False + ucrReceiverSecondSkimrGroupByFactor.SetParameterIsString() + ucrReceiverSecondSkimrGroupByFactor.Selector = ucrSelectorDescribeTwoVar + ucrReceiverSecondSkimrGroupByFactor.SetLinkedDisplayControl(lblSecondGroupByFactor) + ucrReceiverSecondSkimrGroupByFactor.SetDataType("factor") + + ucrReceiverThreeVariableThirdVariable.SetParameter(New RParameter("second_factors", 3, bNewIncludeArgumentName:=False)) + ucrReceiverThreeVariableThirdVariable.SetParameterIsString() + ucrReceiverThreeVariableThirdVariable.Selector = ucrSelectorDescribeTwoVar + ucrReceiverThreeVariableThirdVariable.SetLinkedDisplayControl(lblThirdVariable) ucrChkOmitMissing.SetParameter(New RParameter("na.rm", 6)) ucrChkOmitMissing.SetText("Omit Missing Values") @@ -100,13 +121,18 @@ Public Class dlgDescribeTwoVariable ucrInputMarginName.SetLinkedDisplayControl(lblMarginName) - ucrPnlDescribe.AddRadioButton(rdoCustomize) + ucrPnlDescribe.AddRadioButton(rdoTwoVariable) ucrPnlDescribe.AddRadioButton(rdoSkim) ucrPnlDescribe.AddRadioButton(rdoThreeVariable) - ucrPnlDescribe.AddParameterValuesCondition(rdoCustomize, "checked", "customize") + ucrPnlDescribe.AddParameterValuesCondition(rdoTwoVariable, "checked", "customize") ucrPnlDescribe.AddParameterValuesCondition(rdoSkim, "checked", "skim") ucrPnlDescribe.AddParameterValuesCondition(rdoThreeVariable, "checked", "three_variable") + ucrPnlDescribe.AddToLinkedControls({ucrReceiverSkimrGroupByFactor, ucrReceiverSecondSkimrGroupByFactor}, {rdoSkim}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlDescribe.AddToLinkedControls({ucrReceiverThreeVariableThirdVariable}, {rdoThreeVariable}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlDescribe.AddToLinkedControls({ucrReceiverSecondTwoVariableFactor}, {rdoTwoVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlDescribe.AddToLinkedControls({ucrReceiverThreeVariableSecondFactor}, {rdoThreeVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkDisplayAsPercentage.SetParameter(New RParameter("percentage_type", 1)) ucrChkDisplayAsPercentage.SetText("As Percentages") ucrChkDisplayAsPercentage.SetValuesCheckedAndUnchecked(Chr(34) & "factors" & Chr(34), Chr(34) & "none" & Chr(34)) @@ -115,12 +141,38 @@ Public Class dlgDescribeTwoVariable ucrChkDisplayAsPercentage.AddToLinkedControls(ucrReceiverPercentages, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDisplayAsPercentage.AddToLinkedControls(ucrChkPercentageProportion, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrReceiverThreeVariableSecondFactor.SetParameter(New RParameter("second_three_varible_factor", 0, bNewIncludeArgumentName:=False)) + ucrReceiverThreeVariableSecondFactor.SetParameterIsString() + ucrReceiverThreeVariableSecondFactor.Selector = ucrSelectorDescribeTwoVar + ucrReceiverThreeVariableSecondFactor.SetIncludedDataTypes({"factor"}) + ucrReceiverThreeVariableSecondFactor.SetLinkedDisplayControl(lblThreeVariableSecondFactor) + ucrReceiverPercentages.SetParameter(New RParameter("perc_total_factors", 2)) ucrReceiverPercentages.SetParameterIsString() ucrReceiverPercentages.Selector = ucrSelectorDescribeTwoVar ucrReceiverPercentages.SetDataType("factor") ucrReceiverPercentages.SetLinkedDisplayControl(lblFactorsAsPercentage) + ucrChkThreeVariableDisplayAsPercentage.SetParameter(New RParameter("percentage_type", 1)) + ucrChkThreeVariableDisplayAsPercentage.SetText("As Percentages") + ucrChkThreeVariableDisplayAsPercentage.SetValuesCheckedAndUnchecked(Chr(34) & "factors" & Chr(34), Chr(34) & "none" & Chr(34)) + ucrChkThreeVariableDisplayAsPercentage.SetRDefault(Chr(34) & "none" & Chr(34)) + + ucrChkThreeVariableDisplayAsPercentage.AddToLinkedControls(ucrReceiverThreeVariablePercentage, {True}, bNewLinkedHideIfParameterMissing:=True, + bNewLinkedAddRemoveParameter:=True) + ucrChkThreeVariableDisplayAsPercentage.AddToLinkedControls(ucrChkThreeVariablePercentageProportion, {True}, bNewLinkedAddRemoveParameter:=True, + bNewLinkedHideIfParameterMissing:=True) + + ucrReceiverThreeVariablePercentage.SetParameter(New RParameter("perc_total_factors", 2)) + ucrReceiverThreeVariablePercentage.SetParameterIsString() + ucrReceiverThreeVariablePercentage.Selector = ucrSelectorDescribeTwoVar + ucrReceiverThreeVariablePercentage.SetDataType("factor") + ucrReceiverThreeVariablePercentage.SetLinkedDisplayControl(lblThreeVariableFactorAsPercentages) + + ucrChkThreeVariablePercentageProportion.SetParameter(New RParameter("perc_decimal", 3)) + ucrChkThreeVariablePercentageProportion.SetText("Display as Decimal") + ucrChkThreeVariablePercentageProportion.SetRDefault("FALSE") + ucrChkPercentageProportion.SetParameter(New RParameter("perc_decimal", 3)) ucrChkPercentageProportion.SetText("Display as Decimal") ucrChkPercentageProportion.SetRDefault("FALSE") @@ -130,47 +182,64 @@ Public Class dlgDescribeTwoVariable ucrNudSigFigs.SetRDefault(2) ucrNudColumnFactors.SetMinMax(1, 2) - - ucrPnlDescribe.AddToLinkedControls({ucrReceiverSecondOpt, ucrReceiverSecondFactor}, {rdoSkim, rdoThreeVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlDescribe.AddToLinkedControls({ucrReceiverNumericVariable}, {rdoThreeVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - - clsGetDataTypeFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_variables_metadata") - clsGetDataTypeFunction.AddParameter("property", "data_type_label") - - clsGetSecondDataTypeFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_variables_metadata") - clsGetSecondDataTypeFunction.AddParameter("property", "data_type_label") End Sub Private Sub SetDefaults() - clsFrequencyTablesFunction = New RFunction + clsBorderWeightPxFunction = New RFunction + clsCellBorderFunction = New RFunction + clsCellFillFunction = New RFunction + clsCellTextFunction = New RFunction + clsCombineFrequencyParametersFunction = New RFunction + clsCombineFunction = New RFunction + clsCombineMultipleColumnsFunction = New RFunction + clsDummyFunction = New RFunction + clsFootnoteCellBodyFunction = New RFunction + clsFootnoteCellFunction = New RFunction + clsFootnoteSubtitleLocationFunction = New RFunction + clsFootnoteTitleLocationFunction = New RFunction + clsFormatTableMapFunction = New RFunction + clsGroupByFunction = New RFunction + clsHeaderFormatFunction = New RFunction + clsHeaderLeftTopFunction = New RFunction + clsHeaderTopLeftFunction = New RFunction + clsMmtableFunction = New RFunction + clsMmtableMapFunction = New RFunction clsRAnovaFunction = New RFunction clsRCorrelationFunction = New RFunction - clsSummariesListFunction = New RFunction clsRCustomSummaryFunction = New RFunction - clsCombineFunction = New RFunction + clsRenameFunction = New RFunction + clsSecondFootnoteCellBodyFunction = New RFunction + clsSecondFootnoteCellFunction = New RFunction + clsSecondHeaderFunction = New RFunction clsSkimrFunction = New RFunction - clsGroupByPipeOperator = New ROperator - clsGroupByFunction = New RFunction - clsMmtableFunction = New RFunction - clsHeaderTopLeftFunction = New RFunction - clsHeaderLeftTopFunction = New RFunction - clsHeaderLeftTopFuncion = New RFunction - clsDummyFunction = New RFunction - clsCombineFrequencyParametersFunction = New RFunction + clsStyleListFunction = New RFunction + clsStubHeadFunction = New RFunction + clsSummariesListFunction = New RFunction clsSummaryMapFunction = New RFunction - clsCombineMultipleColumnsFunction = New RFunction - clsMmtableMapFunction = New RFunction - clsHeaderTopLeftSummaryVariableFunction = New RFunction - clsCombineFactorsFunction = New RFunction - clsCombineFrequencyFactorParameterFunction = New RFunction - clsSelectFunction = New RFunction - clsRenameCombineFunction = New RFunction - clsDataSelectTildeOperator = New ROperator - clsMmtableTildeOperator = New ROperator - clsMapFrequencyPipeOperator = New ROperator - clsMmtablePlusOperator = New ROperator + clsSummaryTableCombineFactorsFunction = New RFunction + clsSummaryTableFunction = New RFunction + clsTabFootnoteSubtitleFunction = New RFunction + clsTabFootnoteTitleFunction = New RFunction + clsTableSourcenoteFunction = New RFunction + clsTableTitleFunction = New RFunction + clsTabOptionsFunction = New RFunction + clsTabStyleCellTextFunction = New RFunction + clsTabStyleCellTitleFunction = New RFunction + clsTabStyleFunction = New RFunction + clsTabStylePxFunction = New RFunction + clsThreeVariableCombineFrequencyParametersFunction = New RFunction clsEmptyOperator = New ROperator + clsFormatTableMappingPipeOperator = New ROperator + clsFormatTableTildeOperator = New ROperator + clsGroupByPipeOperator = New ROperator + clsJoiningPipeOperator = New ROperator + clsMapPipeOperator = New ROperator + clsMmtablePlusOperator = New ROperator + clsMmtableTildeOperator = New ROperator + clsPipeOperator = New ROperator clsSecondEmptyOperator = New ROperator + clsTabFootnoteOperator = New ROperator + ucrSelectorDescribeTwoVar.Reset() ucrReceiverFirstVars.SetMeAsReceiver() @@ -180,76 +249,97 @@ Public Class dlgDescribeTwoVariable ucrBase.clsRsyntax.ClearCodes() - clsCombineFrequencyParametersFunction.SetRCommand("c") + clsBorderWeightPxFunction.SetPackageName("gt") + clsBorderWeightPxFunction.SetRCommand("px") + clsBorderWeightPxFunction.AddParameter("weight", "1", iPosition:=0, bIncludeArgumentName:=False) + + clsCellBorderFunction.SetPackageName("gt") + clsCellBorderFunction.SetRCommand("cell_borders") + clsCellBorderFunction.AddParameter("weight", clsRFunctionParameter:=clsBorderWeightPxFunction, iPosition:=3) - clsCombineFactorsFunction.SetRCommand("c") + clsCellFillFunction.SetPackageName("gt") + clsCellFillFunction.SetRCommand("cell_fill") - clsRenameCombineFunction.SetRCommand("c") - clsRenameCombineFunction.AddParameter("first", "1", iPosition:=0, bIncludeArgumentName:=False) - clsRenameCombineFunction.AddParameter("by_var", "2", iPosition:=1) - clsRenameCombineFunction.AddParameter("third", "3", iPosition:=2, bIncludeArgumentName:=False) - clsRenameCombineFunction.AddParameter("fourth", "4", iPosition:=3, bIncludeArgumentName:=False) + clsCellTextFunction.SetPackageName("gt") + clsCellTextFunction.SetRCommand("cell_text") - clsSelectFunction.SetPackageName("dplyr") - clsSelectFunction.SetRCommand("select") - clsSelectFunction.AddParameter(".data", clsRFunctionParameter:=clsFrequencyTablesFunction, iPosition:=0) - clsSelectFunction.AddParameter("rename_function", bIncludeArgumentName:=False, clsRFunctionParameter:=clsRenameCombineFunction, iPosition:=1) + clsCombineFrequencyParametersFunction.SetRCommand("c") + + clsCombineFunction.SetRCommand("c") + + clsCombineMultipleColumnsFunction.SetRCommand("c") + clsCombineMultipleColumnsFunction.SetAssignTo("multiple_receiver_cols") - clsCombineFrequencyFactorParameterFunction.SetRCommand("c") - clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", - iPosition:=1, bIncludeArgumentName:=False) + clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) clsEmptyOperator.SetOperation("") clsEmptyOperator.AddParameter("multiple_receiver_cols", "multiple_receiver_cols", iPosition:=0) clsEmptyOperator.SetAssignTo("names(list_of_tables)") - clsSecondEmptyOperator.SetOperation("") - clsSecondEmptyOperator.iCallType = 2 - clsSecondEmptyOperator.AddParameter("list_of_tables", "list_of_tables", iPosition:=0) + clsFootnoteCellBodyFunction.SetPackageName("gt") + clsFootnoteCellBodyFunction.SetRCommand("cells_body") - clsDataSelectTildeOperator.SetOperation("~") - clsDataSelectTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) - clsDataSelectTildeOperator.AddParameter("select_function", clsRFunctionParameter:=clsSelectFunction, iPosition:=1) + clsFootnoteCellFunction.SetPackageName("gt") + clsFootnoteCellFunction.SetRCommand("tab_footnote") - clsMmtableTildeOperator.SetOperation("~") - clsMmtableTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) - clsMmtableTildeOperator.AddParameter("mmtable", clsRFunctionParameter:=clsMmtableFunction, iPosition:=1) + clsFootnoteSubtitleLocationFunction.SetPackageName("gt") + clsFootnoteSubtitleLocationFunction.SetRCommand("cells_title") - clsCombineMultipleColumnsFunction.SetRCommand("c") - clsCombineMultipleColumnsFunction.SetAssignTo("multiple_receiver_cols") + clsFootnoteTitleLocationFunction.SetPackageName("gt") + clsFootnoteTitleLocationFunction.SetRCommand("cells_title") - clsSummaryMapFunction.SetPackageName("purrr") - clsSummaryMapFunction.SetRCommand("map") - clsSummaryMapFunction.AddParameter(".x", clsRFunctionParameter:=clsCombineMultipleColumnsFunction, iPosition:=0) - clsSummaryMapFunction.AddParameter(".f", clsROperatorParameter:=clsDataSelectTildeOperator, iPosition:=1) + clsFormatTableMapFunction.SetPackageName("purrr") + clsFormatTableMapFunction.SetRCommand("map") + clsFormatTableMapFunction.AddParameter(".x", "list_of_tables", iPosition:=0) + clsFormatTableMapFunction.AddParameter(".f", clsROperatorParameter:=clsJoiningPipeOperator, iPosition:=1) - clsMmtableMapFunction.SetPackageName("purrr") - clsMmtableMapFunction.SetRCommand("map") - clsMmtableMapFunction.AddParameter(".x", ".", iPosition:=0) - clsMmtableMapFunction.AddParameter(".f", clsROperatorParameter:=clsMmtablePlusOperator, iPosition:=1) + clsFormatTableMappingPipeOperator.SetOperation("%>%") + clsFormatTableMappingPipeOperator.AddParameter("map", clsRFunctionParameter:=clsFormatTableMapFunction, iPosition:=1) + clsFormatTableMappingPipeOperator.SetAssignTo("list_of_tables") - clsMapFrequencyPipeOperator.SetOperation("%>%") - clsMapFrequencyPipeOperator.AddParameter("map_summary_table", clsRFunctionParameter:=clsSummaryMapFunction, iPosition:=1) - clsMapFrequencyPipeOperator.AddParameter("map_mmtable", clsRFunctionParameter:=clsMmtableMapFunction, iPosition:=2) - clsMapFrequencyPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - clsMapFrequencyPipeOperator.SetAssignTo("list_of_tables ") + clsFormatTableTildeOperator.SetOperation("~") + clsFormatTableTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) + clsFormatTableTildeOperator.AddParameter(".x", ".x", iPosition:=1) - clsHeaderTopLeftFunction.SetPackageName("mmtable2") - clsHeaderTopLeftFunction.SetRCommand("header_top_left") + clsGroupByFunction.SetPackageName("dplyr") + clsGroupByFunction.SetRCommand("group_by") + + clsGroupByPipeOperator.SetOperation("%>%") + clsGroupByPipeOperator.AddParameter("skim", clsRFunctionParameter:=clsSkimrFunction, + iPosition:=2, bIncludeArgumentName:=False) + clsGroupByPipeOperator.AddParameter("data", + clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + + clsHeaderFormatFunction.SetPackageName("mmtable2") + clsHeaderFormatFunction.SetRCommand("header_format") + clsHeaderFormatFunction.AddParameter("header", Chr(34) & "all_cols" & Chr(34), iPosition:=0) + clsHeaderFormatFunction.AddParameter("style", clsRFunctionParameter:=clsStyleListFunction, iPosition:=1) clsHeaderLeftTopFunction.SetPackageName("mmtable2") clsHeaderLeftTopFunction.SetRCommand("header_left_top") - clsHeaderTopLeftSummaryVariableFunction.SetPackageName("mmtable2") - clsHeaderTopLeftSummaryVariableFunction.SetRCommand("header_top_left") - clsHeaderTopLeftSummaryVariableFunction.AddParameter("variable", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) + clsHeaderTopLeftFunction.SetPackageName("mmtable2") + clsHeaderTopLeftFunction.SetRCommand("header_top_left") + + clsJoiningPipeOperator.SetOperation("%>%") + clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsFormatTableTildeOperator, iPosition:=0) + clsJoiningPipeOperator.bBrackets = False + + clsMapPipeOperator.SetOperation("%>%") + clsMapPipeOperator.AddParameter("map_summary_table", clsRFunctionParameter:=clsSummaryMapFunction, iPosition:=1) + clsMapPipeOperator.AddParameter("map_mmtable", clsRFunctionParameter:=clsMmtableMapFunction, iPosition:=2) + clsMapPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + clsMapPipeOperator.SetAssignTo("list_of_tables ") clsMmtableFunction.SetPackageName("mmtable2") clsMmtableFunction.SetRCommand("mmtable") clsMmtableFunction.AddParameter("data", ".x", iPosition:=0) clsMmtableFunction.AddParameter("cells", "value", iPosition:=1) - clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) + clsMmtableMapFunction.SetPackageName("purrr") + clsMmtableMapFunction.SetRCommand("map") + clsMmtableMapFunction.AddParameter(".x", ".", iPosition:=0) + clsMmtableMapFunction.AddParameter(".f", clsROperatorParameter:=clsMmtablePlusOperator, iPosition:=1) clsMmtablePlusOperator.SetOperation("+") clsMmtablePlusOperator.bBrackets = False @@ -257,56 +347,115 @@ Public Class dlgDescribeTwoVariable clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftFunction, iPosition:=1) clsMmtablePlusOperator.AddParameter("header_left_top", clsRFunctionParameter:=clsHeaderLeftTopFunction, iPosition:=2) - clsGroupByPipeOperator.SetOperation("%>%") - clsGroupByPipeOperator.AddParameter("skim", clsRFunctionParameter:=clsSkimrFunction, iPosition:=2, bIncludeArgumentName:=False) - clsGroupByPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - - clsGroupByFunction.SetPackageName("dplyr") - clsGroupByFunction.SetRCommand("group_by") - - clsSkimrFunction.SetPackageName("skimr") - clsSkimrFunction.SetRCommand("skim_without_charts") - - clsCombineFunction.SetRCommand("c") + clsMmtableTildeOperator.SetOperation("~") + clsMmtableTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) + clsMmtableTildeOperator.AddParameter("mmtable", clsRFunctionParameter:=clsMmtableFunction, iPosition:=1) - clsFrequencyTablesFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") - clsFrequencyTablesFunction.AddParameter("data_name", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) - clsFrequencyTablesFunction.AddParameter("summaries", Chr(34) & "summary_count" & Chr(34), iPosition:=1) - clsFrequencyTablesFunction.AddParameter("factors", clsRFunctionParameter:=clsCombineFrequencyFactorParameterFunction, iPosition:=2) + clsPipeOperator.SetOperation("%>%") + clsPipeOperator.bBrackets = False + clsRAnovaFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$anova_tables") clsRAnovaFunction.AddParameter("signif.stars", "FALSE", iPosition:=2) clsRAnovaFunction.AddParameter("sign_level", "FALSE", iPosition:=3) clsRAnovaFunction.AddParameter("means", "FALSE", iPosition:=4) - clsSummariesListFunction.SetRCommand("c") - clsSummariesListFunction.AddParameter("summary_count_missing", Chr(34) & "summary_count_missing" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) - clsSummariesListFunction.AddParameter("summary_min", Chr(34) & "summary_min" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) - clsSummariesListFunction.AddParameter("p25", Chr(34) & "p25" & Chr(34), bIncludeArgumentName:=False, iPosition:=2) - clsSummariesListFunction.AddParameter("summary_median", Chr(34) & "summary_median" & Chr(34), bIncludeArgumentName:=False, iPosition:=3) - clsSummariesListFunction.AddParameter("summary_mean", Chr(34) & "summary_mean" & Chr(34), bIncludeArgumentName:=False, iPosition:=4) - clsSummariesListFunction.AddParameter("p75", Chr(34) & "p75" & Chr(34), bIncludeArgumentName:=False, iPosition:=5) - clsSummariesListFunction.AddParameter("summary_max", Chr(34) & "summary_max" & Chr(34), bIncludeArgumentName:=False, iPosition:=6) + clsRCorrelationFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$cor") clsRCustomSummaryFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary") clsRCustomSummaryFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction) - clsRCustomSummaryFunction.AddParameter("store_results", "FALSE", iPosition:=4) clsRCustomSummaryFunction.AddParameter("drop", "TRUE", iPosition:=5) clsRCustomSummaryFunction.AddParameter("na.rm", "FALSE", iPosition:=6) clsRCustomSummaryFunction.AddParameter("return_output", "TRUE", iPosition:=7) - clsRCorrelationFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$cor") + clsRenameFunction.SetPackageName("dplyr") + clsRenameFunction.SetRCommand("rename") + clsRenameFunction.AddParameter(".data", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=0) + clsRenameFunction.AddParameter("by_var", ".x", iPosition:=1) - clsRAnovaFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$anova_tables") + clsSecondEmptyOperator.SetOperation("") + clsSecondEmptyOperator.iCallType = 2 + clsSecondEmptyOperator.AddParameter("list_of_tables", "list_of_tables", iPosition:=0) + + clsSecondFootnoteCellBodyFunction.SetPackageName("gt") + clsSecondFootnoteCellBodyFunction.SetRCommand("cells_body") + + clsSecondFootnoteCellFunction.SetPackageName("gt") + clsSecondFootnoteCellFunction.SetRCommand("tab_footnote") + + clsSecondHeaderFunction.SetPackageName("mmtable2") + clsSecondHeaderFunction.SetRCommand("header_left_top") + + clsSkimrFunction.SetPackageName("skimr") + clsSkimrFunction.SetRCommand("skim_without_charts") + + clsStubHeadFunction.SetPackageName("gt") + clsStubHeadFunction.SetRCommand("tab_stubhead") + + clsStyleListFunction.SetRCommand("list") + + clsSummariesListFunction.SetRCommand("c") + clsSummariesListFunction.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), + bIncludeArgumentName:=False, iPosition:=0) + + clsSummaryMapFunction.SetPackageName("purrr") + clsSummaryMapFunction.SetRCommand("map") + clsSummaryMapFunction.AddParameter(".x", clsRFunctionParameter:=clsCombineMultipleColumnsFunction, iPosition:=0) + clsSummaryMapFunction.AddParameter(".f", clsROperatorParameter:=clsSummaryTildeOperator, iPosition:=1) + + clsSummaryTableCombineFactorsFunction.SetRCommand("c") + + clsSummaryTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") + clsSummaryTableFunction.AddParameter("factors", clsRFunctionParameter:=clsSummaryTableCombineFactorsFunction, iPosition:=2) + + clsSummaryTildeOperator.SetOperation("~") + clsSummaryTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) + + clsTableSourcenoteFunction.SetPackageName("gt") + clsTableSourcenoteFunction.SetRCommand("tab_source_note") + + clsTableTitleFunction.SetPackageName("gt") + clsTableTitleFunction.SetRCommand("tab_header") + + clsTabFootnoteOperator.SetOperation("%>%") + clsTabFootnoteOperator.bBrackets = False + + clsTabFootnoteTitleFunction.SetPackageName("gt") + clsTabFootnoteTitleFunction.SetRCommand("tab_footnote") + + clsTabFootnoteSubtitleFunction.SetPackageName("gt") + clsTabFootnoteSubtitleFunction.SetRCommand("tab_footnote") + + clsTabOptionsFunction.SetPackageName("gt") + clsTabOptionsFunction.SetRCommand("tab_options") + + clsTabStyleCellTextFunction.SetPackageName("gt") + clsTabStyleCellTextFunction.SetRCommand("cell_text") + clsTabStyleCellTextFunction.AddParameter("size", clsRFunctionParameter:=clsTabStylePxFunction, iPosition:=0) + + clsTabStyleCellTitleFunction.SetPackageName("gt") + clsTabStyleCellTitleFunction.SetRCommand("cells_title") + clsTabStyleCellTitleFunction.AddParameter("groups", Chr(34) & "title" & Chr(34), iPosition:=0) + + clsTabStyleFunction.SetRCommand("tab_style") + clsTabStyleFunction.SetPackageName("gt") + clsTabStyleFunction.AddParameter("style", clsRFunctionParameter:=clsTabStyleCellTextFunction, iPosition:=0) + clsTabStyleFunction.AddParameter("location", clsRFunctionParameter:=clsTabStyleCellTitleFunction, iPosition:=1) + + clsTabStylePxFunction.SetPackageName("gt") + clsTabStylePxFunction.SetRCommand("px") + clsTabStylePxFunction.AddParameter("size", "18", bIncludeArgumentName:=False, iPosition:=0) + + clsThreeVariableCombineFrequencyParametersFunction.SetRCommand("c") ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) bResetSubdialog = True End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=1) - ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=2) - ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsCombineFrequencyFactorParameterFunction, New RParameter("factor_one", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=3) + bRcodeSet = False + ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsRAnovaFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=1) + ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=2) ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsRAnovaFunction, New RParameter("x_col_names", 1), iAdditionalPairNo:=1) ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("x_col_names", 1), iAdditionalPairNo:=2) @@ -314,42 +463,59 @@ Public Class dlgDescribeTwoVariable ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1) ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRCustomSummaryFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) + ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=3) + ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsFormatTableMappingPipeOperator, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=4) + + + ucrChkDisplayMargins.AddAdditionalCodeParameterPair(clsThreeVariableCombineFrequencyParametersFunction, ucrChkDisplayMargins.GetParameter, iAdditionalPairNo:=1) + + ucrNudSigFigs.AddAdditionalCodeParameterPair(clsThreeVariableCombineFrequencyParametersFunction, ucrNudSigFigs.GetParameter, iAdditionalPairNo:=1) ucrChkOmitMissing.SetRCode(clsRCustomSummaryFunction, bReset) ucrReceiverFirstVars.SetRCode(clsRCustomSummaryFunction, bReset) - ucrReceiverSecondVar.SetRCode(clsRCustomSummaryFunction, bReset) + ucrReceiverSecondTwoVariableFactor.SetRCode(clsRCustomSummaryFunction, bReset) ucrSelectorDescribeTwoVar.SetRCode(clsRCorrelationFunction, bReset) - ucrReceiverSecondOpt.SetRCode(clsGroupByFunction, bReset) - ucrReceiverSecondFactor.SetRCode(clsGroupByFunction, bReset) + ucrReceiverSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset) + ucrReceiverSecondSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset) ucrChkDisplayMargins.SetRCode(clsCombineFrequencyParametersFunction, bReset) ucrChkDisplayAsPercentage.SetRCode(clsCombineFrequencyParametersFunction, bReset) ucrReceiverPercentages.SetRCode(clsCombineFrequencyParametersFunction, bReset) ucrChkPercentageProportion.SetRCode(clsCombineFrequencyParametersFunction, bReset) + ucrChkThreeVariableDisplayAsPercentage.SetRCode(clsThreeVariableCombineFrequencyParametersFunction, bReset) + ucrReceiverThreeVariablePercentage.SetRCode(clsThreeVariableCombineFrequencyParametersFunction, bReset) + ucrChkThreeVariablePercentageProportion.SetRCode(clsThreeVariableCombineFrequencyParametersFunction, bReset) ucrPnlDescribe.SetRCode(clsDummyFunction, bReset) ucrNudSigFigs.SetRCode(clsCombineFrequencyParametersFunction, bReset) - Results() + bRcodeSet = True End Sub Public Sub TestOKEnabled() - If rdoCustomize.Checked Then - If ((Not ucrReceiverSecondVar.IsEmpty()) AndAlso (Not ucrReceiverFirstVars.IsEmpty())) Then - If ((strFirstVariablesType = "numeric" OrElse strFirstVariablesType = "integer") AndAlso (strSecondVariableType = "factor")) AndAlso clsSummariesListFunction.clsParameters.Count = 0 Then - ucrBase.OKEnabled(False) - Else - ucrBase.OKEnabled(True) - End If - Else - ucrBase.OKEnabled(False) - End If - Else - If ucrReceiverFirstVars.IsEmpty Then - ucrBase.OKEnabled(False) - Else - ucrBase.OKEnabled(True) - End If - End If + ucrBase.OKEnabled(Not ucrReceiverFirstVars.IsEmpty AndAlso ( + (rdoTwoVariable.Checked _ + AndAlso Not ucrReceiverSecondTwoVariableFactor.IsEmpty) _ + OrElse rdoSkim.Checked _ + OrElse (Not ucrReceiverThreeVariableSecondFactor.IsEmpty _ + AndAlso Not ucrReceiverThreeVariableThirdVariable.IsEmpty) _ + AndAlso (IsCategoricalByCategorical() OrElse IsNumericByCategorical() _ + OrElse IsCategoricalByNumeric()))) End Sub + Private Function IsCategoricalByCategorical() As Boolean + Return strFirstVariablesType = "categorical" AndAlso strSecondVariableType = "categorical" + End Function + + Private Function IsCategoricalByNumeric() As Boolean + Return strFirstVariablesType = "categorical" AndAlso strSecondVariableType = "numeric" + End Function + + Private Function IsNumericByCategorical() As Boolean + Return strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "categorical" + End Function + + Private Function IsNumericByNumeric() As Boolean + Return strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "numeric" + End Function + Private Sub ucrBaseDescribeTwoVar_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() SetRCodeForControls(True) @@ -357,121 +523,151 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub cmdSummaries_Click(sender As Object, e As EventArgs) Handles cmdSummaries.Click - sdgSummaries.SetRFunction(clsSummariesListFunction, clsRCustomSummaryFunction, clsCombineFunction, ucrSelectorDescribeTwoVar, bResetSubdialog) + If rdoTwoVariable.Checked Then + If IsNumericByCategorical() Then + sdgSummaries.SetRFunction(clsSummariesListFunction, clsSummaryTableFunction, clsCombineFunction, ucrSelectorDescribeTwoVar, bResetSubdialog) + End If + ElseIf rdoThreeVariable.Checked Then + If IsCategoricalByNumeric() OrElse IsNumericByCategorical() Then + sdgSummaries.SetRFunction(clsSummariesListFunction, clsSummaryTableFunction, clsCombineFunction, ucrSelectorDescribeTwoVar, bResetSubdialog) + End If + End If bResetSubdialog = False sdgSummaries.ShowDialog() TestOKEnabled() End Sub Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) - sdgDescribeDisplay.SetRFunction(clsFrequencyTablesFunction, clsRAnovaFunction, bResetSubdialog) + sdgDescribeDisplay.SetRFunction(clsSummaryTableFunction, clsRAnovaFunction, bResetSubdialog) bResetSubdialog = False sdgDescribeDisplay.ShowDialog() TestOKEnabled() End Sub - Public Sub Results() - Dim lstFirstItemTypes As List(Of String) + Private Sub ManageControlsVisibility() + grpSummaries.Visible = rdoThreeVariable.Checked OrElse rdoTwoVariable.Checked + + If rdoTwoVariable.Checked Then + ucrChkOmitMissing.Visible = strFirstVariablesType = "numeric" + grpOptions.Visible = IsNumericByCategorical() + ElseIf rdoThreeVariable.Checked Then + grpOptions.Visible = IsCategoricalByNumeric() OrElse IsNumericByCategorical() + Else + grpOptions.Visible = False + End If + End Sub + + Private Sub ChangeBaseRCode() ucrBase.clsRsyntax.RemoveFromAfterCodes(clsEmptyOperator) ucrBase.clsRsyntax.RemoveFromAfterCodes(clsSecondEmptyOperator) - If rdoCustomize.Checked Then - grpSummaries.Visible = True - If Not ucrReceiverFirstVars.IsEmpty() Then - lstFirstItemTypes = ucrReceiverFirstVars.GetCurrentItemTypes(True, bIsCategoricalNumeric:=True) - If lstFirstItemTypes.Count = 1 AndAlso lstFirstItemTypes.Contains("logical") Then - lstFirstItemTypes(0) = "categorical" - Else - lstFirstItemTypes.RemoveAll(Function(x) x.Contains("logical")) - End If - If (lstFirstItemTypes.Count > 0) Then - strFirstVariablesType = lstFirstItemTypes(0) - Else - strFirstVariablesType = "" - End If - lblFirstType.Text = strFirstVariablesType - lblFirstType.ForeColor = SystemColors.Highlight - Else - strFirstVariablesType = "" - lblFirstType.Text = "________" - lblFirstType.ForeColor = SystemColors.ControlText - End If - If Not ucrReceiverSecondVar.IsEmpty() Then - strSecondVariableType = ucrReceiverSecondVar.strCurrDataType - If strSecondVariableType.Contains("factor") OrElse strSecondVariableType.Contains("character") OrElse strSecondVariableType.Contains("logical") Then - strSecondVariableType = "categorical" - Else - strSecondVariableType = "numeric" - End If - lblSecondType.Text = strSecondVariableType - lblSecondType.ForeColor = SystemColors.Highlight - Else - strSecondVariableType = "" - lblSecondType.Text = "________" - lblSecondType.ForeColor = SystemColors.ControlText - End If + AddFormatTableMapToAfterCode() - If strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "numeric" Then - grpOptions.Visible = True - cmdSummaries.Visible = False - ucrChkOmitMissing.Visible = True + If rdoSkim.Checked Then + clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) + ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) + ElseIf rdoTwoVariable.Checked Then + clsDummyFunction.AddParameter("checked", "customize", iPosition:=0) + If IsNumericByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRCorrelationFunction) - lblSummaryName.Text = "Correlations" - lblSummaryName.ForeColor = SystemColors.Highlight - ElseIf strFirstVariablesType = "categorical" AndAlso strSecondVariableType = "numeric" Then - grpOptions.Visible = False + ElseIf IsCategoricalByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRAnovaFunction) - lblSummaryName.Text = "ANOVA tables" - lblSummaryName.ForeColor = SystemColors.Highlight - ElseIf strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "categorical" Then - grpOptions.Visible = True - cmdSummaries.Visible = True - ucrChkOmitMissing.Visible = True - ucrBase.clsRsyntax.SetBaseRFunction(clsRCustomSummaryFunction) - ucrReceiverFirstVars.SetParameterIsString() - lblSummaryName.Text = "Numerical summaries" - lblSummaryName.ForeColor = SystemColors.Highlight - ElseIf strFirstVariablesType = "categorical" AndAlso strSecondVariableType = "categorical" Then - grpOptions.Visible = False - ucrBase.clsRsyntax.SetBaseROperator(clsMapFrequencyPipeOperator) + ElseIf IsNumericByCategorical() OrElse IsCategoricalByCategorical() Then + If IsNumericByCategorical() Then + ucrReceiverFirstVars.SetParameterIsString() + clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=1) + Else + clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsRenameFunction, iPosition:=1) + End If + ucrBase.clsRsyntax.SetBaseROperator(clsMapPipeOperator) ucrBase.clsRsyntax.AddToAfterCodes(clsEmptyOperator, 1) - ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 2) - lblSummaryName.Text = "Frequency tables" - lblSummaryName.ForeColor = SystemColors.Highlight - Else - grpOptions.Visible = False - lblSummaryName.Text = "__________" - lblSummaryName.ForeColor = SystemColors.ControlText + ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 3) End If - Else - grpOptions.Visible = False - grpSummaries.Visible = False + ElseIf rdoThreeVariable.Checked Then + clsDummyFunction.AddParameter("checked", "three_variable", iPosition:=0) + If IsCategoricalByNumeric() OrElse IsCategoricalByCategorical() Then + clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsRenameFunction, iPosition:=1) + ElseIf IsNumericByCategorical() Then + clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=1) + End If + ucrBase.clsRsyntax.SetBaseROperator(clsMapPipeOperator) + ucrBase.clsRsyntax.AddToAfterCodes(clsEmptyOperator, 1) + ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 3) + End If + End Sub + + Private Sub AddFormatTableMapToAfterCode() + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsFormatTableMappingPipeOperator) + If rdoSkim.Checked OrElse IsNothing(clsJoiningPipeOperator.GetParameter("pipe")) Then + Exit Sub + End If + + If IsNumericByCategorical() OrElse IsCategoricalByCategorical() _ + OrElse (IsCategoricalByNumeric() AndAlso rdoThreeVariable.Checked) Then + ucrBase.clsRsyntax.AddToAfterCodes(clsFormatTableMappingPipeOperator, 2) End If - autoTranslate(Me) End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstVars.ControlContentsChanged, ucrReceiverSecondVar.ControlContentsChanged, ucrPnlDescribe.ControlContentsChanged - If Not ucrReceiverFirstVars.IsEmpty AndAlso (ucrChangedControl Is ucrReceiverFirstVars OrElse ucrChangedControl Is ucrReceiverSecondVar) Then - Dim iPosition As Integer = 0 - clsCombineMultipleColumnsFunction.ClearParameters() - clsCombineFactorsFunction.ClearParameters() + Private Sub UpdateCombineFactorFunctions() + If rdoSkim.Checked OrElse ucrReceiverFirstVars.IsEmpty Then + Exit Sub + End If + + Dim iPosition As Integer = 0 + clsCombineMultipleColumnsFunction.ClearParameters() + For Each strColumn In ucrReceiverFirstVars.GetVariableNamesList() + clsCombineMultipleColumnsFunction.AddParameter(strColumn, strColumn, bIncludeArgumentName:=False, iPosition:=iPosition) + iPosition += 1 + Next + End Sub - For Each strColumn In ucrReceiverFirstVars.GetVariableNamesList() - clsCombineMultipleColumnsFunction.AddParameter(strColumn, strColumn, bIncludeArgumentName:=False, iPosition:=iPosition) - If ucrReceiverSecondVar.GetVariableNames <> strColumn Then - clsCombineFactorsFunction.AddParameter(strColumn, strColumn, bIncludeArgumentName:=False, iPosition:=iPosition) + Private Sub UpdateCombineFactorParameterFunction() + clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_one") + clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_two") + clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_three") + If rdoTwoVariable.Checked Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", + ucrReceiverSecondTwoVariableFactor.GetVariableNames(), iPosition:=0, + bIncludeArgumentName:=False) + If strFirstVariablesType = "categorical" Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", + ".x", iPosition:=1, + bIncludeArgumentName:=False) + End If + ElseIf rdoThreeVariable.Checked Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", + ucrReceiverThreeVariableSecondFactor.GetVariableNames(), iPosition:=0, + bIncludeArgumentName:=False) + If strSecondVariableType = "categorical" Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", + ucrReceiverThreeVariableThirdVariable.GetVariableNames(), iPosition:=1, + bIncludeArgumentName:=False) + End If + If IsCategoricalByCategorical() Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_three", + ".x", iPosition:=2, + bIncludeArgumentName:=False) + End If + If IsCategoricalByNumeric() Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", + ".x", iPosition:=1, + bIncludeArgumentName:=False) + End If + End If + End Sub + + Private Sub AddRemoveNAParameter() + clsSummaryTableFunction.RemoveParameterByName("na.rm") + If ucrChkOmitMissing.Checked Then + If rdoTwoVariable.Checked Then + If IsNumericByCategorical() Then + clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=3) + End If + ElseIf rdoThreeVariable.Checked Then + If IsNumericByCategorical() OrElse IsCategoricalByNumeric() Then + clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=3) End If - iPosition += 1 - Next - clsCombineFactorsFunction.AddParameter(ucrReceiverSecondVar.GetVariableNames, ucrReceiverSecondVar.GetVariableNames, - bIncludeArgumentName:=False, iPosition:=iPosition) + End If End If - SwapMmtableHeaderFunctions() - Results() - EnableDisableFrequencyControls() - AddRemoveFrequencyParameters() - ChangeLocations() - MissingOptions() - TestOKEnabled() End Sub Private Sub ucrChkOmitMissing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkOmitMissing.ControlValueChanged @@ -480,61 +676,64 @@ Public Class dlgDescribeTwoVariable Else clsRCorrelationFunction.RemoveParameterByName("use") End If - If Not ucrChkOmitMissing.Checked Then - clsRCustomSummaryFunction.RemoveParameterByName("na_type") - clsRCustomSummaryFunction.RemoveParameterByName("na_max_n") - clsRCustomSummaryFunction.RemoveParameterByName("na_min_n") - clsRCustomSummaryFunction.RemoveParameterByName("na_max_prop") - clsRCustomSummaryFunction.RemoveParameterByName("na_consecutive_n") - Else - clsRCustomSummaryFunction.AddParameter("na_type", clsRFunctionParameter:=clsCombineFunction, iPosition:=9) - End If - MissingOptions() - End Sub - - Private Sub MissingOptions() - If ucrChkOmitMissing.Checked AndAlso strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "categorical" Then - cmdMissingOptions.Enabled = True - Else - cmdMissingOptions.Enabled = False - End If + AddRemoveNAParameter() End Sub Private Sub ucrPnlDescribe_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDescribe.ControlValueChanged ucrReceiverFirstVars.Clear() ucrReceiverFirstVars.SetMeAsReceiver() + ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) If rdoSkim.Checked Then - clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) ucrReceiverFirstVars.SetSingleTypeStatus(False) - ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) - ElseIf rdoCustomize.Checked Then - clsDummyFunction.AddParameter("checked", "customize", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsRCustomSummaryFunction) - ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) + ElseIf rdoThreeVariable.Checked Then + lblThreeVariableCategorical.Visible = True + lblThreeVariableCategorical.Location = New Point(106, 16) + lblSecondType.Location = New Point(12, 33) + lblSecondBy.Visible = True Else - clsDummyFunction.AddParameter("checked", "three_variable", iPosition:=0) + lblThreeVariableCategorical.Visible = False + lblThreeVariableCategorical.Location = New Point(12, 33) + lblSecondType.Location = New Point(106, 18) + lblSecondBy.Visible = False End If + ChangeFirstTypeLabel() + AssignSecondVariableType() + ChangeBaseRCode() + ManageControlsVisibility() + UpdateSummaryTableFunction() + UpdateCombineFactorParameterFunction() ChangeLocations() + EnableDisableFrequencyControls() + SwapMmtableHeaderFunctions() + AddRemoveNAParameter() + HideFormatTableButton() + End Sub + + Private Sub HideFormatTableButton() + cmdFormatTable.Visible = IsNumericByCategorical() _ + OrElse IsCategoricalByCategorical() OrElse (IsCategoricalByNumeric() _ + AndAlso rdoThreeVariable.Checked) End Sub Private Sub ChangeLocations() If rdoSkim.Checked Then ucrBase.Location = New Point(iUcrBaseXLocation, 328) - Me.Size = New System.Drawing.Point(iDialogueXsize, 425) + Me.Size = New Point(iDialogueXsize, 425) Else - If strFirstVariablesType = "categorical" AndAlso - strSecondVariableType = "categorical" Then + + If IsNumericByCategorical() OrElse IsCategoricalByCategorical() _ + OrElse (IsCategoricalByNumeric() AndAlso rdoThreeVariable.Checked) Then ucrBase.Location = New Point(iUcrBaseXLocation, 435) - Me.Size = New System.Drawing.Point(iDialogueXsize, 530) - Else + Me.Size = New Point(iDialogueXsize, 530) + ElseIf IsCategoricalByNumeric() Then ucrBase.Location = New Point(iUcrBaseXLocation, 328) - Me.Size = New System.Drawing.Point(iDialogueXsize, 425) + Me.Size = New Point(iDialogueXsize, 425) End If End If End Sub - Private Sub ucrReceiverSecondOpt_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSecondOpt.ControlValueChanged - If ucrReceiverSecondOpt.IsEmpty Then + Private Sub ucrReceiverSecondOpt_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSkimrGroupByFactor.ControlValueChanged + If ucrReceiverSkimrGroupByFactor.IsEmpty Then clsGroupByPipeOperator.RemoveParameterByName("group") Else clsGroupByPipeOperator.AddParameter("group", clsRFunctionParameter:=clsGroupByFunction, iPosition:=1, bIncludeArgumentName:=False) @@ -542,71 +741,146 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub EnableDisableFrequencyControls() - If rdoCustomize.Checked Then - If strFirstVariablesType = "categorical" AndAlso strSecondVariableType = "categorical" Then - grpDisplay.Visible = True - grpFrequency.Visible = True - ucrChkDisplayMargins.Visible = True - ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked - Else - ucrReceiverFirstVars.SetMeAsReceiver() - DisableFrequencyControls() - End If - Else - DisableFrequencyControls() - End If - End Sub - - Private Sub DisableFrequencyControls() - grpDisplay.Visible = False - grpFrequency.Visible = False - ucrChkDisplayMargins.Visible = False - ucrInputMarginName.Visible = False + grpThreeVariablePercentages.Visible = rdoThreeVariable.Checked _ + AndAlso IsCategoricalByCategorical() + grpTwoVariablePercentages.Visible = rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ + OrElse IsNumericByCategorical()) + grpFrequency.Visible = (rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ + OrElse IsNumericByCategorical())) OrElse (rdoThreeVariable.Checked _ + AndAlso (IsNumericByCategorical() OrElse IsCategoricalByNumeric() _ + OrElse IsCategoricalByCategorical())) + ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked End Sub Private Sub SwapMmtableHeaderFunctions() - If rdoCustomize.Checked Then - clsMmtablePlusOperator.RemoveParameterByName("summary_variable") - clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftFunction, iPosition:=1) - If Not ucrReceiverSecondVar.IsEmpty Then + If rdoSkim.Checked Then + Exit Sub + End If + Dim ucrReceiverSecondFactor As ucrReceiverSingle = If(rdoTwoVariable.Checked, + ucrReceiverSecondTwoVariableFactor, ucrReceiverThreeVariableSecondFactor) + Dim strFactor As String = ucrReceiverSecondFactor.GetVariableNames + Dim strLeftTop As String = "" + Dim strTopLeft As String = "" + Dim strSecondHeader As String = "" + + clsMmtablePlusOperator.RemoveParameterByName("second_header_function") + + If rdoTwoVariable.Checked Then + If IsNumericByCategorical() Then + If ucrNudColumnFactors.GetText = 1 Then + strLeftTop = Chr(39) & "summary-variable" & Chr(39) + strTopLeft = strFactor + Else + strTopLeft = Chr(39) & "summary-variable" & Chr(39) + strLeftTop = strFactor + End If + ElseIf IsCategoricalByCategorical() Then If ucrNudColumnFactors.GetText = 1 Then - clsHeaderLeftTopFunction.AddParameter("variable", Chr(39) & "by_var" & Chr(39), iPosition:=0) - clsHeaderTopLeftFunction.AddParameter("variable", ucrReceiverSecondVar.GetVariableNames(), iPosition:=0) + strTopLeft = Chr(39) & "by_var" & Chr(39) + strLeftTop = strFactor + ElseIf ucrNudColumnFactors.GetText = 2 Then + strLeftTop = Chr(39) & "by_var" & Chr(39) + strTopLeft = strFactor + End If + End If + Else + If IsCategoricalByCategorical() Then + If ucrNudColumnFactors.GetText = 1 Then + clsSecondHeaderFunction.strRCommand = "header_left_top" + strLeftTop = Chr(39) & "by_var" & Chr(39) + strTopLeft = strFactor + ElseIf ucrNudColumnFactors.GetText = 2 Then + strLeftTop = strFactor + strTopLeft = Chr(39) & "by_var" & Chr(39) + clsSecondHeaderFunction.strRCommand = "header_top_left" + End If + strSecondHeader = ucrReceiverThreeVariableThirdVariable.GetVariableNames() + ElseIf IsNumericByCategorical() Then + If ucrNudColumnFactors.GetText = 1 Then + clsSecondHeaderFunction.strRCommand = "header_top_left" + strLeftTop = ucrReceiverThreeVariableThirdVariable.GetVariableNames() + strTopLeft = strFactor + ElseIf ucrNudColumnFactors.GetText = 2 Then + clsSecondHeaderFunction.strRCommand = "header_left_top" + strTopLeft = ucrReceiverThreeVariableThirdVariable.GetVariableNames() + strLeftTop = strFactor + End If + strSecondHeader = Chr(34) & "summary-variable" & Chr(34) + ElseIf IsCategoricalByNumeric() Then + If ucrNudColumnFactors.GetText = 1 Then + clsSecondHeaderFunction.strRCommand = "header_top_left" + strTopLeft = Chr(39) & "by_var" & Chr(39) + strLeftTop = strFactor + ElseIf ucrNudColumnFactors.GetText = 2 Then - clsHeaderTopLeftFunction.AddParameter("variable", Chr(39) & "by_var" & Chr(39), iPosition:=0) - clsHeaderLeftTopFunction.AddParameter("variable", ucrReceiverSecondVar.GetVariableNames(), iPosition:=0) + clsSecondHeaderFunction.strRCommand = "header_left_top" + strLeftTop = Chr(39) & "by_var" & Chr(39) + strTopLeft = strFactor End If + strSecondHeader = Chr(34) & "summary-variable" & Chr(34) End If End If + clsHeaderTopLeftFunction.AddParameter("variable", strLeftTop, iPosition:=0) + clsHeaderLeftTopFunction.AddParameter("variable", strTopLeft, iPosition:=0) + + If strSecondHeader <> "" Then + clsSecondHeaderFunction.AddParameter("variable", strSecondHeader, iPosition:=0) + clsMmtablePlusOperator.AddParameter("second_header_function", + clsRFunctionParameter:=clsSecondHeaderFunction, iPosition:=3) + End If End Sub Private Sub AddRemoveFrequencyParameters() - If strFirstVariablesType = "categorical" AndAlso strSecondVariableType = "categorical" Then - For Each strParameter In lstFrequencyParameters - clsFrequencyTablesFunction.RemoveParameterByName(strParameter) - Next - For Each clsParameter In clsCombineFrequencyParametersFunction.clsParameters - clsFrequencyTablesFunction.AddParameter(clsParameter) - Next + If rdoSkim.Checked Then + Exit Sub End If + + For Each strParameter In lstFrequencyParameters + clsSummaryTableFunction.RemoveParameterByName(strParameter) + Next + + Dim clsTempFrequency As RFunction = If(rdoThreeVariable.Checked, + clsThreeVariableCombineFrequencyParametersFunction, + clsCombineFrequencyParametersFunction).Clone + + For Each clsParameter In clsTempFrequency.clsParameters + If IsCategoricalByCategorical() Then + clsSummaryTableFunction.AddParameter(clsParameter) + Else + If IsNumericByCategorical() OrElse IsCategoricalByNumeric() Then + Select Case clsParameter.strArgumentName + Case "signif_fig", "include_margins", "margin_name" + clsSummaryTableFunction.AddParameter(clsParameter) + End Select + End If + End If + Next End Sub Private Sub Frequencies_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkPercentageProportion.ControlValueChanged, ucrChkDisplayAsPercentage.ControlValueChanged, ucrNudSigFigs.ControlValueChanged, ucrChkDisplayMargins.ControlValueChanged, - ucrReceiverPercentages.ControlValueChanged, ucrInputMarginName.ControlValueChanged - If rdoCustomize.Checked Then + ucrReceiverPercentages.ControlValueChanged, ucrInputMarginName.ControlValueChanged, ucrChkThreeVariablePercentageProportion.ControlValueChanged, ucrChkThreeVariableDisplayAsPercentage.ControlValueChanged + If rdoTwoVariable.Checked Then If ucrChkDisplayAsPercentage.Checked Then ucrReceiverPercentages.SetMeAsReceiver() Else ucrReceiverFirstVars.SetMeAsReceiver() End If + ElseIf rdoThreeVariable.Checked Then + If ucrChkThreeVariableDisplayAsPercentage.Checked Then + ucrReceiverThreeVariablePercentage.SetMeAsReceiver() + Else + ucrReceiverFirstVars.SetMeAsReceiver() + End If End If If ucrChkDisplayMargins.Checked Then ucrInputMarginName.Visible = True clsCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) + clsThreeVariableCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) Else ucrInputMarginName.Visible = False clsCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") + clsThreeVariableCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") End If AddRemoveFrequencyParameters() End Sub @@ -617,13 +891,255 @@ Public Class dlgDescribeTwoVariable Private Sub ucrSelectorDescribeTwoVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDescribeTwoVar.ControlValueChanged clsGroupByPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - clsMapFrequencyPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - clsFrequencyTablesFunction.AddParameter("data_name", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + clsMapPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) End Sub - Private Sub cmdMissingOptions_Click(sender As Object, e As EventArgs) Handles cmdMissingOptions.Click - sdgMissingOptions.SetRFunction(clsNewSummaryFunction:=clsRCustomSummaryFunction, clsNewConcFunction:=clsCombineFunction, bReset:=bResetSubdialog) - bResetSubdialog = False - sdgMissingOptions.ShowDialog() + Private Sub UpdateSummaryTableFunction() + If rdoSkim.Checked Then + Exit Sub + End If + clsSummaryTableFunction.RemoveParameterByName("columns_to_summarise") + If rdoTwoVariable.Checked Then + If IsCategoricalByCategorical() Then + clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=1) + ElseIf IsNumericByCategorical() Then + clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=1) + clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x", iPosition:=3) + End If + ElseIf rdoThreeVariable.Checked Then + If IsCategoricalByNumeric() Then + clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=1) + clsSummaryTableFunction.AddParameter("columns_to_summarise", ucrReceiverThreeVariableThirdVariable.GetVariableNames(), iPosition:=3) + ElseIf IsCategoricalByCategorical() Then + clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=1) + ElseIf IsNumericByCategorical() Then + clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=1) + clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x", iPosition:=3) + End If + End If + End Sub + + Private Sub ucrReceiverNumericVariable_ControlValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverThreeVariableThirdVariable.ControlValueChanged, + ucrReceiverThreeVariableThirdVariable.ControlContentsChanged + AssignSecondVariableType() + ManageControlsVisibility() + UpdateCombineFactorParameterFunction() + ChangeBaseRCode() + ChangeLocations() + EnableDisableFrequencyControls() + UpdateSummaryTableFunction() + SwapMmtableHeaderFunctions() + AddRemoveFrequencyParameters() + EnableDisableFrequencyControls() + AddRemoveNAParameter() + HideFormatTableButton() + TestOKEnabled() + End Sub + + Private Sub ChangeSumaryLabelText() + If rdoSkim.Checked Then + Exit Sub + End If + Dim strSummaryName As String = "" + + If IsCategoricalByCategorical() Then + strSummaryName = "Frequency tables" + ElseIf IsNumericByCategorical() Then + strSummaryName = "Summary tables" + Else + If rdoTwoVariable.Checked Then + If IsNumericByNumeric() Then + strSummaryName = "Correlations" + ElseIf IsCategoricalByNumeric() Then + strSummaryName = "ANOVA tables" + Else + strSummaryName = "" + End If + ElseIf rdoThreeVariable.Checked Then + If IsCategoricalByNumeric() Then + strSummaryName = "Summary tables" + Else + strSummaryName = "" + End If + End If + End If + + If strSummaryName <> "" Then + lblSummaryName.Text = strSummaryName + lblSummaryName.ForeColor = SystemColors.Highlight + Else + lblSummaryName.Text = "__________" + lblSummaryName.ForeColor = SystemColors.ControlText + End If + autoTranslate(Me) + End Sub + + Private Sub AssignSecondVariableType() + If rdoTwoVariable.Checked OrElse rdoThreeVariable.Checked Then + Dim ucrCurrentReceiver As ucrReceiverSingle = If(rdoTwoVariable.Checked, + ucrReceiverSecondTwoVariableFactor, ucrReceiverThreeVariableThirdVariable) + If Not ucrCurrentReceiver.IsEmpty Then + strSecondVariableType = If({"factor", "character", "logical"}.Contains(ucrCurrentReceiver.strCurrDataType), + "categorical", "numeric") + lblSecondType.Text = strSecondVariableType + lblSecondType.ForeColor = SystemColors.Highlight + + Else + strSecondVariableType = "" + lblSecondType.Text = "________" + lblSecondType.ForeColor = SystemColors.ControlText + End If + ChangeSumaryLabelText() + End If + ManageControlsVisibility() + End Sub + + Private Sub ucrReceiverSecondTwoVariableFactor_ValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSecondTwoVariableFactor.ControlValueChanged, + ucrReceiverSecondTwoVariableFactor.ControlContentsChanged + AssignSecondVariableType() + ChangeBaseRCode() + UpdateSummaryTableFunction() + UpdateCombineFactorParameterFunction() + ChangeLocations() + EnableDisableFrequencyControls() + SwapMmtableHeaderFunctions() + AddRemoveNAParameter() + HideFormatTableButton() + TestOKEnabled() + End Sub + + Private Sub ChangeFirstTypeLabel() + Dim lstFirstItemTypes As List(Of String) + If Not ucrReceiverFirstVars.IsEmpty() Then + lstFirstItemTypes = ucrReceiverFirstVars.GetCurrentItemTypes(True, bIsCategoricalNumeric:=True) + If lstFirstItemTypes.Count = 1 AndAlso lstFirstItemTypes.Contains("logical") Then + lstFirstItemTypes(0) = "categorical" + Else + lstFirstItemTypes.RemoveAll(Function(x) x.Contains("logical")) + End If + If (lstFirstItemTypes.Count > 0) Then + strFirstVariablesType = lstFirstItemTypes(0) + Else + strFirstVariablesType = "" + End If + Else + strFirstVariablesType = "" + End If + + If strFirstVariablesType <> "" Then + lblFirstType.Text = strFirstVariablesType + lblFirstType.ForeColor = SystemColors.Highlight + Else + lblFirstType.Text = "________" + lblFirstType.ForeColor = SystemColors.ControlText + End If + End Sub + + Private Sub ucrReceiverFirstVars_ControlValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstVars.ControlValueChanged, + ucrReceiverFirstVars.ControlContentsChanged + ChangeFirstTypeLabel() + ChangeSumaryLabelText() + UpdateSummaryTableFunction() + UpdateCombineFactorParameterFunction() + ChangeBaseRCode() + ManageControlsVisibility() + UpdateCombineFactorFunctions() + ChangeLocations() + EnableDisableFrequencyControls() + SwapMmtableHeaderFunctions() + AddRemoveFrequencyParameters() + AddRemoveNAParameter() + HideFormatTableButton() + TestOKEnabled() + End Sub + + Private Sub ucrReceiverThreeVariableSecondFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverThreeVariableSecondFactor.ControlValueChanged + UpdateCombineFactorParameterFunction() + SwapMmtableHeaderFunctions() + End Sub + + Private Sub controls_contentChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayAsPercentage.ControlContentsChanged, + ucrReceiverPercentages.ControlContentsChanged, + ucrChkThreeVariableDisplayAsPercentage.ControlContentsChanged, ucrReceiverThreeVariableSecondFactor.ControlContentsChanged + TestOKEnabled() + End Sub + + Private Sub ucrReceiverSecondTwoVariableFactor_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverSecondTwoVariableFactor.SelectionChanged + MatchingCategoricalByCategoricalVariables(ucrReceiverSecondTwoVariableFactor) + End Sub + + Private Sub ucrReceiverFirstVars_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverFirstVars.SelectionChanged + MatchingCategoricalByCategoricalVariables(ucrReceiverFirstVars) + End Sub + + Private Sub ucrReceiverThreeVariableSecondFactor_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverThreeVariableSecondFactor.SelectionChanged + MatchingCategoricalByCategoricalVariables(ucrReceiverThreeVariableSecondFactor) + End Sub + + Private Sub ucrReceiverThreeVariableThirdVariable_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverThreeVariableThirdVariable.SelectionChanged + MatchingCategoricalByCategoricalVariables(ucrReceiverThreeVariableThirdVariable) + End Sub + + Private Sub MatchingCategoricalByCategoricalVariables(sender As ucrReceiver) + If Not bRcodeSet OrElse rdoSkim.Checked OrElse sender.IsEmpty Then + Exit Sub + End If + Dim bContainedInMultipleReceiver As Boolean = False + + If TypeOf (sender) Is ucrReceiverSingle Then + bContainedInMultipleReceiver = ucrReceiverFirstVars.GetVariableNamesList.Contains( + TryCast(sender, ucrReceiverSingle).GetVariableNames) + ElseIf TypeOf (sender) Is ucrReceiverMultiple Then + Dim lstMultipleVariables As String() = TryCast(sender, ucrReceiverMultiple).GetVariableNamesList() + If rdoTwoVariable.Checked Then + bContainedInMultipleReceiver = lstMultipleVariables.Contains(ucrReceiverSecondTwoVariableFactor.GetVariableNames) + Else + bContainedInMultipleReceiver = lstMultipleVariables.Contains(ucrReceiverThreeVariableSecondFactor.GetVariableNames) OrElse ( + lstMultipleVariables.Contains(ucrReceiverThreeVariableThirdVariable.GetVariableNames) AndAlso strSecondVariableType = "categorical") + End If + End If + + + If sender Is ucrReceiverSecondTwoVariableFactor Then + If bContainedInMultipleReceiver And strFirstVariablesType = "categorical" Then + DisplayWarning(" First Variable ") + End If + ElseIf sender Is ucrReceiverThreeVariableThirdVariable Then + If (bContainedInMultipleReceiver And strFirstVariablesType = "categorical") OrElse + (ucrReceiverThreeVariableThirdVariable.GetVariableNames = ucrReceiverThreeVariableSecondFactor.GetVariableNames) Then + DisplayWarning(" First Variable and Second Variable ") + End If + ElseIf sender Is ucrReceiverThreeVariableSecondFactor Then + If (strFirstVariablesType = "categorical" AndAlso bContainedInMultipleReceiver) OrElse + (ucrReceiverThreeVariableThirdVariable.GetVariableNames = ucrReceiverThreeVariableSecondFactor.GetVariableNames) Then + DisplayWarning(" First Variable and Third Variable ") + End If + ElseIf sender Is ucrReceiverFirstVars Then + If rdoTwoVariable.Checked Then + If strSecondVariableType = "categorical" AndAlso bContainedInMultipleReceiver Then + DisplayWarning(" Second Variable ") + End If + ElseIf rdoThreeVariable.Checked Then + If bContainedInMultipleReceiver Then + DisplayWarning(" Second Variable and Third Variable ") + End If + End If + End If + End Sub + + Private Sub DisplayWarning(strMessage As String) + MsgBox("Pick a categorical variable different from those selected in the" & strMessage & "to avoid Errors", vbOKOnly, "Matching Factor Variables") + End Sub + + Private Sub cmdFormatTable_Click(sender As Object, e As EventArgs) Handles cmdFormatTable.Click + sdgFormatSummaryTables.SetRCode(clsNewTableTitleFunction:=clsTableTitleFunction, clsNewTabFootnoteTitleFunction:=clsTabFootnoteTitleFunction, clsNewTableSourcenoteFunction:=clsTableSourcenoteFunction, clsNewDummyFunction:=clsDummyFunction, + clsNewCellTextFunction:=clsCellTextFunction, clsNewCellBorderFunction:=clsCellBorderFunction, clsNewCellFillFunction:=clsCellFillFunction, clsNewHeaderFormatFunction:=clsHeaderFormatFunction, + clsNewTabOptionsFunction:=clsTabOptionsFunction, clsNewFootnoteCellFunction:=clsFootnoteCellFunction, clsNewStubHeadFunction:=clsStubHeadFunction, clsNewSecondFootnoteCellBodyFunction:=clsSecondFootnoteCellBodyFunction, + clsNewPipeOperator:=clsPipeOperator, clsNewBorderWeightPxFunction:=clsBorderWeightPxFunction, clsNewFootnoteTitleLocationFunction:=clsFootnoteTitleLocationFunction, clsNewFootnoteCellBodyFunction:=clsFootnoteCellBodyFunction, + clsNewFootnoteSubtitleLocationFunction:=clsFootnoteSubtitleLocationFunction, clsNewTabFootnoteSubtitleFunction:=clsTabFootnoteSubtitleFunction, clsNewJoiningOperator:=clsJoiningPipeOperator, + clsNewStyleListFunction:=clsStyleListFunction, clsNewMutableOPerator:=clsMmtablePlusOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, clsNewTabFootnoteOperator:=clsTabFootnoteOperator, + clsNewTabStyleCellTextFunction:=clsTabStyleCellTextFunction, clsNewTabStyleFunction:=clsTabStyleFunction, clsNewTabStylePxFunction:=clsTabStylePxFunction, bReset:=bReset) + sdgFormatSummaryTables.ShowDialog() + AddFormatTableMapToAfterCode() End Sub -End Class \ No newline at end of file +End Class From fdff68b489235e0299ee151c5c989f9ada803fc5 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Thu, 24 Nov 2022 10:56:48 +0300 Subject: [PATCH 02/21] changes --- instat/dlgDescribeTwoVariable.Designer.vb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index 845bf370f0d..565fd0da09a 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -246,7 +246,7 @@ Partial Class dlgDescribeTwoVariable Me.rdoThreeVariable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoThreeVariable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoThreeVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoThreeVariable.Location = New System.Drawing.Point(235, 9) + Me.rdoThreeVariable.Location = New System.Drawing.Point(235, 8) Me.rdoThreeVariable.Name = "rdoThreeVariable" Me.rdoThreeVariable.Size = New System.Drawing.Size(100, 28) Me.rdoThreeVariable.TabIndex = 26 @@ -268,7 +268,7 @@ Partial Class dlgDescribeTwoVariable 'cmdFormatTable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFormatTable.Location = New System.Drawing.Point(265, 404) + Me.cmdFormatTable.Location = New System.Drawing.Point(272, 407) Me.cmdFormatTable.Name = "cmdFormatTable" Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23) Me.cmdFormatTable.TabIndex = 44 @@ -302,7 +302,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(1, 432) + Me.ucrBase.Location = New System.Drawing.Point(8, 435) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 43 @@ -349,7 +349,7 @@ Partial Class dlgDescribeTwoVariable 'ucrPnlDescribe ' Me.ucrPnlDescribe.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlDescribe.Location = New System.Drawing.Point(32, 6) + Me.ucrPnlDescribe.Location = New System.Drawing.Point(39, 3) Me.ucrPnlDescribe.Name = "ucrPnlDescribe" Me.ucrPnlDescribe.Size = New System.Drawing.Size(317, 34) Me.ucrPnlDescribe.TabIndex = 22 @@ -566,7 +566,7 @@ Partial Class dlgDescribeTwoVariable Me.rdoSkim.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSkim.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSkim.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSkim.Location = New System.Drawing.Point(42, 9) + Me.rdoSkim.Location = New System.Drawing.Point(42, 8) Me.rdoSkim.Name = "rdoSkim" Me.rdoSkim.Size = New System.Drawing.Size(100, 28) Me.rdoSkim.TabIndex = 23 @@ -615,7 +615,7 @@ Partial Class dlgDescribeTwoVariable Me.rdoTwoVariable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTwoVariable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoTwoVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoTwoVariable.Location = New System.Drawing.Point(137, 9) + Me.rdoTwoVariable.Location = New System.Drawing.Point(137, 8) Me.rdoTwoVariable.Name = "rdoTwoVariable" Me.rdoTwoVariable.Size = New System.Drawing.Size(100, 28) Me.rdoTwoVariable.TabIndex = 24 From 5a9e9154a255ee1679686c926db8fb1c62cb15f4 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Thu, 1 Dec 2022 22:13:58 +0300 Subject: [PATCH 03/21] Added new tabulation system for numeric by factor --- instat/dlgDescribeTwoVariable.vb | 47 +++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index f628b431ceb..61b759dfb57 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -26,9 +26,11 @@ Public Class dlgDescribeTwoVariable clsHeaderLeftTopFunction, clsHeaderLeftTopFuncion, clsCombineFrequencyParametersFunction, clsSummaryMapFunction, clsCombineMultipleColumnsFunction, clsCombineFactorsFunction, clsMmtableMapFunction, clsHeaderTopLeftSummaryVariableFunction, - clsCombineFrequencyFactorParameterFunction, clsSelectFunction, clsRenameCombineFunction As New RFunction + clsCombineFrequencyFactorParameterFunction, clsSelectFunction, clsRenameCombineFunction, + clsFrequencyTables2Function, clsSummaryMap2Function As New RFunction Private clsGroupByPipeOperator, clsMmtablePlusOperator, clsMapFrequencyPipeOperator, - clsMmtableTildeOperator, clsDataSelectTildeOperator, clsEmptyOperator, clsSecondEmptyOperator As New ROperator + clsMmtableTildeOperator, clsDataSelectTildeOperator, clsEmptyOperator, clsSecondEmptyOperator, + clsDataTildeOperator, clsMapFrequency2PipeOperator As New ROperator Private lstFrequencyParameters As New List(Of String)({"percentage_type", "margin_name", "perc_total_factors", "perc_decimal", "signif_fig", "include_margins"}) @@ -171,6 +173,10 @@ Public Class dlgDescribeTwoVariable clsMmtablePlusOperator = New ROperator clsEmptyOperator = New ROperator clsSecondEmptyOperator = New ROperator + clsMapFrequency2PipeOperator = New ROperator + clsFrequencyTables2Function = New RFunction + clsDataTildeOperator = New ROperator + clsSummaryMap2Function = New RFunction ucrSelectorDescribeTwoVar.Reset() ucrReceiverFirstVars.SetMeAsReceiver() @@ -191,7 +197,7 @@ Public Class dlgDescribeTwoVariable clsRenameCombineFunction.AddParameter("fourth", "4", iPosition:=3, bIncludeArgumentName:=False) clsSelectFunction.SetPackageName("dplyr") - clsSelectFunction.SetRCommand("select") + clsSelectFunction.SetRCommand("rename") clsSelectFunction.AddParameter(".data", clsRFunctionParameter:=clsFrequencyTablesFunction, iPosition:=0) clsSelectFunction.AddParameter("rename_function", bIncludeArgumentName:=False, clsRFunctionParameter:=clsRenameCombineFunction, iPosition:=1) @@ -299,6 +305,27 @@ Public Class dlgDescribeTwoVariable clsRAnovaFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$anova_tables") + clsFrequencyTables2Function.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") + clsFrequencyTables2Function.AddParameter("data_name", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + clsFrequencyTables2Function.AddParameter("columns_to_summarise", ".x", iPosition:=1) + clsFrequencyTables2Function.AddParameter("factors", clsRFunctionParameter:=clsCombineFrequencyFactorParameterFunction, iPosition:=2) + clsFrequencyTables2Function.AddParameter("summaries", Chr(34) & "summary_count" & Chr(34), iPosition:=3) + + clsDataTildeOperator.SetOperation("~") + clsDataTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) + clsDataTildeOperator.AddParameter("x", clsRFunctionParameter:=clsFrequencyTables2Function, iPosition:=1, bIncludeArgumentName:=False) + + clsSummaryMap2Function.SetPackageName("purrr") + clsSummaryMap2Function.SetRCommand("map") + clsSummaryMap2Function.AddParameter(".x", clsRFunctionParameter:=clsCombineMultipleColumnsFunction, iPosition:=0) + clsSummaryMap2Function.AddParameter(".f", clsROperatorParameter:=clsDataTildeOperator, iPosition:=1) + + clsMapFrequency2PipeOperator.SetOperation("%>%") + clsMapFrequency2PipeOperator.AddParameter("map_summary_table", clsRFunctionParameter:=clsSummaryMap2Function, iPosition:=1) + clsMapFrequency2PipeOperator.AddParameter("map_mmtable", clsRFunctionParameter:=clsMmtableMapFunction, iPosition:=2) + clsMapFrequency2PipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + clsMapFrequency2PipeOperator.SetAssignTo("list_of_tables ") + ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) bResetSubdialog = True End Sub @@ -426,7 +453,7 @@ Public Class dlgDescribeTwoVariable grpOptions.Visible = True cmdSummaries.Visible = True ucrChkOmitMissing.Visible = True - ucrBase.clsRsyntax.SetBaseRFunction(clsRCustomSummaryFunction) + ucrBase.clsRsyntax.SetBaseROperator(clsMapFrequency2PipeOperator) ucrReceiverFirstVars.SetParameterIsString() lblSummaryName.Text = "Numerical summaries" lblSummaryName.ForeColor = SystemColors.Highlight @@ -469,6 +496,7 @@ Public Class dlgDescribeTwoVariable Results() EnableDisableFrequencyControls() AddRemoveFrequencyParameters() + AddRemoveTopLeftVariable() ChangeLocations() MissingOptions() TestOKEnabled() @@ -626,4 +654,15 @@ Public Class dlgDescribeTwoVariable bResetSubdialog = False sdgMissingOptions.ShowDialog() End Sub + + Private Sub AddRemoveTopLeftVariable() + If strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "categorical" Then + clsCombineFrequencyFactorParameterFunction.RemoveParameterByName("factor_by") + clsMmtablePlusOperator.RemoveParameterByName("header_top_left") + clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftSummaryVariableFunction, iPosition:=1, bIncludeArgumentName:=False) + Else + clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", iPosition:=1, bIncludeArgumentName:=False) + clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftFunction, iPosition:=1) + End If + End Sub End Class \ No newline at end of file From 81f71c2417c6a11aa3d16264f37606f81834863a Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Fri, 2 Dec 2022 12:27:55 +0300 Subject: [PATCH 04/21] more changes --- instat/dlgDescribeTwoVariable.vb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 61b759dfb57..a292a7c6161 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -191,10 +191,7 @@ Public Class dlgDescribeTwoVariable clsCombineFactorsFunction.SetRCommand("c") clsRenameCombineFunction.SetRCommand("c") - clsRenameCombineFunction.AddParameter("first", "1", iPosition:=0, bIncludeArgumentName:=False) - clsRenameCombineFunction.AddParameter("by_var", "2", iPosition:=1) - clsRenameCombineFunction.AddParameter("third", "3", iPosition:=2, bIncludeArgumentName:=False) - clsRenameCombineFunction.AddParameter("fourth", "4", iPosition:=3, bIncludeArgumentName:=False) + clsRenameCombineFunction.AddParameter("by_var", ".x", iPosition:=0) clsSelectFunction.SetPackageName("dplyr") clsSelectFunction.SetRCommand("rename") @@ -202,8 +199,7 @@ Public Class dlgDescribeTwoVariable clsSelectFunction.AddParameter("rename_function", bIncludeArgumentName:=False, clsRFunctionParameter:=clsRenameCombineFunction, iPosition:=1) clsCombineFrequencyFactorParameterFunction.SetRCommand("c") - clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", - iPosition:=1, bIncludeArgumentName:=False) + clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", iPosition:=1, bIncludeArgumentName:=False) clsEmptyOperator.SetOperation("") clsEmptyOperator.AddParameter("multiple_receiver_cols", "multiple_receiver_cols", iPosition:=0) From 65a16ba8ffc1dd9890dbe71ca5fab9b672decb22 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Wed, 4 Jan 2023 11:45:37 +0300 Subject: [PATCH 05/21] more changes --- instat/dlgDescribeTwoVariable.vb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index a292a7c6161..11b19411b1f 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -305,7 +305,7 @@ Public Class dlgDescribeTwoVariable clsFrequencyTables2Function.AddParameter("data_name", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) clsFrequencyTables2Function.AddParameter("columns_to_summarise", ".x", iPosition:=1) clsFrequencyTables2Function.AddParameter("factors", clsRFunctionParameter:=clsCombineFrequencyFactorParameterFunction, iPosition:=2) - clsFrequencyTables2Function.AddParameter("summaries", Chr(34) & "summary_count" & Chr(34), iPosition:=3) + clsFrequencyTables2Function.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=3) clsDataTildeOperator.SetOperation("~") clsDataTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) @@ -505,13 +505,13 @@ Public Class dlgDescribeTwoVariable clsRCorrelationFunction.RemoveParameterByName("use") End If If Not ucrChkOmitMissing.Checked Then - clsRCustomSummaryFunction.RemoveParameterByName("na_type") - clsRCustomSummaryFunction.RemoveParameterByName("na_max_n") - clsRCustomSummaryFunction.RemoveParameterByName("na_min_n") - clsRCustomSummaryFunction.RemoveParameterByName("na_max_prop") - clsRCustomSummaryFunction.RemoveParameterByName("na_consecutive_n") + clsFrequencyTables2Function.RemoveParameterByName("na_type") + clsFrequencyTables2Function.RemoveParameterByName("na_max_n") + clsFrequencyTables2Function.RemoveParameterByName("na_min_n") + clsFrequencyTables2Function.RemoveParameterByName("na_max_prop") + clsFrequencyTables2Function.RemoveParameterByName("na_consecutive_n") Else - clsRCustomSummaryFunction.AddParameter("na_type", clsRFunctionParameter:=clsCombineFunction, iPosition:=9) + clsFrequencyTables2Function.AddParameter("na_type", clsRFunctionParameter:=clsCombineFunction, iPosition:=9) End If MissingOptions() End Sub @@ -646,7 +646,7 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub cmdMissingOptions_Click(sender As Object, e As EventArgs) Handles cmdMissingOptions.Click - sdgMissingOptions.SetRFunction(clsNewSummaryFunction:=clsRCustomSummaryFunction, clsNewConcFunction:=clsCombineFunction, bReset:=bResetSubdialog) + sdgMissingOptions.SetRFunction(clsNewSummaryFunction:=clsFrequencyTables2Function, clsNewConcFunction:=clsCombineFunction, bReset:=bResetSubdialog) bResetSubdialog = False sdgMissingOptions.ShowDialog() End Sub From 1f565a63b2488c14321170ad3ca717f089464e5b Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Fri, 5 May 2023 11:08:55 +0300 Subject: [PATCH 06/21] Minor changes --- instat/dlgDescribeTwoVariable.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 11b19411b1f..96e72877976 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -267,7 +267,7 @@ Public Class dlgDescribeTwoVariable clsGroupByFunction.SetRCommand("group_by") clsSkimrFunction.SetPackageName("skimr") - clsSkimrFunction.SetRCommand("skim_without_charts") + clsSkimrFunction.SetRCommand("skim") clsCombineFunction.SetRCommand("c") From 63393d77cc7b7c7b5a302a221ce27d51316ea613 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Fri, 26 May 2023 11:51:08 +0300 Subject: [PATCH 07/21] Cleaning code --- instat/dlgDescribeTwoVariable.vb | 69 +++++++++----------------------- 1 file changed, 20 insertions(+), 49 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index a320ff0c8f7..3b43f35003e 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -33,27 +33,26 @@ Public Class dlgDescribeTwoVariable clsSummaryTableFunction, clsThreeVariableCombineFrequencyParametersFunction As New RFunction 'FORMAT TABLE FUNCTIONS - Private clsBorderWeightPxFunction, clsCellBorderFunction, clsCellFillFunction, - clsCellTextFunction, clsFootnoteCellBodyFunction, clsFootnoteCellFunction, + Private clsFootnoteCellBodyFunction, clsFootnoteCellFunction, clsFootnoteSubtitleLocationFunction, clsFootnoteTitleLocationFunction, clsHeaderFormatFunction, clsSecondFootnoteCellBodyFunction, - clsSecondFootnoteCellFunction, clsStubHeadFunction, clsStyleListFunction, + clsSecondFootnoteCellFunction, clsStyleListFunction, clsTabFootnoteSubtitleFunction, clsTabFootnoteTitleFunction, - clsTableSourcenoteFunction, clsTableTitleFunction, clsTabOptionsFunction, + clsTableSourcenoteFunction, clsTableTitleFunction, clsThemesTabOptionFunction, clsTabStyleCellTextFunction, clsTabStyleCellTitleFunction, clsTabStyleFunction, - clsTabStylePxFunction, clsgtExtraThemesFunction As New RFunction + clsTabStylePxFunction, clsgtExtraThemesFuction As New RFunction Private clsGroupByPipeOperator, clsMmtablePlusOperator, clsMapPipeOperator, clsMmtableTildeOperator, clsSummaryTildeOperator, clsEmptyOperator, clsSecondEmptyOperator As New ROperator - 'Frequency Parameters - Public clsGetDataTypeFunction, clsGetSecondDataTypeFunction, + + Private clsGetDataTypeFunction, clsGetSecondDataTypeFunction, clsFrequencyTablesFunction, clsCombineFactorsFunction, clsHeaderTopLeftSummaryVariableFunction, clsCombineFrequencyFactorParameterFunction, clsSelectFunction, clsRenameCombineFunction, clsFrequencyTables2Function, clsSummaryMap2Function As New RFunction - Private clsMapFrequencyPipeOperator, clsDataSelectTildeOperator, - clsDataTildeOperator, clsMapFrequency2PipeOperator As New ROperator + Private clsDataTildeOperator, clsMapFrequency2PipeOperator As New ROperator + 'Frequency Parameters Private lstFrequencyParameters As New List(Of String)({"percentage_type", "margin_name", "perc_total_factors", "perc_decimal", "signif_fig", "include_margins"}) @@ -192,10 +191,6 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub SetDefaults() - clsBorderWeightPxFunction = New RFunction - clsCellBorderFunction = New RFunction - clsCellFillFunction = New RFunction - clsCellTextFunction = New RFunction clsCombineFrequencyParametersFunction = New RFunction clsCombineFunction = New RFunction clsCombineMultipleColumnsFunction = New RFunction @@ -220,7 +215,6 @@ Public Class dlgDescribeTwoVariable clsSecondHeaderFunction = New RFunction clsSkimrFunction = New RFunction clsStyleListFunction = New RFunction - clsStubHeadFunction = New RFunction clsSummariesListFunction = New RFunction clsSummaryMapFunction = New RFunction clsSummaryTableCombineFactorsFunction = New RFunction @@ -229,7 +223,7 @@ Public Class dlgDescribeTwoVariable clsTabFootnoteTitleFunction = New RFunction clsTableSourcenoteFunction = New RFunction clsTableTitleFunction = New RFunction - clsTabOptionsFunction = New RFunction + clsThemesTabOptionFunction = New RFunction clsTabStyleCellTextFunction = New RFunction clsTabStyleCellTitleFunction = New RFunction clsTabStyleFunction = New RFunction @@ -259,20 +253,6 @@ Public Class dlgDescribeTwoVariable ucrBase.clsRsyntax.ClearCodes() - clsBorderWeightPxFunction.SetPackageName("gt") - clsBorderWeightPxFunction.SetRCommand("px") - clsBorderWeightPxFunction.AddParameter("weight", "1", iPosition:=0, bIncludeArgumentName:=False) - - clsCellBorderFunction.SetPackageName("gt") - clsCellBorderFunction.SetRCommand("cell_borders") - clsCellBorderFunction.AddParameter("weight", clsRFunctionParameter:=clsBorderWeightPxFunction, iPosition:=3) - - clsCellFillFunction.SetPackageName("gt") - clsCellFillFunction.SetRCommand("cell_fill") - - clsCellTextFunction.SetPackageName("gt") - clsCellTextFunction.SetRCommand("cell_text") - clsCombineFrequencyParametersFunction.SetRCommand("c") clsCombineFunction.SetRCommand("c") @@ -371,8 +351,8 @@ Public Class dlgDescribeTwoVariable clsMmtableTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) clsMmtableTildeOperator.AddParameter("mmtable", clsRFunctionParameter:=clsMmtableFunction, iPosition:=1) - clsPipeOperator.SetOperation("%>%") - clsPipeOperator.bBrackets = False + clsGroupByFunction.SetPackageName("dplyr") + clsGroupByFunction.SetRCommand("group_by") clsSkimrFunction.SetPackageName("skimr") clsSkimrFunction.SetRCommand("skim") @@ -384,6 +364,9 @@ Public Class dlgDescribeTwoVariable clsFrequencyTablesFunction.AddParameter("summaries", Chr(34) & "summary_count" & Chr(34), iPosition:=1) clsFrequencyTablesFunction.AddParameter("factors", clsRFunctionParameter:=clsCombineFrequencyFactorParameterFunction, iPosition:=2) + clsPipeOperator.SetOperation("%>%") + clsPipeOperator.bBrackets = False + clsRAnovaFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$anova_tables") clsRAnovaFunction.AddParameter("signif.stars", "FALSE", iPosition:=2) clsRAnovaFunction.AddParameter("sign_level", "FALSE", iPosition:=3) @@ -419,9 +402,6 @@ Public Class dlgDescribeTwoVariable clsSkimrFunction.SetPackageName("skimr") clsSkimrFunction.SetRCommand("skim_without_charts") - clsStubHeadFunction.SetPackageName("gt") - clsStubHeadFunction.SetRCommand("tab_stubhead") - clsStyleListFunction.SetRCommand("list") clsSummariesListFunction.SetRCommand("c") @@ -456,8 +436,8 @@ Public Class dlgDescribeTwoVariable clsTabFootnoteSubtitleFunction.SetPackageName("gt") clsTabFootnoteSubtitleFunction.SetRCommand("tab_footnote") - clsTabOptionsFunction.SetPackageName("gt") - clsTabOptionsFunction.SetRCommand("tab_options") + clsThemesTabOptionFunction.SetPackageName("gt") + clsThemesTabOptionFunction.SetRCommand("tab_options") clsTabStyleCellTextFunction.SetPackageName("gt") clsTabStyleCellTextFunction.SetRCommand("cell_text") @@ -600,6 +580,7 @@ Public Class dlgDescribeTwoVariable If rdoTwoVariable.Checked Then ucrChkOmitMissing.Visible = strFirstVariablesType = "numeric" + cmdMissingOptions.Enabled = ucrChkOmitMissing.Checked AndAlso IsNumericByCategorical() grpOptions.Visible = IsNumericByCategorical() ElseIf rdoThreeVariable.Checked Then grpOptions.Visible = IsCategoricalByNumeric() OrElse IsNumericByCategorical() @@ -725,7 +706,6 @@ Public Class dlgDescribeTwoVariable AddRemoveFrequencyParameters() AddRemoveTopLeftVariable() ChangeLocations() - MissingOptions() TestOKEnabled() End Sub @@ -745,15 +725,6 @@ Public Class dlgDescribeTwoVariable Else clsFrequencyTables2Function.AddParameter("na_type", clsRFunctionParameter:=clsCombineFunction, iPosition:=9) End If - MissingOptions() - End Sub - - Private Sub MissingOptions() - If ucrChkOmitMissing.Checked AndAlso strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "categorical" Then - cmdMissingOptions.Enabled = True - Else - cmdMissingOptions.Enabled = False - End If End Sub Private Sub ucrPnlDescribe_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDescribe.ControlValueChanged @@ -1210,10 +1181,10 @@ Public Class dlgDescribeTwoVariable Private Sub cmdFormatTable_Click(sender As Object, e As EventArgs) Handles cmdFormatTable.Click sdgFormatSummaryTables.SetRCode(clsNewTableTitleFunction:=clsTableTitleFunction, clsNewTabFootnoteTitleFunction:=clsTabFootnoteTitleFunction, clsNewTableSourcenoteFunction:=clsTableSourcenoteFunction, clsNewDummyFunction:=clsDummyFunction, - clsNewThemesTabOptionFunction:=clsTabOptionsFunction, clsNewFootnoteCellFunction:=clsFootnoteCellFunction, clsNewSecondFootnoteCellBodyFunction:=clsSecondFootnoteCellBodyFunction, + clsNewThemesTabOptionFunction:=clsThemesTabOptionFunction, clsNewFootnoteCellFunction:=clsFootnoteCellFunction, clsNewSecondFootnoteCellBodyFunction:=clsSecondFootnoteCellBodyFunction, clsNewPipeOperator:=clsPipeOperator, clsNewFootnoteTitleLocationFunction:=clsFootnoteTitleLocationFunction, clsNewFootnoteCellBodyFunction:=clsFootnoteCellBodyFunction, clsNewFootnoteSubtitleLocationFunction:=clsFootnoteSubtitleLocationFunction, clsNewTabFootnoteSubtitleFunction:=clsTabFootnoteSubtitleFunction, clsNewJoiningOperator:=clsJoiningPipeOperator, - clsNewMutableOPerator:=clsMmtablePlusOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, clsNewgtExtraThemesFunction:=clsgtExtraThemesFunction, + clsNewMutableOPerator:=clsMmtablePlusOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, clsNewgtExtraThemesFunction:=clsgtExtraThemesFuction, clsNewTabStyleCellTextFunction:=clsTabStyleCellTextFunction, clsNewTabStyleFunction:=clsTabStyleFunction, clsNewTabStylePxFunction:=clsTabStylePxFunction, bReset:=bReset) sdgFormatSummaryTables.ShowDialog() AddFormatTableMapToAfterCode() @@ -1225,7 +1196,7 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub AddRemoveTopLeftVariable() - If strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "categorical" Then + If IsNumericByCategorical() Then clsCombineFrequencyFactorParameterFunction.RemoveParameterByName("factor_by") clsMmtablePlusOperator.RemoveParameterByName("header_top_left") clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftSummaryVariableFunction, iPosition:=1, bIncludeArgumentName:=False) From bad0e1ac6d64adde0761bdc677f430bd60a78d19 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Mon, 29 May 2023 11:06:36 +0300 Subject: [PATCH 08/21] more changes --- instat/dlgDescribeTwoVariable.Designer.vb | 16 +- instat/dlgDescribeTwoVariable.vb | 472 ++++++++++++---------- 2 files changed, 263 insertions(+), 225 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index 576fad9806a..459596030cd 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -87,6 +87,7 @@ Partial Class dlgDescribeTwoVariable Me.rdoTwoVariable = New System.Windows.Forms.RadioButton() Me.ucrReceiverFirstVars = New instat.ucrReceiverMultiple() Me.cmdMissingOptions = New System.Windows.Forms.Button() + Me.ucrSaveTable = New instat.ucrSave() Me.grpThreeVariablePercentages.SuspendLayout() Me.grpOptions.SuspendLayout() Me.grpFrequency.SuspendLayout() @@ -303,7 +304,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(8, 435) + Me.ucrBase.Location = New System.Drawing.Point(8, 477) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 43 @@ -647,12 +648,22 @@ Partial Class dlgDescribeTwoVariable Me.cmdMissingOptions.Text = "Missing Options..." Me.cmdMissingOptions.UseVisualStyleBackColor = True ' + 'ucrSaveTable + ' + Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveTable.Location = New System.Drawing.Point(9, 438) + Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveTable.Name = "ucrSaveTable" + Me.ucrSaveTable.Size = New System.Drawing.Size(399, 34) + Me.ucrSaveTable.TabIndex = 47 + ' 'dlgDescribeTwoVariable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ClientSize = New System.Drawing.Size(419, 491) + Me.ClientSize = New System.Drawing.Size(419, 530) + Me.Controls.Add(Me.ucrSaveTable) Me.Controls.Add(Me.cmdMissingOptions) Me.Controls.Add(Me.grpThreeVariablePercentages) Me.Controls.Add(Me.cmdFormatTable) @@ -749,4 +760,5 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents rdoSkim As RadioButton Friend WithEvents ucrPnlDescribe As UcrPanel Friend WithEvents cmdMissingOptions As Button + Friend WithEvents ucrSaveTable As ucrSave End Class diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 3b43f35003e..3ca652ad368 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -44,11 +44,11 @@ Public Class dlgDescribeTwoVariable Private clsGroupByPipeOperator, clsMmtablePlusOperator, clsMapPipeOperator, clsMmtableTildeOperator, clsSummaryTildeOperator, clsEmptyOperator, - clsSecondEmptyOperator As New ROperator + clsSecondEmptyOperator, clsSummaryOperator As New ROperator Private clsGetDataTypeFunction, clsGetSecondDataTypeFunction, clsFrequencyTablesFunction, clsCombineFactorsFunction, - clsHeaderTopLeftSummaryVariableFunction, + clsHeaderTopLeftSummaryVariableFunction, clsgtFunction, clsCombineFrequencyFactorParameterFunction, clsSelectFunction, clsRenameCombineFunction, clsFrequencyTables2Function, clsSummaryMap2Function As New RFunction Private clsDataTildeOperator, clsMapFrequency2PipeOperator As New ROperator @@ -121,7 +121,7 @@ Public Class dlgDescribeTwoVariable ucrChkOmitMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkOmitMissing.bUpdateRCodeFromControl = True - ucrChkDisplayMargins.SetParameter(New RParameter("include_margins", 5)) + ucrChkDisplayMargins.SetParameter(New RParameter("include_margins", 7)) ucrChkDisplayMargins.SetText("Display Margins") ucrChkDisplayMargins.SetRDefault("FALSE") @@ -187,6 +187,10 @@ Public Class dlgDescribeTwoVariable ucrNudSigFigs.SetMinMax(0, 22) ucrNudSigFigs.SetRDefault(2) + ucrSaveTable.SetPrefix("summary_table") + ucrSaveTable.SetDataFrameSelector(ucrSelectorDescribeTwoVar.ucrAvailableDataFrames) + ucrSaveTable.SetIsComboBox() + ucrNudColumnFactors.SetMinMax(1, 2) End Sub @@ -204,8 +208,8 @@ Public Class dlgDescribeTwoVariable clsHeaderFormatFunction = New RFunction clsHeaderLeftTopFunction = New RFunction clsHeaderTopLeftFunction = New RFunction - clsMmtableFunction = New RFunction - clsMmtableMapFunction = New RFunction + 'clsMmtableFunction = New RFunction + 'clsMmtableMapFunction = New RFunction clsRAnovaFunction = New RFunction clsRCorrelationFunction = New RFunction clsRCustomSummaryFunction = New RFunction @@ -229,21 +233,23 @@ Public Class dlgDescribeTwoVariable clsTabStyleFunction = New RFunction clsTabStylePxFunction = New RFunction clsThreeVariableCombineFrequencyParametersFunction = New RFunction - clsEmptyOperator = New ROperator - clsFormatTableMappingPipeOperator = New ROperator + 'clsEmptyOperator = New ROperator + 'clsFormatTableMappingPipeOperator = New ROperator clsFormatTableTildeOperator = New ROperator clsGroupByPipeOperator = New ROperator clsJoiningPipeOperator = New ROperator - clsMapPipeOperator = New ROperator - clsMmtablePlusOperator = New ROperator - clsMmtableTildeOperator = New ROperator + 'clsMapPipeOperator = New ROperator + 'clsMmtablePlusOperator = New ROperator + 'clsMmtableTildeOperator = New ROperator clsPipeOperator = New ROperator - clsSecondEmptyOperator = New ROperator + 'clsSecondEmptyOperator = New ROperator clsTabFootnoteOperator = New ROperator clsMapFrequency2PipeOperator = New ROperator clsFrequencyTables2Function = New RFunction clsDataTildeOperator = New ROperator clsSummaryMap2Function = New RFunction + clsgtFunction = New RFunction + clsSummaryOperator = New ROperator ucrSelectorDescribeTwoVar.Reset() ucrReceiverFirstVars.SetMeAsReceiver() @@ -272,9 +278,9 @@ Public Class dlgDescribeTwoVariable clsCombineFrequencyFactorParameterFunction.SetRCommand("c") clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", iPosition:=1, bIncludeArgumentName:=False) - clsEmptyOperator.SetOperation("") - clsEmptyOperator.AddParameter("multiple_receiver_cols", "multiple_receiver_cols", iPosition:=0) - clsEmptyOperator.SetAssignTo("names(list_of_tables)") + 'clsEmptyOperator.SetOperation("") + 'clsEmptyOperator.AddParameter("multiple_receiver_cols", "multiple_receiver_cols", iPosition:=0) + 'clsEmptyOperator.SetAssignTo("names(list_of_tables)") clsFootnoteCellBodyFunction.SetPackageName("gt") clsFootnoteCellBodyFunction.SetRCommand("cells_body") @@ -288,14 +294,14 @@ Public Class dlgDescribeTwoVariable clsFootnoteTitleLocationFunction.SetPackageName("gt") clsFootnoteTitleLocationFunction.SetRCommand("cells_title") - clsFormatTableMapFunction.SetPackageName("purrr") - clsFormatTableMapFunction.SetRCommand("map") - clsFormatTableMapFunction.AddParameter(".x", "list_of_tables", iPosition:=0) - clsFormatTableMapFunction.AddParameter(".f", clsROperatorParameter:=clsJoiningPipeOperator, iPosition:=1) + 'clsFormatTableMapFunction.SetPackageName("purrr") + 'clsFormatTableMapFunction.SetRCommand("map") + 'clsFormatTableMapFunction.AddParameter(".x", "list_of_tables", iPosition:=0) + 'clsFormatTableMapFunction.AddParameter(".f", clsROperatorParameter:=clsJoiningPipeOperator, iPosition:=1) - clsFormatTableMappingPipeOperator.SetOperation("%>%") - clsFormatTableMappingPipeOperator.AddParameter("map", clsRFunctionParameter:=clsFormatTableMapFunction, iPosition:=1) - clsFormatTableMappingPipeOperator.SetAssignTo("list_of_tables") + 'clsFormatTableMappingPipeOperator.SetOperation("%>%") + 'clsFormatTableMappingPipeOperator.AddParameter("map", clsRFunctionParameter:=clsFormatTableMapFunction, iPosition:=1) + '' clsFormatTableMappingPipeOperator.SetAssignTo("list_of_tables") clsFormatTableTildeOperator.SetOperation("~") clsFormatTableTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) @@ -310,46 +316,43 @@ Public Class dlgDescribeTwoVariable clsGroupByPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - clsHeaderFormatFunction.SetPackageName("mmtable2") - clsHeaderFormatFunction.SetRCommand("header_format") - clsHeaderFormatFunction.AddParameter("header", Chr(34) & "all_cols" & Chr(34), iPosition:=0) - clsHeaderFormatFunction.AddParameter("style", clsRFunctionParameter:=clsStyleListFunction, iPosition:=1) + 'clsHeaderFormatFunction.SetPackageName("mmtable2") + 'clsHeaderFormatFunction.SetRCommand("header_format") + 'clsHeaderFormatFunction.AddParameter("header", Chr(34) & "all_cols" & Chr(34), iPosition:=0) + 'clsHeaderFormatFunction.AddParameter("style", clsRFunctionParameter:=clsStyleListFunction, iPosition:=1) - clsHeaderLeftTopFunction.SetPackageName("mmtable2") - clsHeaderLeftTopFunction.SetRCommand("header_left_top") + 'clsHeaderLeftTopFunction.SetPackageName("mmtable2") + 'clsHeaderLeftTopFunction.SetRCommand("header_left_top") - clsHeaderTopLeftFunction.SetPackageName("mmtable2") - clsHeaderTopLeftFunction.SetRCommand("header_top_left") + 'clsHeaderTopLeftFunction.SetPackageName("mmtable2") + 'clsHeaderTopLeftFunction.SetRCommand("header_top_left") - clsJoiningPipeOperator.SetOperation("%>%") - clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsFormatTableTildeOperator, iPosition:=0) - clsJoiningPipeOperator.bBrackets = False - - clsMapPipeOperator.SetOperation("%>%") - clsMapPipeOperator.AddParameter("map_summary_table", clsRFunctionParameter:=clsSummaryMapFunction, iPosition:=1) - clsMapPipeOperator.AddParameter("map_mmtable", clsRFunctionParameter:=clsMmtableMapFunction, iPosition:=2) - clsMapPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - clsMapPipeOperator.SetAssignTo("list_of_tables ") - - clsMmtableFunction.SetPackageName("mmtable2") - clsMmtableFunction.SetRCommand("mmtable") - clsMmtableFunction.AddParameter("data", ".x", iPosition:=0) - clsMmtableFunction.AddParameter("cells", "value", iPosition:=1) - - clsMmtableMapFunction.SetPackageName("purrr") - clsMmtableMapFunction.SetRCommand("map") - clsMmtableMapFunction.AddParameter(".x", ".", iPosition:=0) - clsMmtableMapFunction.AddParameter(".f", clsROperatorParameter:=clsMmtablePlusOperator, iPosition:=1) - - clsMmtablePlusOperator.SetOperation("+") - clsMmtablePlusOperator.bBrackets = False - clsMmtablePlusOperator.AddParameter("mmtable2", clsROperatorParameter:=clsMmtableTildeOperator, iPosition:=0) - clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftFunction, iPosition:=1) - clsMmtablePlusOperator.AddParameter("header_left_top", clsRFunctionParameter:=clsHeaderLeftTopFunction, iPosition:=2) - - clsMmtableTildeOperator.SetOperation("~") - clsMmtableTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) - clsMmtableTildeOperator.AddParameter("mmtable", clsRFunctionParameter:=clsMmtableFunction, iPosition:=1) + + 'clsMapPipeOperator.SetOperation("%>%") + 'clsMapPipeOperator.AddParameter("map_summary_table", clsRFunctionParameter:=clsSummaryMapFunction, iPosition:=1) + 'clsMapPipeOperator.AddParameter("map_mmtable", clsRFunctionParameter:=clsMmtableMapFunction, iPosition:=2) + 'clsMapPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + 'clsMapPipeOperator.SetAssignTo("list_of_tables ") + + 'clsMmtableFunction.SetPackageName("mmtable2") + 'clsMmtableFunction.SetRCommand("mmtable") + 'clsMmtableFunction.AddParameter("data", ".x", iPosition:=0) + 'clsMmtableFunction.AddParameter("cells", "value", iPosition:=1) + + 'clsMmtableMapFunction.SetPackageName("purrr") + 'clsMmtableMapFunction.SetRCommand("map") + 'clsMmtableMapFunction.AddParameter(".x", ".", iPosition:=0) + 'clsMmtableMapFunction.AddParameter(".f", clsROperatorParameter:=clsMmtablePlusOperator, iPosition:=1) + + 'clsMmtablePlusOperator.SetOperation("+") + 'clsMmtablePlusOperator.bBrackets = False + 'clsMmtablePlusOperator.AddParameter("mmtable2", clsROperatorParameter:=clsMmtableTildeOperator, iPosition:=0) + 'clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftFunction, iPosition:=1) + 'clsMmtablePlusOperator.AddParameter("header_left_top", clsRFunctionParameter:=clsHeaderLeftTopFunction, iPosition:=2) + + 'clsMmtableTildeOperator.SetOperation("~") + 'clsMmtableTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) + 'clsMmtableTildeOperator.AddParameter("mmtable", clsRFunctionParameter:=clsMmtableFunction, iPosition:=1) clsGroupByFunction.SetPackageName("dplyr") clsGroupByFunction.SetRCommand("group_by") @@ -374,21 +377,21 @@ Public Class dlgDescribeTwoVariable clsRCorrelationFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$cor") - clsRCustomSummaryFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary") - clsRCustomSummaryFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction) - clsRCustomSummaryFunction.AddParameter("store_results", "FALSE", iPosition:=4) - clsRCustomSummaryFunction.AddParameter("drop", "TRUE", iPosition:=5) - clsRCustomSummaryFunction.AddParameter("na.rm", "FALSE", iPosition:=6) - clsRCustomSummaryFunction.AddParameter("return_output", "TRUE", iPosition:=7) + 'clsRCustomSummaryFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary") + 'clsRCustomSummaryFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction) + 'clsRCustomSummaryFunction.AddParameter("store_results", "FALSE", iPosition:=4) + 'clsRCustomSummaryFunction.AddParameter("drop", "TRUE", iPosition:=5) + 'clsRCustomSummaryFunction.AddParameter("na.rm", "FALSE", iPosition:=6) + 'clsRCustomSummaryFunction.AddParameter("return_output", "TRUE", iPosition:=7) - clsRenameFunction.SetPackageName("dplyr") - clsRenameFunction.SetRCommand("rename") - clsRenameFunction.AddParameter(".data", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=0) - clsRenameFunction.AddParameter("by_var", ".x", iPosition:=1) + 'clsRenameFunction.SetPackageName("dplyr") + 'clsRenameFunction.SetRCommand("rename") + 'clsRenameFunction.AddParameter(".data", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=0) + 'clsRenameFunction.AddParameter("by_var", ".x", iPosition:=1) - clsSecondEmptyOperator.SetOperation("") - clsSecondEmptyOperator.iCallType = 2 - clsSecondEmptyOperator.AddParameter("list_of_tables", "list_of_tables", iPosition:=0) + 'clsSecondEmptyOperator.SetOperation("") + 'clsSecondEmptyOperator.iCallType = 2 + 'clsSecondEmptyOperator.AddParameter("list_of_tables", "list_of_tables", iPosition:=0) clsSecondFootnoteCellBodyFunction.SetPackageName("gt") clsSecondFootnoteCellBodyFunction.SetRCommand("cells_body") @@ -396,8 +399,8 @@ Public Class dlgDescribeTwoVariable clsSecondFootnoteCellFunction.SetPackageName("gt") clsSecondFootnoteCellFunction.SetRCommand("tab_footnote") - clsSecondHeaderFunction.SetPackageName("mmtable2") - clsSecondHeaderFunction.SetRCommand("header_left_top") + 'clsSecondHeaderFunction.SetPackageName("mmtable2") + 'clsSecondHeaderFunction.SetRCommand("header_left_top") clsSkimrFunction.SetPackageName("skimr") clsSkimrFunction.SetRCommand("skim_without_charts") @@ -408,18 +411,39 @@ Public Class dlgDescribeTwoVariable clsSummariesListFunction.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) - clsSummaryMapFunction.SetPackageName("purrr") - clsSummaryMapFunction.SetRCommand("map") - clsSummaryMapFunction.AddParameter(".x", clsRFunctionParameter:=clsCombineMultipleColumnsFunction, iPosition:=0) - clsSummaryMapFunction.AddParameter(".f", clsROperatorParameter:=clsSummaryTildeOperator, iPosition:=1) + 'clsSummaryMapFunction.SetPackageName("purrr") + 'clsSummaryMapFunction.SetRCommand("map") + 'clsSummaryMapFunction.AddParameter(".x", clsRFunctionParameter:=clsCombineMultipleColumnsFunction, iPosition:=0) + 'clsSummaryMapFunction.AddParameter(".f", clsROperatorParameter:=clsSummaryTildeOperator, iPosition:=1) clsSummaryTableCombineFactorsFunction.SetRCommand("c") clsSummaryTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") - clsSummaryTableFunction.AddParameter("factors", clsRFunctionParameter:=clsSummaryTableCombineFactorsFunction, iPosition:=2) + clsSummaryTableFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + 'clsSummaryTableFunction.AddParameter("factors", clsRFunctionParameter:=clsSummaryTableCombineFactorsFunction, iPosition:=3) + 'clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=3) + clsSummaryTableFunction.AddParameter("treat_columns_as_factor", "TRUE", iPosition:=3) + clsSummaryTableFunction.SetAssignTo("summary_table") - clsSummaryTildeOperator.SetOperation("~") - clsSummaryTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) + clsgtFunction.SetPackageName("gt") + clsgtFunction.SetRCommand("gt") + + clsSummaryOperator.SetOperation("%>%") + clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=0) + 'change ipositions after adding factor_cols + clsSummaryOperator.AddParameter("gttbl", clsRFunctionParameter:=clsgtFunction, iPosition:=1) + + clsJoiningPipeOperator.SetOperation("%>%") + clsJoiningPipeOperator.AddParameter("gtable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) + clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Html, + strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + strObjectName:="last_table") + 'clsJoiningPipeOperator.bBrackets = False + + 'clsSummaryTildeOperator.SetOperation("~") + 'clsSummaryTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) clsTableSourcenoteFunction.SetPackageName("gt") clsTableSourcenoteFunction.SetRCommand("tab_source_note") @@ -464,20 +488,20 @@ Public Class dlgDescribeTwoVariable clsFrequencyTables2Function.AddParameter("factors", clsRFunctionParameter:=clsCombineFrequencyFactorParameterFunction, iPosition:=2) clsFrequencyTables2Function.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=3) - clsDataTildeOperator.SetOperation("~") - clsDataTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) - clsDataTildeOperator.AddParameter("x", clsRFunctionParameter:=clsFrequencyTables2Function, iPosition:=1, bIncludeArgumentName:=False) + 'clsDataTildeOperator.SetOperation("~") + 'clsDataTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) + 'clsDataTildeOperator.AddParameter("x", clsRFunctionParameter:=clsFrequencyTables2Function, iPosition:=1, bIncludeArgumentName:=False) - clsSummaryMap2Function.SetPackageName("purrr") - clsSummaryMap2Function.SetRCommand("map") - clsSummaryMap2Function.AddParameter(".x", clsRFunctionParameter:=clsCombineMultipleColumnsFunction, iPosition:=0) - clsSummaryMap2Function.AddParameter(".f", clsROperatorParameter:=clsDataTildeOperator, iPosition:=1) + 'clsSummaryMap2Function.SetPackageName("purrr") + 'clsSummaryMap2Function.SetRCommand("map") + 'clsSummaryMap2Function.AddParameter(".x", clsRFunctionParameter:=clsCombineMultipleColumnsFunction, iPosition:=0) + 'clsSummaryMap2Function.AddParameter(".f", clsROperatorParameter:=clsDataTildeOperator, iPosition:=1) clsMapFrequency2PipeOperator.SetOperation("%>%") - clsMapFrequency2PipeOperator.AddParameter("map_summary_table", clsRFunctionParameter:=clsSummaryMap2Function, iPosition:=1) - clsMapFrequency2PipeOperator.AddParameter("map_mmtable", clsRFunctionParameter:=clsMmtableMapFunction, iPosition:=2) + 'clsMapFrequency2PipeOperator.AddParameter("map_summary_table", clsRFunctionParameter:=clsSummaryMap2Function, iPosition:=1) + 'clsMapFrequency2PipeOperator.AddParameter("map_mmtable", clsRFunctionParameter:=clsMmtableMapFunction, iPosition:=2) clsMapFrequency2PipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - clsMapFrequency2PipeOperator.SetAssignTo("list_of_tables ") + 'clsMapFrequency2PipeOperator.SetAssignTo("list_of_tables ") ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) bResetSubdialog = True @@ -487,6 +511,7 @@ Public Class dlgDescribeTwoVariable bRcodeSet = False ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsRAnovaFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=1) ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=2) + ' ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrReceiverSecondTwoVariableFactor.GetParameter, iAdditionalPairNo:=3) ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsRAnovaFunction, New RParameter("x_col_names", 1), iAdditionalPairNo:=1) ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("x_col_names", 1), iAdditionalPairNo:=2) @@ -494,8 +519,8 @@ Public Class dlgDescribeTwoVariable ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1) ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRCustomSummaryFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) - ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=3) - ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsFormatTableMappingPipeOperator, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=4) + 'ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=3) + 'ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsFormatTableMappingPipeOperator, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=4) ucrChkDisplayMargins.AddAdditionalCodeParameterPair(clsThreeVariableCombineFrequencyParametersFunction, ucrChkDisplayMargins.GetParameter, iAdditionalPairNo:=1) @@ -503,8 +528,8 @@ Public Class dlgDescribeTwoVariable ucrNudSigFigs.AddAdditionalCodeParameterPair(clsThreeVariableCombineFrequencyParametersFunction, ucrNudSigFigs.GetParameter, iAdditionalPairNo:=1) ucrChkOmitMissing.SetRCode(clsRCustomSummaryFunction, bReset) - ucrReceiverFirstVars.SetRCode(clsRCustomSummaryFunction, bReset) - ucrReceiverSecondTwoVariableFactor.SetRCode(clsRCustomSummaryFunction, bReset) + ucrReceiverFirstVars.SetRCode(clsSummaryTableFunction, bReset) + ucrReceiverSecondTwoVariableFactor.SetRCode(clsSummaryTableFunction, bReset) ucrSelectorDescribeTwoVar.SetRCode(clsRCorrelationFunction, bReset) ucrReceiverSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset) ucrReceiverSecondSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset) @@ -517,6 +542,7 @@ Public Class dlgDescribeTwoVariable ucrChkThreeVariablePercentageProportion.SetRCode(clsThreeVariableCombineFrequencyParametersFunction, bReset) ucrPnlDescribe.SetRCode(clsDummyFunction, bReset) ucrNudSigFigs.SetRCode(clsCombineFrequencyParametersFunction, bReset) + ucrSaveTable.SetRCode(clsJoiningPipeOperator) bRcodeSet = True End Sub @@ -568,12 +594,12 @@ Public Class dlgDescribeTwoVariable TestOKEnabled() End Sub - Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) - sdgDescribeDisplay.SetRFunction(clsSummaryTableFunction, clsRAnovaFunction, bResetSubdialog) - bResetSubdialog = False - sdgDescribeDisplay.ShowDialog() - TestOKEnabled() - End Sub + 'Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) + ' sdgDescribeDisplay.SetRFunction(clsSummaryTableFunction, clsRAnovaFunction, bResetSubdialog) + ' bResetSubdialog = False + ' sdgDescribeDisplay.ShowDialog() + ' TestOKEnabled() + 'End Sub Private Sub ManageControlsVisibility() grpSummaries.Visible = rdoThreeVariable.Checked OrElse rdoTwoVariable.Checked @@ -590,8 +616,8 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub ChangeBaseRCode() - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsEmptyOperator) - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsSecondEmptyOperator) + 'ucrBase.clsRsyntax.RemoveFromAfterCodes(clsEmptyOperator) + 'ucrBase.clsRsyntax.RemoveFromAfterCodes(clsSecondEmptyOperator) AddFormatTableMapToAfterCode() If rdoSkim.Checked Then @@ -604,32 +630,32 @@ Public Class dlgDescribeTwoVariable ElseIf IsCategoricalByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRAnovaFunction) ElseIf IsNumericByCategorical() OrElse IsCategoricalByCategorical() Then - If IsNumericByCategorical() Then - ucrReceiverFirstVars.SetParameterIsString() - clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=1) - Else - clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsRenameFunction, iPosition:=1) - End If - ucrBase.clsRsyntax.SetBaseROperator(clsMapPipeOperator) - ucrBase.clsRsyntax.AddToAfterCodes(clsEmptyOperator, 1) - ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 3) + 'If IsNumericByCategorical() Then + ucrReceiverFirstVars.SetParameterIsString() + 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=1) + 'Else + 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsRenameFunction, iPosition:=1) + 'End If + ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + 'ucrBase.clsRsyntax.AddToAfterCodes(clsEmptyOperator, 1) + 'ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 3) End If ElseIf rdoThreeVariable.Checked Then clsDummyFunction.AddParameter("checked", "three_variable", iPosition:=0) If IsCategoricalByNumeric() OrElse IsCategoricalByCategorical() Then - clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsRenameFunction, iPosition:=1) + 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsRenameFunction, iPosition:=1) ElseIf IsNumericByCategorical() Then - clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=1) + 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=1) End If - ucrBase.clsRsyntax.SetBaseROperator(clsMapPipeOperator) - ucrBase.clsRsyntax.AddToAfterCodes(clsEmptyOperator, 1) - ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 3) + ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + 'ucrBase.clsRsyntax.AddToAfterCodes(clsEmptyOperator, 1) + 'ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 3) End If End Sub Private Sub AddFormatTableMapToAfterCode() ucrBase.clsRsyntax.RemoveFromAfterCodes(clsFormatTableMappingPipeOperator) - If rdoSkim.Checked OrElse IsNothing(clsJoiningPipeOperator.GetParameter("pipe")) Then + If rdoSkim.Checked Then 'OrElse IsNothing(clsJoiningPipeOperator.GetParameter("pipe")) Then Exit Sub End If @@ -692,11 +718,11 @@ Public Class dlgDescribeTwoVariable If ucrChkOmitMissing.Checked Then If rdoTwoVariable.Checked Then If IsNumericByCategorical() Then - clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=3) + clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=6) End If ElseIf rdoThreeVariable.Checked Then If IsNumericByCategorical() OrElse IsCategoricalByNumeric() Then - clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=3) + clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=6) End If End If End If @@ -704,7 +730,7 @@ Public Class dlgDescribeTwoVariable 'Results() EnableDisableFrequencyControls() AddRemoveFrequencyParameters() - AddRemoveTopLeftVariable() + ' AddRemoveTopLeftVariable() ChangeLocations() TestOKEnabled() End Sub @@ -764,20 +790,20 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub ChangeLocations() - If rdoSkim.Checked Then - ucrBase.Location = New Point(iUcrBaseXLocation, 328) - Me.Size = New Point(iDialogueXsize, 425) - Else - - If IsNumericByCategorical() OrElse IsCategoricalByCategorical() _ - OrElse (IsCategoricalByNumeric() AndAlso rdoThreeVariable.Checked) Then - ucrBase.Location = New Point(iUcrBaseXLocation, 435) - Me.Size = New Point(iDialogueXsize, 530) - ElseIf IsCategoricalByNumeric() Then - ucrBase.Location = New Point(iUcrBaseXLocation, 328) - Me.Size = New Point(iDialogueXsize, 425) - End If - End If + 'If rdoSkim.Checked Then + ' ucrBase.Location = New Point(iUcrBaseXLocation, 328) + ' Me.Size = New Point(iDialogueXsize, 425) + 'Else + + ' If IsNumericByCategorical() OrElse IsCategoricalByCategorical() _ + ' OrElse (IsCategoricalByNumeric() AndAlso rdoThreeVariable.Checked) Then + ' ucrBase.Location = New Point(iUcrBaseXLocation, 435) + ' Me.Size = New Point(iDialogueXsize, 530) + ' ElseIf IsCategoricalByNumeric() Then + ' ucrBase.Location = New Point(iUcrBaseXLocation, 328) + ' Me.Size = New Point(iDialogueXsize, 425) + ' End If + 'End If End Sub Private Sub ucrReceiverSecondOpt_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSkimrGroupByFactor.ControlValueChanged @@ -811,71 +837,71 @@ Public Class dlgDescribeTwoVariable Dim strTopLeft As String = "" Dim strSecondHeader As String = "" - clsMmtablePlusOperator.RemoveParameterByName("second_header_function") - - If rdoTwoVariable.Checked Then - If IsNumericByCategorical() Then - If ucrNudColumnFactors.GetText = 1 Then - strLeftTop = Chr(39) & "summary-variable" & Chr(39) - strTopLeft = strFactor - Else - strTopLeft = Chr(39) & "summary-variable" & Chr(39) - strLeftTop = strFactor - End If - ElseIf IsCategoricalByCategorical() Then - If ucrNudColumnFactors.GetText = 1 Then - strTopLeft = Chr(39) & "by_var" & Chr(39) - strLeftTop = strFactor - ElseIf ucrNudColumnFactors.GetText = 2 Then - strLeftTop = Chr(39) & "by_var" & Chr(39) - strTopLeft = strFactor - End If - End If - Else - If IsCategoricalByCategorical() Then - If ucrNudColumnFactors.GetText = 1 Then - clsSecondHeaderFunction.strRCommand = "header_left_top" - strLeftTop = Chr(39) & "by_var" & Chr(39) - strTopLeft = strFactor - ElseIf ucrNudColumnFactors.GetText = 2 Then - strLeftTop = strFactor - strTopLeft = Chr(39) & "by_var" & Chr(39) - clsSecondHeaderFunction.strRCommand = "header_top_left" - End If - strSecondHeader = ucrReceiverThreeVariableThirdVariable.GetVariableNames() - ElseIf IsNumericByCategorical() Then - If ucrNudColumnFactors.GetText = 1 Then - clsSecondHeaderFunction.strRCommand = "header_top_left" - strLeftTop = ucrReceiverThreeVariableThirdVariable.GetVariableNames() - strTopLeft = strFactor - ElseIf ucrNudColumnFactors.GetText = 2 Then - clsSecondHeaderFunction.strRCommand = "header_left_top" - strTopLeft = ucrReceiverThreeVariableThirdVariable.GetVariableNames() - strLeftTop = strFactor - End If - strSecondHeader = Chr(34) & "summary-variable" & Chr(34) - ElseIf IsCategoricalByNumeric() Then - If ucrNudColumnFactors.GetText = 1 Then - clsSecondHeaderFunction.strRCommand = "header_top_left" - strTopLeft = Chr(39) & "by_var" & Chr(39) - strLeftTop = strFactor - - ElseIf ucrNudColumnFactors.GetText = 2 Then - clsSecondHeaderFunction.strRCommand = "header_left_top" - strLeftTop = Chr(39) & "by_var" & Chr(39) - strTopLeft = strFactor - End If - strSecondHeader = Chr(34) & "summary-variable" & Chr(34) - End If - End If - clsHeaderTopLeftFunction.AddParameter("variable", strLeftTop, iPosition:=0) - clsHeaderLeftTopFunction.AddParameter("variable", strTopLeft, iPosition:=0) - - If strSecondHeader <> "" Then - clsSecondHeaderFunction.AddParameter("variable", strSecondHeader, iPosition:=0) - clsMmtablePlusOperator.AddParameter("second_header_function", - clsRFunctionParameter:=clsSecondHeaderFunction, iPosition:=3) - End If + 'clsMmtablePlusOperator.RemoveParameterByName("second_header_function") + + ' If rdoTwoVariable.Checked Then + 'If IsNumericByCategorical() Then + ' If ucrNudColumnFactors.GetText = 1 Then + ' strLeftTop = Chr(39) & "summary-variable" & Chr(39) + ' strTopLeft = strFactor + ' Else + ' strTopLeft = Chr(39) & "summary-variable" & Chr(39) + ' strLeftTop = strFactor + ' End If + 'ElseIf IsCategoricalByCategorical() Then + ' If ucrNudColumnFactors.GetText = 1 Then + ' strTopLeft = Chr(39) & "by_var" & Chr(39) + ' strLeftTop = strFactor + ' ElseIf ucrNudColumnFactors.GetText = 2 Then + ' strLeftTop = Chr(39) & "by_var" & Chr(39) + ' strTopLeft = strFactor + ' End If + 'End If + 'Else + ' If IsCategoricalByCategorical() Then + ' If ucrNudColumnFactors.GetText = 1 Then + ' clsSecondHeaderFunction.strRCommand = "header_left_top" + ' strLeftTop = Chr(39) & "by_var" & Chr(39) + ' strTopLeft = strFactor + ' ElseIf ucrNudColumnFactors.GetText = 2 Then + ' strLeftTop = strFactor + ' strTopLeft = Chr(39) & "by_var" & Chr(39) + ' clsSecondHeaderFunction.strRCommand = "header_top_left" + ' End If + ' strSecondHeader = ucrReceiverThreeVariableThirdVariable.GetVariableNames() + ' ElseIf IsNumericByCategorical() Then + ' If ucrNudColumnFactors.GetText = 1 Then + ' clsSecondHeaderFunction.strRCommand = "header_top_left" + ' strLeftTop = ucrReceiverThreeVariableThirdVariable.GetVariableNames() + ' strTopLeft = strFactor + ' ElseIf ucrNudColumnFactors.GetText = 2 Then + ' clsSecondHeaderFunction.strRCommand = "header_left_top" + ' strTopLeft = ucrReceiverThreeVariableThirdVariable.GetVariableNames() + ' strLeftTop = strFactor + ' End If + ' strSecondHeader = Chr(34) & "summary-variable" & Chr(34) + ' ElseIf IsCategoricalByNumeric() Then + ' If ucrNudColumnFactors.GetText = 1 Then + ' clsSecondHeaderFunction.strRCommand = "header_top_left" + ' strTopLeft = Chr(39) & "by_var" & Chr(39) + ' strLeftTop = strFactor + + ' ElseIf ucrNudColumnFactors.GetText = 2 Then + ' clsSecondHeaderFunction.strRCommand = "header_left_top" + ' strLeftTop = Chr(39) & "by_var" & Chr(39) + ' strTopLeft = strFactor + ' End If + ' strSecondHeader = Chr(34) & "summary-variable" & Chr(34) + ' End If + 'End If + 'clsHeaderTopLeftFunction.AddParameter("variable", strLeftTop, iPosition:=0) + 'clsHeaderLeftTopFunction.AddParameter("variable", strTopLeft, iPosition:=0) + + 'If strSecondHeader <> "" Then + ' clsSecondHeaderFunction.AddParameter("variable", strSecondHeader, iPosition:=0) + ' clsMmtablePlusOperator.AddParameter("second_header_function", + ' clsRFunctionParameter:=clsSecondHeaderFunction, iPosition:=3) + ' End If End Sub Private Sub AddRemoveFrequencyParameters() @@ -939,29 +965,29 @@ Public Class dlgDescribeTwoVariable Private Sub ucrSelectorDescribeTwoVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDescribeTwoVar.ControlValueChanged clsGroupByPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - clsMapPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + 'clsMapPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) End Sub Private Sub UpdateSummaryTableFunction() If rdoSkim.Checked Then Exit Sub End If - clsSummaryTableFunction.RemoveParameterByName("columns_to_summarise") + 'clsSummaryTableFunction.RemoveParameterByName("columns_to_summarise") If rdoTwoVariable.Checked Then If IsCategoricalByCategorical() Then - clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=1) + clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=4) ElseIf IsNumericByCategorical() Then - clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=1) - clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x", iPosition:=3) + clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) + 'clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x", iPosition:=3) End If ElseIf rdoThreeVariable.Checked Then If IsCategoricalByNumeric() Then - clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=1) + clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) clsSummaryTableFunction.AddParameter("columns_to_summarise", ucrReceiverThreeVariableThirdVariable.GetVariableNames(), iPosition:=3) ElseIf IsCategoricalByCategorical() Then clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=1) ElseIf IsNumericByCategorical() Then - clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=1) + clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x", iPosition:=3) End If End If @@ -990,12 +1016,12 @@ Public Class dlgDescribeTwoVariable End If Dim strSummaryName As String = "" - If IsCategoricalByCategorical() Then - strSummaryName = "Frequency tables" - ElseIf IsNumericByCategorical() Then - strSummaryName = "Summary tables" - Else - If rdoTwoVariable.Checked Then + 'If IsCategoricalByCategorical() Then + ' strSummaryName = "Frequency tables" + 'ElseIf IsNumericByCategorical() Then + ' strSummaryName = "Summary tables" + 'Else + If rdoTwoVariable.Checked Then If IsNumericByNumeric() Then strSummaryName = "Correlations" ElseIf IsCategoricalByNumeric() Then @@ -1010,7 +1036,7 @@ Public Class dlgDescribeTwoVariable strSummaryName = "" End If End If - End If + ' End If If strSummaryName <> "" Then lblSummaryName.Text = strSummaryName @@ -1195,14 +1221,14 @@ Public Class dlgDescribeTwoVariable sdgMissingOptions.ShowDialog() End Sub - Private Sub AddRemoveTopLeftVariable() - If IsNumericByCategorical() Then - clsCombineFrequencyFactorParameterFunction.RemoveParameterByName("factor_by") - clsMmtablePlusOperator.RemoveParameterByName("header_top_left") - clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftSummaryVariableFunction, iPosition:=1, bIncludeArgumentName:=False) - Else - clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", iPosition:=1, bIncludeArgumentName:=False) - clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftFunction, iPosition:=1) - End If - End Sub + 'Private Sub AddRemoveTopLeftVariable() + ' If IsNumericByCategorical() Then + ' clsCombineFrequencyFactorParameterFunction.RemoveParameterByName("factor_by") + ' clsMmtablePlusOperator.RemoveParameterByName("header_top_left") + ' clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftSummaryVariableFunction, iPosition:=1, bIncludeArgumentName:=False) + ' Else + ' clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", iPosition:=1, bIncludeArgumentName:=False) + ' clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftFunction, iPosition:=1) + ' End If + 'End Sub End Class From be1dfe2616cc8c94fe49e26af191a124e2a78843 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Mon, 29 May 2023 16:51:10 +0300 Subject: [PATCH 09/21] Refactoring two variable functions --- instat/dlgDescribeTwoVariable.vb | 279 ++++++++++++++++--------------- 1 file changed, 141 insertions(+), 138 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 3ca652ad368..d3314a51375 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -419,7 +419,7 @@ Public Class dlgDescribeTwoVariable clsSummaryTableCombineFactorsFunction.SetRCommand("c") clsSummaryTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") - clsSummaryTableFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + 'clsSummaryTableFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) 'clsSummaryTableFunction.AddParameter("factors", clsRFunctionParameter:=clsSummaryTableCombineFactorsFunction, iPosition:=3) 'clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=3) clsSummaryTableFunction.AddParameter("treat_columns_as_factor", "TRUE", iPosition:=3) @@ -430,7 +430,7 @@ Public Class dlgDescribeTwoVariable clsSummaryOperator.SetOperation("%>%") clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=0) - 'change ipositions after adding factor_cols + 'change ipositions after adding factor_cols (pivot wider function) clsSummaryOperator.AddParameter("gttbl", clsRFunctionParameter:=clsgtFunction, iPosition:=1) clsJoiningPipeOperator.SetOperation("%>%") @@ -440,7 +440,7 @@ Public Class dlgDescribeTwoVariable strRObjectFormatToAssignTo:=RObjectFormat.Html, strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, strObjectName:="last_table") - 'clsJoiningPipeOperator.bBrackets = False + clsJoiningPipeOperator.bBrackets = False 'clsSummaryTildeOperator.SetOperation("~") 'clsSummaryTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) @@ -519,7 +519,7 @@ Public Class dlgDescribeTwoVariable ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1) ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRCustomSummaryFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) - 'ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=3) + ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=3) 'ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsFormatTableMappingPipeOperator, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=4) @@ -527,7 +527,7 @@ Public Class dlgDescribeTwoVariable ucrNudSigFigs.AddAdditionalCodeParameterPair(clsThreeVariableCombineFrequencyParametersFunction, ucrNudSigFigs.GetParameter, iAdditionalPairNo:=1) - ucrChkOmitMissing.SetRCode(clsRCustomSummaryFunction, bReset) + ucrChkOmitMissing.SetRCode(clsSummaryTableFunction, bReset) ucrReceiverFirstVars.SetRCode(clsSummaryTableFunction, bReset) ucrReceiverSecondTwoVariableFactor.SetRCode(clsSummaryTableFunction, bReset) ucrSelectorDescribeTwoVar.SetRCode(clsRCorrelationFunction, bReset) @@ -618,7 +618,7 @@ Public Class dlgDescribeTwoVariable Private Sub ChangeBaseRCode() 'ucrBase.clsRsyntax.RemoveFromAfterCodes(clsEmptyOperator) 'ucrBase.clsRsyntax.RemoveFromAfterCodes(clsSecondEmptyOperator) - AddFormatTableMapToAfterCode() + 'AddFormatTableMapToAfterCode() If rdoSkim.Checked Then clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) @@ -637,6 +637,9 @@ Public Class dlgDescribeTwoVariable 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsRenameFunction, iPosition:=1) 'End If ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + ucrSaveTable.SetAssignToIfUncheckedValue("last_table") + ucrSaveTable.SetCheckBoxText("Save Table") 'ucrBase.clsRsyntax.AddToAfterCodes(clsEmptyOperator, 1) 'ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 3) End If @@ -653,17 +656,17 @@ Public Class dlgDescribeTwoVariable End If End Sub - Private Sub AddFormatTableMapToAfterCode() - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsFormatTableMappingPipeOperator) - If rdoSkim.Checked Then 'OrElse IsNothing(clsJoiningPipeOperator.GetParameter("pipe")) Then - Exit Sub - End If + 'Private Sub AddFormatTableMapToAfterCode() + ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsFormatTableMappingPipeOperator) + ' If rdoSkim.Checked Then 'OrElse IsNothing(clsJoiningPipeOperator.GetParameter("pipe")) Then + ' Exit Sub + ' End If - If IsNumericByCategorical() OrElse IsCategoricalByCategorical() _ - OrElse (IsCategoricalByNumeric() AndAlso rdoThreeVariable.Checked) Then - ucrBase.clsRsyntax.AddToAfterCodes(clsFormatTableMappingPipeOperator, 2) - End If - End Sub + ' If IsNumericByCategorical() OrElse IsCategoricalByCategorical() _ + ' OrElse (IsCategoricalByNumeric() AndAlso rdoThreeVariable.Checked) Then + ' ucrBase.clsRsyntax.AddToAfterCodes(clsFormatTableMappingPipeOperator, 2) + ' End If + 'End Sub Private Sub UpdateCombineFactorFunctions() If rdoSkim.Checked OrElse ucrReceiverFirstVars.IsEmpty Then @@ -682,35 +685,35 @@ Public Class dlgDescribeTwoVariable clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_one") clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_two") clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_three") - If rdoTwoVariable.Checked Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", - ucrReceiverSecondTwoVariableFactor.GetVariableNames(), iPosition:=0, - bIncludeArgumentName:=False) - If strFirstVariablesType = "categorical" Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", - ".x", iPosition:=1, - bIncludeArgumentName:=False) - End If - ElseIf rdoThreeVariable.Checked Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", - ucrReceiverThreeVariableSecondFactor.GetVariableNames(), iPosition:=0, - bIncludeArgumentName:=False) - If strSecondVariableType = "categorical" Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", - ucrReceiverThreeVariableThirdVariable.GetVariableNames(), iPosition:=1, - bIncludeArgumentName:=False) - End If - If IsCategoricalByCategorical() Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_three", - ".x", iPosition:=2, - bIncludeArgumentName:=False) - End If - If IsCategoricalByNumeric() Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", - ".x", iPosition:=1, - bIncludeArgumentName:=False) + 'If rdoTwoVariable.Checked Then + ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", + ' ucrReceiverSecondTwoVariableFactor.GetVariableNames(), iPosition:=0, + ' bIncludeArgumentName:=False) + ' If strFirstVariablesType = "categorical" Then + ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", + ' ".x", iPosition:=1, + ' bIncludeArgumentName:=False) + ' End If + If rdoThreeVariable.Checked Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", + ucrReceiverThreeVariableSecondFactor.GetVariableNames(), iPosition:=0, + bIncludeArgumentName:=False) + If strSecondVariableType = "categorical" Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", + ucrReceiverThreeVariableThirdVariable.GetVariableNames(), iPosition:=1, + bIncludeArgumentName:=False) + End If + If IsCategoricalByCategorical() Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_three", + ".x", iPosition:=2, + bIncludeArgumentName:=False) + End If + If IsCategoricalByNumeric() Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", + ".x", iPosition:=1, + bIncludeArgumentName:=False) + End If End If - End If End Sub Private Sub AddRemoveNAParameter() @@ -726,7 +729,7 @@ Public Class dlgDescribeTwoVariable End If End If End If - SwapMmtableHeaderFunctions() + 'SwapMmtableHeaderFunctions() 'Results() EnableDisableFrequencyControls() AddRemoveFrequencyParameters() @@ -778,7 +781,7 @@ Public Class dlgDescribeTwoVariable UpdateCombineFactorParameterFunction() ChangeLocations() EnableDisableFrequencyControls() - SwapMmtableHeaderFunctions() + 'SwapMmtableHeaderFunctions() AddRemoveNAParameter() HideFormatTableButton() End Sub @@ -826,83 +829,83 @@ Public Class dlgDescribeTwoVariable ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked End Sub - Private Sub SwapMmtableHeaderFunctions() - If rdoSkim.Checked Then - Exit Sub - End If - Dim ucrReceiverSecondFactor As ucrReceiverSingle = If(rdoTwoVariable.Checked, - ucrReceiverSecondTwoVariableFactor, ucrReceiverThreeVariableSecondFactor) - Dim strFactor As String = ucrReceiverSecondFactor.GetVariableNames - Dim strLeftTop As String = "" - Dim strTopLeft As String = "" - Dim strSecondHeader As String = "" - - 'clsMmtablePlusOperator.RemoveParameterByName("second_header_function") - - ' If rdoTwoVariable.Checked Then - 'If IsNumericByCategorical() Then - ' If ucrNudColumnFactors.GetText = 1 Then - ' strLeftTop = Chr(39) & "summary-variable" & Chr(39) - ' strTopLeft = strFactor - ' Else - ' strTopLeft = Chr(39) & "summary-variable" & Chr(39) - ' strLeftTop = strFactor - ' End If - 'ElseIf IsCategoricalByCategorical() Then - ' If ucrNudColumnFactors.GetText = 1 Then - ' strTopLeft = Chr(39) & "by_var" & Chr(39) - ' strLeftTop = strFactor - ' ElseIf ucrNudColumnFactors.GetText = 2 Then - ' strLeftTop = Chr(39) & "by_var" & Chr(39) - ' strTopLeft = strFactor - ' End If - 'End If - 'Else - ' If IsCategoricalByCategorical() Then - ' If ucrNudColumnFactors.GetText = 1 Then - ' clsSecondHeaderFunction.strRCommand = "header_left_top" - ' strLeftTop = Chr(39) & "by_var" & Chr(39) - ' strTopLeft = strFactor - ' ElseIf ucrNudColumnFactors.GetText = 2 Then - ' strLeftTop = strFactor - ' strTopLeft = Chr(39) & "by_var" & Chr(39) - ' clsSecondHeaderFunction.strRCommand = "header_top_left" - ' End If - ' strSecondHeader = ucrReceiverThreeVariableThirdVariable.GetVariableNames() - ' ElseIf IsNumericByCategorical() Then - ' If ucrNudColumnFactors.GetText = 1 Then - ' clsSecondHeaderFunction.strRCommand = "header_top_left" - ' strLeftTop = ucrReceiverThreeVariableThirdVariable.GetVariableNames() - ' strTopLeft = strFactor - ' ElseIf ucrNudColumnFactors.GetText = 2 Then - ' clsSecondHeaderFunction.strRCommand = "header_left_top" - ' strTopLeft = ucrReceiverThreeVariableThirdVariable.GetVariableNames() - ' strLeftTop = strFactor - ' End If - ' strSecondHeader = Chr(34) & "summary-variable" & Chr(34) - ' ElseIf IsCategoricalByNumeric() Then - ' If ucrNudColumnFactors.GetText = 1 Then - ' clsSecondHeaderFunction.strRCommand = "header_top_left" - ' strTopLeft = Chr(39) & "by_var" & Chr(39) - ' strLeftTop = strFactor - - ' ElseIf ucrNudColumnFactors.GetText = 2 Then - ' clsSecondHeaderFunction.strRCommand = "header_left_top" - ' strLeftTop = Chr(39) & "by_var" & Chr(39) - ' strTopLeft = strFactor - ' End If - ' strSecondHeader = Chr(34) & "summary-variable" & Chr(34) - ' End If - 'End If - 'clsHeaderTopLeftFunction.AddParameter("variable", strLeftTop, iPosition:=0) - 'clsHeaderLeftTopFunction.AddParameter("variable", strTopLeft, iPosition:=0) - - 'If strSecondHeader <> "" Then - ' clsSecondHeaderFunction.AddParameter("variable", strSecondHeader, iPosition:=0) - ' clsMmtablePlusOperator.AddParameter("second_header_function", - ' clsRFunctionParameter:=clsSecondHeaderFunction, iPosition:=3) - ' End If - End Sub + 'Private Sub SwapMmtableHeaderFunctions() + ' If rdoSkim.Checked Then + ' Exit Sub + ' End If + ' Dim ucrReceiverSecondFactor As ucrReceiverSingle = If(rdoTwoVariable.Checked, + ' ucrReceiverSecondTwoVariableFactor, ucrReceiverThreeVariableSecondFactor) + ' Dim strFactor As String = ucrReceiverSecondFactor.GetVariableNames + ' Dim strLeftTop As String = "" + ' Dim strTopLeft As String = "" + ' Dim strSecondHeader As String = "" + + 'clsMmtablePlusOperator.RemoveParameterByName("second_header_function") + + ' If rdoTwoVariable.Checked Then + 'If IsNumericByCategorical() Then + ' If ucrNudColumnFactors.GetText = 1 Then + ' strLeftTop = Chr(39) & "summary-variable" & Chr(39) + ' strTopLeft = strFactor + ' Else + ' strTopLeft = Chr(39) & "summary-variable" & Chr(39) + ' strLeftTop = strFactor + ' End If + 'ElseIf IsCategoricalByCategorical() Then + ' If ucrNudColumnFactors.GetText = 1 Then + ' strTopLeft = Chr(39) & "by_var" & Chr(39) + ' strLeftTop = strFactor + ' ElseIf ucrNudColumnFactors.GetText = 2 Then + ' strLeftTop = Chr(39) & "by_var" & Chr(39) + ' strTopLeft = strFactor + ' End If + 'End If + 'Else + ' If IsCategoricalByCategorical() Then + ' If ucrNudColumnFactors.GetText = 1 Then + ' clsSecondHeaderFunction.strRCommand = "header_left_top" + ' strLeftTop = Chr(39) & "by_var" & Chr(39) + ' strTopLeft = strFactor + ' ElseIf ucrNudColumnFactors.GetText = 2 Then + ' strLeftTop = strFactor + ' strTopLeft = Chr(39) & "by_var" & Chr(39) + ' clsSecondHeaderFunction.strRCommand = "header_top_left" + ' End If + ' strSecondHeader = ucrReceiverThreeVariableThirdVariable.GetVariableNames() + ' ElseIf IsNumericByCategorical() Then + ' If ucrNudColumnFactors.GetText = 1 Then + ' clsSecondHeaderFunction.strRCommand = "header_top_left" + ' strLeftTop = ucrReceiverThreeVariableThirdVariable.GetVariableNames() + ' strTopLeft = strFactor + ' ElseIf ucrNudColumnFactors.GetText = 2 Then + ' clsSecondHeaderFunction.strRCommand = "header_left_top" + ' strTopLeft = ucrReceiverThreeVariableThirdVariable.GetVariableNames() + ' strLeftTop = strFactor + ' End If + ' strSecondHeader = Chr(34) & "summary-variable" & Chr(34) + ' ElseIf IsCategoricalByNumeric() Then + ' If ucrNudColumnFactors.GetText = 1 Then + ' clsSecondHeaderFunction.strRCommand = "header_top_left" + ' strTopLeft = Chr(39) & "by_var" & Chr(39) + ' strLeftTop = strFactor + + ' ElseIf ucrNudColumnFactors.GetText = 2 Then + ' clsSecondHeaderFunction.strRCommand = "header_left_top" + ' strLeftTop = Chr(39) & "by_var" & Chr(39) + ' strTopLeft = strFactor + ' End If + ' strSecondHeader = Chr(34) & "summary-variable" & Chr(34) + ' End If + 'End If + 'clsHeaderTopLeftFunction.AddParameter("variable", strLeftTop, iPosition:=0) + 'clsHeaderLeftTopFunction.AddParameter("variable", strTopLeft, iPosition:=0) + + 'If strSecondHeader <> "" Then + ' clsSecondHeaderFunction.AddParameter("variable", strSecondHeader, iPosition:=0) + ' clsMmtablePlusOperator.AddParameter("second_header_function", + ' clsRFunctionParameter:=clsSecondHeaderFunction, iPosition:=3) + ' End If + 'End Sub Private Sub AddRemoveFrequencyParameters() If rdoSkim.Checked Then @@ -960,7 +963,7 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub ucrNudColumnFactors_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudColumnFactors.ControlValueChanged - SwapMmtableHeaderFunctions() + 'SwapMmtableHeaderFunctions() End Sub Private Sub ucrSelectorDescribeTwoVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDescribeTwoVar.ControlValueChanged @@ -985,10 +988,10 @@ Public Class dlgDescribeTwoVariable clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) clsSummaryTableFunction.AddParameter("columns_to_summarise", ucrReceiverThreeVariableThirdVariable.GetVariableNames(), iPosition:=3) ElseIf IsCategoricalByCategorical() Then - clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=1) + clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=4) ElseIf IsNumericByCategorical() Then clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) - clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x", iPosition:=3) + 'clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x", iPosition:=3) End If End If End Sub @@ -1002,7 +1005,7 @@ Public Class dlgDescribeTwoVariable ChangeLocations() EnableDisableFrequencyControls() UpdateSummaryTableFunction() - SwapMmtableHeaderFunctions() + 'SwapMmtableHeaderFunctions() AddRemoveFrequencyParameters() EnableDisableFrequencyControls() AddRemoveNAParameter() @@ -1016,12 +1019,12 @@ Public Class dlgDescribeTwoVariable End If Dim strSummaryName As String = "" - 'If IsCategoricalByCategorical() Then - ' strSummaryName = "Frequency tables" - 'ElseIf IsNumericByCategorical() Then - ' strSummaryName = "Summary tables" - 'Else - If rdoTwoVariable.Checked Then + If IsCategoricalByCategorical() Then + strSummaryName = "Frequency tables" + ElseIf IsNumericByCategorical() Then + strSummaryName = "Summary tables" + Else + If rdoTwoVariable.Checked Then If IsNumericByNumeric() Then strSummaryName = "Correlations" ElseIf IsCategoricalByNumeric() Then @@ -1036,7 +1039,7 @@ Public Class dlgDescribeTwoVariable strSummaryName = "" End If End If - ' End If + End If If strSummaryName <> "" Then lblSummaryName.Text = strSummaryName @@ -1076,7 +1079,7 @@ Public Class dlgDescribeTwoVariable UpdateCombineFactorParameterFunction() ChangeLocations() EnableDisableFrequencyControls() - SwapMmtableHeaderFunctions() + ' SwapMmtableHeaderFunctions() AddRemoveNAParameter() HideFormatTableButton() TestOKEnabled() @@ -1120,7 +1123,7 @@ Public Class dlgDescribeTwoVariable UpdateCombineFactorFunctions() ChangeLocations() EnableDisableFrequencyControls() - SwapMmtableHeaderFunctions() + ' SwapMmtableHeaderFunctions() AddRemoveFrequencyParameters() AddRemoveNAParameter() HideFormatTableButton() @@ -1129,7 +1132,7 @@ Public Class dlgDescribeTwoVariable Private Sub ucrReceiverThreeVariableSecondFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverThreeVariableSecondFactor.ControlValueChanged UpdateCombineFactorParameterFunction() - SwapMmtableHeaderFunctions() + ' SwapMmtableHeaderFunctions() End Sub Private Sub controls_contentChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayAsPercentage.ControlContentsChanged, @@ -1213,7 +1216,7 @@ Public Class dlgDescribeTwoVariable clsNewMutableOPerator:=clsMmtablePlusOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, clsNewgtExtraThemesFunction:=clsgtExtraThemesFuction, clsNewTabStyleCellTextFunction:=clsTabStyleCellTextFunction, clsNewTabStyleFunction:=clsTabStyleFunction, clsNewTabStylePxFunction:=clsTabStylePxFunction, bReset:=bReset) sdgFormatSummaryTables.ShowDialog() - AddFormatTableMapToAfterCode() + ' AddFormatTableMapToAfterCode() End Sub Private Sub cmdMissingOptions_Click(sender As Object, e As EventArgs) Handles cmdMissingOptions.Click sdgMissingOptions.SetRFunction(clsNewSummaryFunction:=clsFrequencyTables2Function, clsNewConcFunction:=clsCombineFunction, bReset:=bResetSubdialog) From e0379dde23ba119ac8b04e9d97b455afc982a9f8 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Wed, 31 May 2023 11:31:26 +0300 Subject: [PATCH 10/21] Minor changes --- instat/dlgDescribeTwoVariable.Designer.vb | 498 +++++++++++----------- instat/dlgDescribeTwoVariable.vb | 138 +++--- 2 files changed, 322 insertions(+), 314 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index 459596030cd..b21ab57442f 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -38,35 +38,16 @@ Partial Class dlgDescribeTwoVariable 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.ucrNudColumnFactors = New instat.ucrNud() - Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() Me.lblFactorsAsPercentage = New System.Windows.Forms.Label() - Me.ucrChkPercentageProportion = New instat.ucrCheck() - Me.ucrNudSigFigs = New instat.ucrNud() - Me.ucrInputMarginName = New instat.ucrInputTextBox() Me.lblSigFigs = New System.Windows.Forms.Label() - Me.ucrChkDisplayMargins = New instat.ucrCheck() Me.grpThreeVariablePercentages = New System.Windows.Forms.GroupBox() - Me.ucrReceiverThreeVariablePercentage = New instat.ucrReceiverSingle() Me.lblThreeVariableFactorAsPercentages = New System.Windows.Forms.Label() - Me.ucrChkThreeVariablePercentageProportion = New instat.ucrCheck() - Me.ucrChkThreeVariableDisplayAsPercentage = New instat.ucrCheck() Me.rdoThreeVariable = New System.Windows.Forms.RadioButton() Me.lblColumnFactors = New System.Windows.Forms.Label() Me.cmdFormatTable = New System.Windows.Forms.Button() Me.lblThreeVariableSecondFactor = New System.Windows.Forms.Label() - Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() - Me.ucrBase = New instat.ucrButtons() - Me.ucrReceiverThreeVariableThirdVariable = New instat.ucrReceiverSingle() - Me.ucrReceiverSecondSkimrGroupByFactor = New instat.ucrReceiverSingle() - Me.ucrReceiverSkimrGroupByFactor = New instat.ucrReceiverSingle() - Me.ucrPnlDescribe = New instat.UcrPanel() - Me.ucrReceiverSecondTwoVariableFactor = New instat.ucrReceiverSingle() - Me.ucrSelectorDescribeTwoVar = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() Me.cmdSummaries = New System.Windows.Forms.Button() Me.grpOptions = New System.Windows.Forms.GroupBox() - Me.ucrChkOmitMissing = New instat.ucrCheck() Me.lbSecondVariable = New System.Windows.Forms.Label() Me.lblFirstVariable = New System.Windows.Forms.Label() Me.grpFrequency = New System.Windows.Forms.GroupBox() @@ -85,9 +66,28 @@ Partial Class dlgDescribeTwoVariable Me.lblSecondGroupByFactor = New System.Windows.Forms.Label() Me.grpTwoVariablePercentages = New System.Windows.Forms.GroupBox() Me.rdoTwoVariable = New System.Windows.Forms.RadioButton() - Me.ucrReceiverFirstVars = New instat.ucrReceiverMultiple() Me.cmdMissingOptions = New System.Windows.Forms.Button() Me.ucrSaveTable = New instat.ucrSave() + Me.ucrReceiverThreeVariablePercentage = New instat.ucrReceiverSingle() + Me.ucrChkThreeVariablePercentageProportion = New instat.ucrCheck() + Me.ucrChkThreeVariableDisplayAsPercentage = New instat.ucrCheck() + Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() + Me.ucrBase = New instat.ucrButtons() + Me.ucrReceiverThreeVariableThirdVariable = New instat.ucrReceiverSingle() + Me.ucrReceiverSecondSkimrGroupByFactor = New instat.ucrReceiverSingle() + Me.ucrReceiverSkimrGroupByFactor = New instat.ucrReceiverSingle() + Me.ucrReceiverSecondTwoVariableFactor = New instat.ucrReceiverSingle() + Me.ucrSelectorDescribeTwoVar = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrChkOmitMissing = New instat.ucrCheck() + Me.ucrNudColumnFactors = New instat.ucrNud() + Me.ucrNudSigFigs = New instat.ucrNud() + Me.ucrInputMarginName = New instat.ucrInputTextBox() + Me.ucrChkDisplayMargins = New instat.ucrCheck() + Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() + Me.ucrChkPercentageProportion = New instat.ucrCheck() + Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() + Me.ucrReceiverFirstVars = New instat.ucrReceiverMultiple() + Me.ucrPnlDescribe = New instat.UcrPanel() Me.grpThreeVariablePercentages.SuspendLayout() Me.grpOptions.SuspendLayout() Me.grpFrequency.SuspendLayout() @@ -95,32 +95,6 @@ Partial Class dlgDescribeTwoVariable Me.grpTwoVariablePercentages.SuspendLayout() Me.SuspendLayout() ' - 'ucrNudColumnFactors - ' - Me.ucrNudColumnFactors.AutoSize = True - Me.ucrNudColumnFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudColumnFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudColumnFactors.Location = New System.Drawing.Point(129, 48) - Me.ucrNudColumnFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudColumnFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudColumnFactors.Name = "ucrNudColumnFactors" - Me.ucrNudColumnFactors.Size = New System.Drawing.Size(50, 20) - Me.ucrNudColumnFactors.TabIndex = 6 - Me.ucrNudColumnFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrReceiverPercentages - ' - Me.ucrReceiverPercentages.AutoSize = True - Me.ucrReceiverPercentages.frmParent = Me - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(21, 63) - 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.strNcFilePath = "" - Me.ucrReceiverPercentages.TabIndex = 8 - Me.ucrReceiverPercentages.ucrSelector = Nothing - ' 'lblFactorsAsPercentage ' Me.lblFactorsAsPercentage.AutoSize = True @@ -132,39 +106,6 @@ Partial Class dlgDescribeTwoVariable Me.lblFactorsAsPercentage.Tag = "Of Factor (Optional):" Me.lblFactorsAsPercentage.Text = "Factors as Percentage:" ' - 'ucrChkPercentageProportion - ' - Me.ucrChkPercentageProportion.AutoSize = True - Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(14, 86) - Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(154, 23) - Me.ucrChkPercentageProportion.TabIndex = 3 - ' - '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(129, 22) - 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 = 5 - Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrInputMarginName - ' - Me.ucrInputMarginName.AddQuotesIfUnrecognised = True - Me.ucrInputMarginName.AutoSize = True - Me.ucrInputMarginName.IsMultiline = False - Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(53, 98) - Me.ucrInputMarginName.Name = "ucrInputMarginName" - Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) - Me.ucrInputMarginName.TabIndex = 4 - ' 'lblSigFigs ' Me.lblSigFigs.AutoSize = True @@ -176,15 +117,6 @@ Partial Class dlgDescribeTwoVariable Me.lblSigFigs.Tag = "Significant_Figures:" Me.lblSigFigs.Text = "Significant Figures:" ' - 'ucrChkDisplayMargins - ' - Me.ucrChkDisplayMargins.AutoSize = True - Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(9, 74) - Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" - Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(149, 23) - Me.ucrChkDisplayMargins.TabIndex = 2 - ' 'grpThreeVariablePercentages ' Me.grpThreeVariablePercentages.Controls.Add(Me.ucrReceiverThreeVariablePercentage) @@ -198,19 +130,6 @@ Partial Class dlgDescribeTwoVariable Me.grpThreeVariablePercentages.TabStop = False Me.grpThreeVariablePercentages.Text = "Percentages" ' - 'ucrReceiverThreeVariablePercentage - ' - Me.ucrReceiverThreeVariablePercentage.AutoSize = True - Me.ucrReceiverThreeVariablePercentage.frmParent = Me - Me.ucrReceiverThreeVariablePercentage.Location = New System.Drawing.Point(21, 63) - Me.ucrReceiverThreeVariablePercentage.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverThreeVariablePercentage.Name = "ucrReceiverThreeVariablePercentage" - Me.ucrReceiverThreeVariablePercentage.Selector = Nothing - Me.ucrReceiverThreeVariablePercentage.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverThreeVariablePercentage.strNcFilePath = "" - Me.ucrReceiverThreeVariablePercentage.TabIndex = 3 - Me.ucrReceiverThreeVariablePercentage.ucrSelector = Nothing - ' 'lblThreeVariableFactorAsPercentages ' Me.lblThreeVariableFactorAsPercentages.AutoSize = True @@ -222,24 +141,6 @@ Partial Class dlgDescribeTwoVariable Me.lblThreeVariableFactorAsPercentages.Tag = "Factors as Percentage:" Me.lblThreeVariableFactorAsPercentages.Text = "Of Factor (Optional):" ' - 'ucrChkThreeVariablePercentageProportion - ' - Me.ucrChkThreeVariablePercentageProportion.AutoSize = True - Me.ucrChkThreeVariablePercentageProportion.Checked = False - Me.ucrChkThreeVariablePercentageProportion.Location = New System.Drawing.Point(14, 88) - Me.ucrChkThreeVariablePercentageProportion.Name = "ucrChkThreeVariablePercentageProportion" - Me.ucrChkThreeVariablePercentageProportion.Size = New System.Drawing.Size(136, 23) - Me.ucrChkThreeVariablePercentageProportion.TabIndex = 0 - ' - 'ucrChkThreeVariableDisplayAsPercentage - ' - Me.ucrChkThreeVariableDisplayAsPercentage.AutoSize = True - Me.ucrChkThreeVariableDisplayAsPercentage.Checked = False - Me.ucrChkThreeVariableDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) - Me.ucrChkThreeVariableDisplayAsPercentage.Name = "ucrChkThreeVariableDisplayAsPercentage" - Me.ucrChkThreeVariableDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) - Me.ucrChkThreeVariableDisplayAsPercentage.TabIndex = 0 - ' 'rdoThreeVariable ' Me.rdoThreeVariable.Appearance = System.Windows.Forms.Appearance.Button @@ -287,109 +188,6 @@ Partial Class dlgDescribeTwoVariable Me.lblThreeVariableSecondFactor.Tag = "" Me.lblThreeVariableSecondFactor.Text = "Second Variable :" ' - 'ucrReceiverThreeVariableSecondFactor - ' - Me.ucrReceiverThreeVariableSecondFactor.AutoSize = True - Me.ucrReceiverThreeVariableSecondFactor.frmParent = Me - Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(264, 176) - Me.ucrReceiverThreeVariableSecondFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverThreeVariableSecondFactor.Name = "ucrReceiverThreeVariableSecondFactor" - Me.ucrReceiverThreeVariableSecondFactor.Selector = Nothing - Me.ucrReceiverThreeVariableSecondFactor.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverThreeVariableSecondFactor.strNcFilePath = "" - Me.ucrReceiverThreeVariableSecondFactor.TabIndex = 36 - Me.ucrReceiverThreeVariableSecondFactor.ucrSelector = Nothing - ' - 'ucrBase - ' - Me.ucrBase.AutoSize = True - Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(8, 477) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(408, 52) - Me.ucrBase.TabIndex = 43 - ' - 'ucrReceiverThreeVariableThirdVariable - ' - Me.ucrReceiverThreeVariableThirdVariable.AutoSize = True - Me.ucrReceiverThreeVariableThirdVariable.frmParent = Me - Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(265, 219) - Me.ucrReceiverThreeVariableThirdVariable.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverThreeVariableThirdVariable.Name = "ucrReceiverThreeVariableThirdVariable" - Me.ucrReceiverThreeVariableThirdVariable.Selector = Nothing - Me.ucrReceiverThreeVariableThirdVariable.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverThreeVariableThirdVariable.strNcFilePath = "" - Me.ucrReceiverThreeVariableThirdVariable.TabIndex = 38 - Me.ucrReceiverThreeVariableThirdVariable.ucrSelector = Nothing - ' - 'ucrReceiverSecondSkimrGroupByFactor - ' - Me.ucrReceiverSecondSkimrGroupByFactor.AutoSize = True - Me.ucrReceiverSecondSkimrGroupByFactor.frmParent = Me - Me.ucrReceiverSecondSkimrGroupByFactor.Location = New System.Drawing.Point(265, 219) - Me.ucrReceiverSecondSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverSecondSkimrGroupByFactor.Name = "ucrReceiverSecondSkimrGroupByFactor" - Me.ucrReceiverSecondSkimrGroupByFactor.Selector = Nothing - Me.ucrReceiverSecondSkimrGroupByFactor.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverSecondSkimrGroupByFactor.strNcFilePath = "" - Me.ucrReceiverSecondSkimrGroupByFactor.TabIndex = 34 - Me.ucrReceiverSecondSkimrGroupByFactor.ucrSelector = Nothing - ' - 'ucrReceiverSkimrGroupByFactor - ' - Me.ucrReceiverSkimrGroupByFactor.AutoSize = True - Me.ucrReceiverSkimrGroupByFactor.frmParent = Me - Me.ucrReceiverSkimrGroupByFactor.Location = New System.Drawing.Point(264, 176) - Me.ucrReceiverSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverSkimrGroupByFactor.Name = "ucrReceiverSkimrGroupByFactor" - Me.ucrReceiverSkimrGroupByFactor.Selector = Nothing - Me.ucrReceiverSkimrGroupByFactor.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverSkimrGroupByFactor.strNcFilePath = "" - Me.ucrReceiverSkimrGroupByFactor.TabIndex = 32 - Me.ucrReceiverSkimrGroupByFactor.ucrSelector = Nothing - ' - 'ucrPnlDescribe - ' - Me.ucrPnlDescribe.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlDescribe.Location = New System.Drawing.Point(39, 3) - Me.ucrPnlDescribe.Name = "ucrPnlDescribe" - Me.ucrPnlDescribe.Size = New System.Drawing.Size(317, 34) - Me.ucrPnlDescribe.TabIndex = 22 - ' - 'ucrReceiverSecondTwoVariableFactor - ' - Me.ucrReceiverSecondTwoVariableFactor.AutoSize = True - Me.ucrReceiverSecondTwoVariableFactor.frmParent = Me - Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(264, 176) - Me.ucrReceiverSecondTwoVariableFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverSecondTwoVariableFactor.Name = "ucrReceiverSecondTwoVariableFactor" - Me.ucrReceiverSecondTwoVariableFactor.Selector = Nothing - Me.ucrReceiverSecondTwoVariableFactor.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverSecondTwoVariableFactor.strNcFilePath = "" - Me.ucrReceiverSecondTwoVariableFactor.TabIndex = 25 - Me.ucrReceiverSecondTwoVariableFactor.ucrSelector = Nothing - ' - 'ucrSelectorDescribeTwoVar - ' - Me.ucrSelectorDescribeTwoVar.AutoSize = True - Me.ucrSelectorDescribeTwoVar.bDropUnusedFilterLevels = False - Me.ucrSelectorDescribeTwoVar.bShowHiddenColumns = False - Me.ucrSelectorDescribeTwoVar.bUseCurrentFilter = True - Me.ucrSelectorDescribeTwoVar.Location = New System.Drawing.Point(3, 36) - Me.ucrSelectorDescribeTwoVar.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorDescribeTwoVar.Name = "ucrSelectorDescribeTwoVar" - Me.ucrSelectorDescribeTwoVar.Size = New System.Drawing.Size(213, 183) - Me.ucrSelectorDescribeTwoVar.TabIndex = 28 - ' - 'ucrChkDisplayAsPercentage - ' - Me.ucrChkDisplayAsPercentage.AutoSize = True - Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) - Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) - Me.ucrChkDisplayAsPercentage.TabIndex = 0 - ' 'cmdSummaries ' Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl @@ -405,22 +203,14 @@ Partial Class dlgDescribeTwoVariable ' Me.grpOptions.Controls.Add(Me.ucrChkOmitMissing) Me.grpOptions.Controls.Add(Me.cmdSummaries) + Me.grpOptions.Controls.Add(Me.cmdMissingOptions) Me.grpOptions.Location = New System.Drawing.Point(249, 247) Me.grpOptions.Name = "grpOptions" - Me.grpOptions.Size = New System.Drawing.Size(155, 76) + Me.grpOptions.Size = New System.Drawing.Size(155, 108) Me.grpOptions.TabIndex = 40 Me.grpOptions.TabStop = False Me.grpOptions.Text = "Options" ' - 'ucrChkOmitMissing - ' - Me.ucrChkOmitMissing.AutoSize = True - Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(9, 19) - Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) - Me.ucrChkOmitMissing.TabIndex = 0 - ' 'lbSecondVariable ' Me.lbSecondVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl @@ -625,25 +415,12 @@ Partial Class dlgDescribeTwoVariable Me.rdoTwoVariable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoTwoVariable.UseVisualStyleBackColor = True ' - 'ucrReceiverFirstVars - ' - Me.ucrReceiverFirstVars.AutoSize = True - Me.ucrReceiverFirstVars.frmParent = Me - Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(264, 73) - Me.ucrReceiverFirstVars.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverFirstVars.Name = "ucrReceiverFirstVars" - Me.ucrReceiverFirstVars.Selector = Nothing - Me.ucrReceiverFirstVars.Size = New System.Drawing.Size(120, 79) - Me.ucrReceiverFirstVars.strNcFilePath = "" - Me.ucrReceiverFirstVars.TabIndex = 30 - Me.ucrReceiverFirstVars.ucrSelector = Nothing - ' 'cmdMissingOptions ' Me.cmdMissingOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdMissingOptions.Location = New System.Drawing.Point(272, 378) + Me.cmdMissingOptions.Location = New System.Drawing.Point(6, 72) Me.cmdMissingOptions.Name = "cmdMissingOptions" - Me.cmdMissingOptions.Size = New System.Drawing.Size(104, 23) + Me.cmdMissingOptions.Size = New System.Drawing.Size(105, 23) Me.cmdMissingOptions.TabIndex = 46 Me.cmdMissingOptions.Text = "Missing Options..." Me.cmdMissingOptions.UseVisualStyleBackColor = True @@ -657,14 +434,238 @@ Partial Class dlgDescribeTwoVariable Me.ucrSaveTable.Size = New System.Drawing.Size(399, 34) Me.ucrSaveTable.TabIndex = 47 ' + 'ucrReceiverThreeVariablePercentage + ' + Me.ucrReceiverThreeVariablePercentage.AutoSize = True + Me.ucrReceiverThreeVariablePercentage.frmParent = Nothing + Me.ucrReceiverThreeVariablePercentage.Location = New System.Drawing.Point(21, 63) + Me.ucrReceiverThreeVariablePercentage.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverThreeVariablePercentage.Name = "ucrReceiverThreeVariablePercentage" + Me.ucrReceiverThreeVariablePercentage.Selector = Nothing + Me.ucrReceiverThreeVariablePercentage.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverThreeVariablePercentage.strNcFilePath = "" + Me.ucrReceiverThreeVariablePercentage.TabIndex = 3 + Me.ucrReceiverThreeVariablePercentage.ucrSelector = Nothing + ' + 'ucrChkThreeVariablePercentageProportion + ' + Me.ucrChkThreeVariablePercentageProportion.AutoSize = True + Me.ucrChkThreeVariablePercentageProportion.Checked = False + Me.ucrChkThreeVariablePercentageProportion.Location = New System.Drawing.Point(14, 88) + Me.ucrChkThreeVariablePercentageProportion.Name = "ucrChkThreeVariablePercentageProportion" + Me.ucrChkThreeVariablePercentageProportion.Size = New System.Drawing.Size(136, 23) + Me.ucrChkThreeVariablePercentageProportion.TabIndex = 0 + ' + 'ucrChkThreeVariableDisplayAsPercentage + ' + Me.ucrChkThreeVariableDisplayAsPercentage.AutoSize = True + Me.ucrChkThreeVariableDisplayAsPercentage.Checked = False + Me.ucrChkThreeVariableDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) + Me.ucrChkThreeVariableDisplayAsPercentage.Name = "ucrChkThreeVariableDisplayAsPercentage" + Me.ucrChkThreeVariableDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) + Me.ucrChkThreeVariableDisplayAsPercentage.TabIndex = 0 + ' + 'ucrReceiverThreeVariableSecondFactor + ' + Me.ucrReceiverThreeVariableSecondFactor.AutoSize = True + Me.ucrReceiverThreeVariableSecondFactor.frmParent = Me + Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(264, 176) + Me.ucrReceiverThreeVariableSecondFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverThreeVariableSecondFactor.Name = "ucrReceiverThreeVariableSecondFactor" + Me.ucrReceiverThreeVariableSecondFactor.Selector = Nothing + Me.ucrReceiverThreeVariableSecondFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverThreeVariableSecondFactor.strNcFilePath = "" + Me.ucrReceiverThreeVariableSecondFactor.TabIndex = 36 + Me.ucrReceiverThreeVariableSecondFactor.ucrSelector = Nothing + ' + 'ucrBase + ' + Me.ucrBase.AutoSize = True + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(8, 477) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.TabIndex = 43 + ' + 'ucrReceiverThreeVariableThirdVariable + ' + Me.ucrReceiverThreeVariableThirdVariable.AutoSize = True + Me.ucrReceiverThreeVariableThirdVariable.frmParent = Me + Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(265, 219) + Me.ucrReceiverThreeVariableThirdVariable.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverThreeVariableThirdVariable.Name = "ucrReceiverThreeVariableThirdVariable" + Me.ucrReceiverThreeVariableThirdVariable.Selector = Nothing + Me.ucrReceiverThreeVariableThirdVariable.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverThreeVariableThirdVariable.strNcFilePath = "" + Me.ucrReceiverThreeVariableThirdVariable.TabIndex = 38 + Me.ucrReceiverThreeVariableThirdVariable.ucrSelector = Nothing + ' + 'ucrReceiverSecondSkimrGroupByFactor + ' + Me.ucrReceiverSecondSkimrGroupByFactor.AutoSize = True + Me.ucrReceiverSecondSkimrGroupByFactor.frmParent = Me + Me.ucrReceiverSecondSkimrGroupByFactor.Location = New System.Drawing.Point(265, 219) + Me.ucrReceiverSecondSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSecondSkimrGroupByFactor.Name = "ucrReceiverSecondSkimrGroupByFactor" + Me.ucrReceiverSecondSkimrGroupByFactor.Selector = Nothing + Me.ucrReceiverSecondSkimrGroupByFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverSecondSkimrGroupByFactor.strNcFilePath = "" + Me.ucrReceiverSecondSkimrGroupByFactor.TabIndex = 34 + Me.ucrReceiverSecondSkimrGroupByFactor.ucrSelector = Nothing + ' + 'ucrReceiverSkimrGroupByFactor + ' + Me.ucrReceiverSkimrGroupByFactor.AutoSize = True + Me.ucrReceiverSkimrGroupByFactor.frmParent = Me + Me.ucrReceiverSkimrGroupByFactor.Location = New System.Drawing.Point(264, 176) + Me.ucrReceiverSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSkimrGroupByFactor.Name = "ucrReceiverSkimrGroupByFactor" + Me.ucrReceiverSkimrGroupByFactor.Selector = Nothing + Me.ucrReceiverSkimrGroupByFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverSkimrGroupByFactor.strNcFilePath = "" + Me.ucrReceiverSkimrGroupByFactor.TabIndex = 32 + Me.ucrReceiverSkimrGroupByFactor.ucrSelector = Nothing + ' + 'ucrReceiverSecondTwoVariableFactor + ' + Me.ucrReceiverSecondTwoVariableFactor.AutoSize = True + Me.ucrReceiverSecondTwoVariableFactor.frmParent = Me + Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(264, 176) + Me.ucrReceiverSecondTwoVariableFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSecondTwoVariableFactor.Name = "ucrReceiverSecondTwoVariableFactor" + Me.ucrReceiverSecondTwoVariableFactor.Selector = Nothing + Me.ucrReceiverSecondTwoVariableFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverSecondTwoVariableFactor.strNcFilePath = "" + Me.ucrReceiverSecondTwoVariableFactor.TabIndex = 25 + Me.ucrReceiverSecondTwoVariableFactor.ucrSelector = Nothing + ' + 'ucrSelectorDescribeTwoVar + ' + Me.ucrSelectorDescribeTwoVar.AutoSize = True + Me.ucrSelectorDescribeTwoVar.bDropUnusedFilterLevels = False + Me.ucrSelectorDescribeTwoVar.bShowHiddenColumns = False + Me.ucrSelectorDescribeTwoVar.bUseCurrentFilter = True + Me.ucrSelectorDescribeTwoVar.Location = New System.Drawing.Point(3, 36) + Me.ucrSelectorDescribeTwoVar.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorDescribeTwoVar.Name = "ucrSelectorDescribeTwoVar" + Me.ucrSelectorDescribeTwoVar.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorDescribeTwoVar.TabIndex = 28 + ' + 'ucrChkOmitMissing + ' + Me.ucrChkOmitMissing.AutoSize = True + Me.ucrChkOmitMissing.Checked = False + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(9, 19) + Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) + Me.ucrChkOmitMissing.TabIndex = 0 + ' + 'ucrNudColumnFactors + ' + Me.ucrNudColumnFactors.AutoSize = True + Me.ucrNudColumnFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudColumnFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudColumnFactors.Location = New System.Drawing.Point(129, 48) + Me.ucrNudColumnFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudColumnFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudColumnFactors.Name = "ucrNudColumnFactors" + Me.ucrNudColumnFactors.Size = New System.Drawing.Size(50, 20) + Me.ucrNudColumnFactors.TabIndex = 6 + Me.ucrNudColumnFactors.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(129, 22) + 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 = 5 + Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputMarginName + ' + Me.ucrInputMarginName.AddQuotesIfUnrecognised = True + Me.ucrInputMarginName.AutoSize = True + Me.ucrInputMarginName.IsMultiline = False + Me.ucrInputMarginName.IsReadOnly = False + Me.ucrInputMarginName.Location = New System.Drawing.Point(53, 98) + Me.ucrInputMarginName.Name = "ucrInputMarginName" + Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) + Me.ucrInputMarginName.TabIndex = 4 + ' + 'ucrChkDisplayMargins + ' + Me.ucrChkDisplayMargins.AutoSize = True + Me.ucrChkDisplayMargins.Checked = False + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(9, 74) + Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" + Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(149, 23) + Me.ucrChkDisplayMargins.TabIndex = 2 + ' + 'ucrReceiverPercentages + ' + Me.ucrReceiverPercentages.AutoSize = True + Me.ucrReceiverPercentages.frmParent = Nothing + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(21, 63) + 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.strNcFilePath = "" + Me.ucrReceiverPercentages.TabIndex = 8 + Me.ucrReceiverPercentages.ucrSelector = Nothing + ' + 'ucrChkPercentageProportion + ' + Me.ucrChkPercentageProportion.AutoSize = True + Me.ucrChkPercentageProportion.Checked = False + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(14, 86) + Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(154, 23) + Me.ucrChkPercentageProportion.TabIndex = 3 + ' + 'ucrChkDisplayAsPercentage + ' + Me.ucrChkDisplayAsPercentage.AutoSize = True + Me.ucrChkDisplayAsPercentage.Checked = False + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) + Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) + Me.ucrChkDisplayAsPercentage.TabIndex = 0 + ' + 'ucrReceiverFirstVars + ' + Me.ucrReceiverFirstVars.AutoSize = True + Me.ucrReceiverFirstVars.frmParent = Me + Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(264, 73) + Me.ucrReceiverFirstVars.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverFirstVars.Name = "ucrReceiverFirstVars" + Me.ucrReceiverFirstVars.Selector = Nothing + Me.ucrReceiverFirstVars.Size = New System.Drawing.Size(120, 79) + Me.ucrReceiverFirstVars.strNcFilePath = "" + Me.ucrReceiverFirstVars.TabIndex = 30 + Me.ucrReceiverFirstVars.ucrSelector = Nothing + ' + 'ucrPnlDescribe + ' + Me.ucrPnlDescribe.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlDescribe.Location = New System.Drawing.Point(39, 3) + Me.ucrPnlDescribe.Name = "ucrPnlDescribe" + Me.ucrPnlDescribe.Size = New System.Drawing.Size(317, 34) + Me.ucrPnlDescribe.TabIndex = 22 + ' 'dlgDescribeTwoVariable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ClientSize = New System.Drawing.Size(419, 530) + Me.Controls.Add(Me.grpOptions) Me.Controls.Add(Me.ucrSaveTable) - Me.Controls.Add(Me.cmdMissingOptions) Me.Controls.Add(Me.grpThreeVariablePercentages) Me.Controls.Add(Me.cmdFormatTable) Me.Controls.Add(Me.lblThreeVariableSecondFactor) @@ -675,7 +676,6 @@ Partial Class dlgDescribeTwoVariable Me.Controls.Add(Me.ucrReceiverSkimrGroupByFactor) Me.Controls.Add(Me.ucrReceiverSecondTwoVariableFactor) Me.Controls.Add(Me.ucrSelectorDescribeTwoVar) - Me.Controls.Add(Me.grpOptions) Me.Controls.Add(Me.lbSecondVariable) Me.Controls.Add(Me.lblFirstVariable) Me.Controls.Add(Me.grpFrequency) diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index d3314a51375..29d52c262ef 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -90,7 +90,7 @@ Public Class dlgDescribeTwoVariable ucrReceiverFirstVars.SetParameter(New RParameter("columns_to_summarise", 1)) ucrReceiverFirstVars.SetParameterIsString() ucrReceiverFirstVars.Selector = ucrSelectorDescribeTwoVar - ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) + 'ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) ucrReceiverSecondTwoVariableFactor.SetParameter(New RParameter("factors", 2)) ucrReceiverSecondTwoVariableFactor.SetParameterIsString() @@ -245,7 +245,7 @@ Public Class dlgDescribeTwoVariable 'clsSecondEmptyOperator = New ROperator clsTabFootnoteOperator = New ROperator clsMapFrequency2PipeOperator = New ROperator - clsFrequencyTables2Function = New RFunction + ' clsFrequencyTables2Function = New RFunction clsDataTildeOperator = New ROperator clsSummaryMap2Function = New RFunction clsgtFunction = New RFunction @@ -263,8 +263,8 @@ Public Class dlgDescribeTwoVariable clsCombineFunction.SetRCommand("c") - clsCombineMultipleColumnsFunction.SetRCommand("c") - clsCombineMultipleColumnsFunction.SetAssignTo("multiple_receiver_cols") + 'clsCombineMultipleColumnsFunction.SetRCommand("c") + 'clsCombineMultipleColumnsFunction.SetAssignTo("multiple_receiver_cols") clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) clsRenameCombineFunction.SetRCommand("c") @@ -482,11 +482,11 @@ Public Class dlgDescribeTwoVariable clsThreeVariableCombineFrequencyParametersFunction.SetRCommand("c") - clsFrequencyTables2Function.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") - clsFrequencyTables2Function.AddParameter("data_name", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) - clsFrequencyTables2Function.AddParameter("columns_to_summarise", ".x", iPosition:=1) - clsFrequencyTables2Function.AddParameter("factors", clsRFunctionParameter:=clsCombineFrequencyFactorParameterFunction, iPosition:=2) - clsFrequencyTables2Function.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=3) + 'clsFrequencyTables2Function.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") + 'clsFrequencyTables2Function.AddParameter("data_name", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + 'clsFrequencyTables2Function.AddParameter("columns_to_summarise", ".x", iPosition:=1) + 'clsFrequencyTables2Function.AddParameter("factors", clsRFunctionParameter:=clsCombineFrequencyFactorParameterFunction, iPosition:=2) + 'clsFrequencyTables2Function.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=3) 'clsDataTildeOperator.SetOperation("~") 'clsDataTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) @@ -518,8 +518,8 @@ Public Class dlgDescribeTwoVariable ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsSkimrFunction, New RParameter("col_names", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=3) ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1) - ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRCustomSummaryFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) - ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=3) + ' ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRCustomSummaryFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) + ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) 'ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsFormatTableMappingPipeOperator, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=4) @@ -542,6 +542,8 @@ Public Class dlgDescribeTwoVariable ucrChkThreeVariablePercentageProportion.SetRCode(clsThreeVariableCombineFrequencyParametersFunction, bReset) ucrPnlDescribe.SetRCode(clsDummyFunction, bReset) ucrNudSigFigs.SetRCode(clsCombineFrequencyParametersFunction, bReset) + ucrReceiverThreeVariableSecondFactor.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) + ucrReceiverThreeVariableThirdVariable.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrSaveTable.SetRCode(clsJoiningPipeOperator) bRcodeSet = True End Sub @@ -631,7 +633,7 @@ Public Class dlgDescribeTwoVariable ucrBase.clsRsyntax.SetBaseRFunction(clsRAnovaFunction) ElseIf IsNumericByCategorical() OrElse IsCategoricalByCategorical() Then 'If IsNumericByCategorical() Then - ucrReceiverFirstVars.SetParameterIsString() + 'ucrReceiverFirstVars.SetParameterIsString() 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=1) 'Else 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsRenameFunction, iPosition:=1) @@ -651,6 +653,9 @@ Public Class dlgDescribeTwoVariable 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=1) End If ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + ucrSaveTable.SetAssignToIfUncheckedValue("last_table") + ucrSaveTable.SetCheckBoxText("Save Table") 'ucrBase.clsRsyntax.AddToAfterCodes(clsEmptyOperator, 1) 'ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 3) End If @@ -668,52 +673,55 @@ Public Class dlgDescribeTwoVariable ' End If 'End Sub - Private Sub UpdateCombineFactorFunctions() - If rdoSkim.Checked OrElse ucrReceiverFirstVars.IsEmpty Then - Exit Sub - End If + 'Private Sub UpdateCombineFactorFunctions() + ' If rdoSkim.Checked OrElse ucrReceiverFirstVars.IsEmpty Then + ' Exit Sub + ' End If - Dim iPosition As Integer = 0 - clsCombineMultipleColumnsFunction.ClearParameters() - For Each strColumn In ucrReceiverFirstVars.GetVariableNamesList() - clsCombineMultipleColumnsFunction.AddParameter(strColumn, strColumn, bIncludeArgumentName:=False, iPosition:=iPosition) - iPosition += 1 - Next - End Sub + ' Dim iPosition As Integer = 0 + ' clsCombineMultipleColumnsFunction.ClearParameters() + ' For Each strColumn In ucrReceiverFirstVars.GetVariableNamesList() + ' clsCombineMultipleColumnsFunction.AddParameter(strColumn, strColumn, bIncludeArgumentName:=False, iPosition:=iPosition) + ' iPosition += 1 + ' Next + 'End Sub Private Sub UpdateCombineFactorParameterFunction() clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_one") clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_two") clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_three") - 'If rdoTwoVariable.Checked Then - ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", - ' ucrReceiverSecondTwoVariableFactor.GetVariableNames(), iPosition:=0, - ' bIncludeArgumentName:=False) - ' If strFirstVariablesType = "categorical" Then - ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", - ' ".x", iPosition:=1, - ' bIncludeArgumentName:=False) - ' End If + ' 'If rdoTwoVariable.Checked Then + ' ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", + ' ' ucrReceiverSecondTwoVariableFactor.GetVariableNames(), iPosition:=0, + ' ' bIncludeArgumentName:=False) + ' ' If strFirstVariablesType = "categorical" Then + ' ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", + ' ' ".x", iPosition:=1, + ' ' bIncludeArgumentName:=False) + ' ' End If If rdoThreeVariable.Checked Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", - ucrReceiverThreeVariableSecondFactor.GetVariableNames(), iPosition:=0, - bIncludeArgumentName:=False) - If strSecondVariableType = "categorical" Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", - ucrReceiverThreeVariableThirdVariable.GetVariableNames(), iPosition:=1, - bIncludeArgumentName:=False) - End If - If IsCategoricalByCategorical() Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_three", - ".x", iPosition:=2, - bIncludeArgumentName:=False) - End If - If IsCategoricalByNumeric() Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", - ".x", iPosition:=1, - bIncludeArgumentName:=False) - End If + clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", + ucrReceiverThreeVariableSecondFactor.GetVariableNames(), iPosition:=0, + bIncludeArgumentName:=False) + If strSecondVariableType = "categorical" Then + clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", + ucrReceiverThreeVariableThirdVariable.GetVariableNames(), iPosition:=1, + bIncludeArgumentName:=False) End If + + 'If IsCategoricalByCategorical() Then + ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_three", + ' ".x", iPosition:=2, + ' bIncludeArgumentName:=False) + 'End If + 'If IsCategoricalByNumeric() Then + ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", + ' ".x", iPosition:=1, + ' bIncludeArgumentName:=False) + 'End If + + clsSummaryTableFunction.AddParameter("factors", clsRFunctionParameter:=clsSummaryTableCombineFactorsFunction, iPosition:=2) + End If End Sub Private Sub AddRemoveNAParameter() @@ -721,11 +729,11 @@ Public Class dlgDescribeTwoVariable If ucrChkOmitMissing.Checked Then If rdoTwoVariable.Checked Then If IsNumericByCategorical() Then - clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=6) + clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=5) End If ElseIf rdoThreeVariable.Checked Then If IsNumericByCategorical() OrElse IsCategoricalByNumeric() Then - clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=6) + clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=5) End If End If End If @@ -746,13 +754,13 @@ Public Class dlgDescribeTwoVariable End If AddRemoveNAParameter() If Not ucrChkOmitMissing.Checked Then - clsFrequencyTables2Function.RemoveParameterByName("na_type") - clsFrequencyTables2Function.RemoveParameterByName("na_max_n") - clsFrequencyTables2Function.RemoveParameterByName("na_min_n") - clsFrequencyTables2Function.RemoveParameterByName("na_max_prop") - clsFrequencyTables2Function.RemoveParameterByName("na_consecutive_n") + clsSummaryTableFunction.RemoveParameterByName("na_type") + clsSummaryTableFunction.RemoveParameterByName("na_max_n") + clsSummaryTableFunction.RemoveParameterByName("na_min_n") + clsSummaryTableFunction.RemoveParameterByName("na_max_prop") + clsSummaryTableFunction.RemoveParameterByName("na_consecutive_n") Else - clsFrequencyTables2Function.AddParameter("na_type", clsRFunctionParameter:=clsCombineFunction, iPosition:=9) + clsSummaryTableFunction.AddParameter("na_type", clsRFunctionParameter:=clsCombineFunction, iPosition:=9) End If End Sub @@ -997,7 +1005,7 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub ucrReceiverNumericVariable_ControlValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverThreeVariableThirdVariable.ControlValueChanged, - ucrReceiverThreeVariableThirdVariable.ControlContentsChanged + ucrReceiverThreeVariableThirdVariable.ControlContentsChanged AssignSecondVariableType() ManageControlsVisibility() UpdateCombineFactorParameterFunction() @@ -1036,7 +1044,7 @@ Public Class dlgDescribeTwoVariable If IsCategoricalByNumeric() Then strSummaryName = "Summary tables" Else - strSummaryName = "" + strSummaryName = "Summary tables" End If End If End If @@ -1076,7 +1084,7 @@ Public Class dlgDescribeTwoVariable AssignSecondVariableType() ChangeBaseRCode() UpdateSummaryTableFunction() - UpdateCombineFactorParameterFunction() + 'UpdateCombineFactorParameterFunction() ChangeLocations() EnableDisableFrequencyControls() ' SwapMmtableHeaderFunctions() @@ -1113,14 +1121,14 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub ucrReceiverFirstVars_ControlValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstVars.ControlValueChanged, - ucrReceiverFirstVars.ControlContentsChanged + ucrReceiverFirstVars.ControlContentsChanged ChangeFirstTypeLabel() ChangeSumaryLabelText() UpdateSummaryTableFunction() - UpdateCombineFactorParameterFunction() + 'UpdateCombineFactorParameterFunction() ChangeBaseRCode() ManageControlsVisibility() - UpdateCombineFactorFunctions() + ' UpdateCombineFactorFunctions() ChangeLocations() EnableDisableFrequencyControls() ' SwapMmtableHeaderFunctions() @@ -1219,7 +1227,7 @@ Public Class dlgDescribeTwoVariable ' AddFormatTableMapToAfterCode() End Sub Private Sub cmdMissingOptions_Click(sender As Object, e As EventArgs) Handles cmdMissingOptions.Click - sdgMissingOptions.SetRFunction(clsNewSummaryFunction:=clsFrequencyTables2Function, clsNewConcFunction:=clsCombineFunction, bReset:=bResetSubdialog) + sdgMissingOptions.SetRFunction(clsNewSummaryFunction:=clsSummaryTableFunction, clsNewConcFunction:=clsCombineFunction, bReset:=bResetSubdialog) bResetSubdialog = False sdgMissingOptions.ShowDialog() End Sub From d2433191335b16fc217bcd632d8e5984661c3ec8 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Tue, 6 Jun 2023 13:42:02 +0300 Subject: [PATCH 11/21] more changes --- instat/dlgDescribeTwoVariable.Designer.vb | 311 +++++++++------- instat/dlgDescribeTwoVariable.vb | 423 ++++------------------ 2 files changed, 249 insertions(+), 485 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index b21ab57442f..1de4a8c3d2d 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -43,14 +43,18 @@ Partial Class dlgDescribeTwoVariable Me.grpThreeVariablePercentages = New System.Windows.Forms.GroupBox() Me.lblThreeVariableFactorAsPercentages = New System.Windows.Forms.Label() Me.rdoThreeVariable = New System.Windows.Forms.RadioButton() - Me.lblColumnFactors = New System.Windows.Forms.Label() Me.cmdFormatTable = New System.Windows.Forms.Button() Me.lblThreeVariableSecondFactor = New System.Windows.Forms.Label() Me.cmdSummaries = New System.Windows.Forms.Button() Me.grpOptions = New System.Windows.Forms.GroupBox() + Me.cmdMissingOptions = New System.Windows.Forms.Button() Me.lbSecondVariable = New System.Windows.Forms.Label() Me.lblFirstVariable = New System.Windows.Forms.Label() Me.grpFrequency = New System.Windows.Forms.GroupBox() + Me.grpColumnFactor = New System.Windows.Forms.GroupBox() + Me.rdoSummary = New System.Windows.Forms.RadioButton() + Me.rdoVariable = New System.Windows.Forms.RadioButton() + Me.rdoNoColumnFactor = New System.Windows.Forms.RadioButton() Me.lblMarginName = New System.Windows.Forms.Label() Me.grpSummaries = New System.Windows.Forms.GroupBox() Me.lblFirstType = New System.Windows.Forms.Label() @@ -66,31 +70,31 @@ Partial Class dlgDescribeTwoVariable Me.lblSecondGroupByFactor = New System.Windows.Forms.Label() Me.grpTwoVariablePercentages = New System.Windows.Forms.GroupBox() Me.rdoTwoVariable = New System.Windows.Forms.RadioButton() - Me.cmdMissingOptions = New System.Windows.Forms.Button() + Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() + Me.ucrChkPercentageProportion = New instat.ucrCheck() + Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() + Me.ucrChkOmitMissing = New instat.ucrCheck() Me.ucrSaveTable = New instat.ucrSave() Me.ucrReceiverThreeVariablePercentage = New instat.ucrReceiverSingle() Me.ucrChkThreeVariablePercentageProportion = New instat.ucrCheck() Me.ucrChkThreeVariableDisplayAsPercentage = New instat.ucrCheck() - Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverThreeVariableThirdVariable = New instat.ucrReceiverSingle() Me.ucrReceiverSecondSkimrGroupByFactor = New instat.ucrReceiverSingle() - Me.ucrReceiverSkimrGroupByFactor = New instat.ucrReceiverSingle() Me.ucrReceiverSecondTwoVariableFactor = New instat.ucrReceiverSingle() Me.ucrSelectorDescribeTwoVar = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrChkOmitMissing = New instat.ucrCheck() - Me.ucrNudColumnFactors = New instat.ucrNud() + Me.ucrPnlColumnFactor = New instat.UcrPanel() Me.ucrNudSigFigs = New instat.ucrNud() Me.ucrInputMarginName = New instat.ucrInputTextBox() Me.ucrChkDisplayMargins = New instat.ucrCheck() - Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() - Me.ucrChkPercentageProportion = New instat.ucrCheck() - Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() Me.ucrReceiverFirstVars = New instat.ucrReceiverMultiple() Me.ucrPnlDescribe = New instat.UcrPanel() + Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() + Me.ucrReceiverSkimrGroupByFactor = New instat.ucrReceiverSingle() Me.grpThreeVariablePercentages.SuspendLayout() Me.grpOptions.SuspendLayout() Me.grpFrequency.SuspendLayout() + Me.grpColumnFactor.SuspendLayout() Me.grpSummaries.SuspendLayout() Me.grpTwoVariablePercentages.SuspendLayout() Me.SuspendLayout() @@ -123,7 +127,7 @@ Partial Class dlgDescribeTwoVariable Me.grpThreeVariablePercentages.Controls.Add(Me.lblThreeVariableFactorAsPercentages) Me.grpThreeVariablePercentages.Controls.Add(Me.ucrChkThreeVariablePercentageProportion) Me.grpThreeVariablePercentages.Controls.Add(Me.ucrChkThreeVariableDisplayAsPercentage) - Me.grpThreeVariablePercentages.Location = New System.Drawing.Point(232, 247) + Me.grpThreeVariablePercentages.Location = New System.Drawing.Point(234, 239) Me.grpThreeVariablePercentages.Name = "grpThreeVariablePercentages" Me.grpThreeVariablePercentages.Size = New System.Drawing.Size(174, 114) Me.grpThreeVariablePercentages.TabIndex = 41 @@ -157,21 +161,10 @@ Partial Class dlgDescribeTwoVariable Me.rdoThreeVariable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoThreeVariable.UseVisualStyleBackColor = True ' - 'lblColumnFactors - ' - Me.lblColumnFactors.AutoSize = True - Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblColumnFactors.Location = New System.Drawing.Point(8, 53) - Me.lblColumnFactors.Name = "lblColumnFactors" - Me.lblColumnFactors.Size = New System.Drawing.Size(83, 13) - Me.lblColumnFactors.TabIndex = 1 - Me.lblColumnFactors.Tag = "" - Me.lblColumnFactors.Text = "Column Factors:" - ' 'cmdFormatTable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFormatTable.Location = New System.Drawing.Point(272, 407) + Me.cmdFormatTable.Location = New System.Drawing.Point(250, 468) Me.cmdFormatTable.Name = "cmdFormatTable" Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23) Me.cmdFormatTable.TabIndex = 44 @@ -181,7 +174,7 @@ Partial Class dlgDescribeTwoVariable 'lblThreeVariableSecondFactor ' Me.lblThreeVariableSecondFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblThreeVariableSecondFactor.Location = New System.Drawing.Point(261, 161) + Me.lblThreeVariableSecondFactor.Location = New System.Drawing.Point(261, 158) Me.lblThreeVariableSecondFactor.Name = "lblThreeVariableSecondFactor" Me.lblThreeVariableSecondFactor.Size = New System.Drawing.Size(100, 15) Me.lblThreeVariableSecondFactor.TabIndex = 35 @@ -204,17 +197,27 @@ Partial Class dlgDescribeTwoVariable Me.grpOptions.Controls.Add(Me.ucrChkOmitMissing) Me.grpOptions.Controls.Add(Me.cmdSummaries) Me.grpOptions.Controls.Add(Me.cmdMissingOptions) - Me.grpOptions.Location = New System.Drawing.Point(249, 247) + Me.grpOptions.Location = New System.Drawing.Point(245, 352) Me.grpOptions.Name = "grpOptions" - Me.grpOptions.Size = New System.Drawing.Size(155, 108) + Me.grpOptions.Size = New System.Drawing.Size(168, 108) Me.grpOptions.TabIndex = 40 Me.grpOptions.TabStop = False Me.grpOptions.Text = "Options" ' + 'cmdMissingOptions + ' + Me.cmdMissingOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdMissingOptions.Location = New System.Drawing.Point(6, 72) + Me.cmdMissingOptions.Name = "cmdMissingOptions" + Me.cmdMissingOptions.Size = New System.Drawing.Size(105, 23) + Me.cmdMissingOptions.TabIndex = 46 + Me.cmdMissingOptions.Text = "Missing Options..." + Me.cmdMissingOptions.UseVisualStyleBackColor = True + ' 'lbSecondVariable ' Me.lbSecondVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lbSecondVariable.Location = New System.Drawing.Point(261, 161) + Me.lbSecondVariable.Location = New System.Drawing.Point(261, 158) Me.lbSecondVariable.Name = "lbSecondVariable" Me.lbSecondVariable.Size = New System.Drawing.Size(100, 15) Me.lbSecondVariable.TabIndex = 27 @@ -234,25 +237,70 @@ Partial Class dlgDescribeTwoVariable ' 'grpFrequency ' - Me.grpFrequency.Controls.Add(Me.ucrNudColumnFactors) - Me.grpFrequency.Controls.Add(Me.lblColumnFactors) + Me.grpFrequency.Controls.Add(Me.grpColumnFactor) Me.grpFrequency.Controls.Add(Me.ucrNudSigFigs) Me.grpFrequency.Controls.Add(Me.ucrInputMarginName) Me.grpFrequency.Controls.Add(Me.lblMarginName) Me.grpFrequency.Controls.Add(Me.lblSigFigs) Me.grpFrequency.Controls.Add(Me.ucrChkDisplayMargins) - Me.grpFrequency.Location = New System.Drawing.Point(3, 299) + Me.grpFrequency.Location = New System.Drawing.Point(3, 293) Me.grpFrequency.Name = "grpFrequency" - Me.grpFrequency.Size = New System.Drawing.Size(223, 127) + Me.grpFrequency.Size = New System.Drawing.Size(223, 199) Me.grpFrequency.TabIndex = 42 Me.grpFrequency.TabStop = False Me.grpFrequency.Text = "Display" ' + 'grpColumnFactor + ' + Me.grpColumnFactor.Controls.Add(Me.rdoSummary) + Me.grpColumnFactor.Controls.Add(Me.rdoVariable) + Me.grpColumnFactor.Controls.Add(Me.rdoNoColumnFactor) + Me.grpColumnFactor.Controls.Add(Me.ucrPnlColumnFactor) + Me.grpColumnFactor.Location = New System.Drawing.Point(5, 99) + Me.grpColumnFactor.Name = "grpColumnFactor" + Me.grpColumnFactor.Size = New System.Drawing.Size(168, 94) + Me.grpColumnFactor.TabIndex = 51 + Me.grpColumnFactor.TabStop = False + Me.grpColumnFactor.Text = "Columns" + ' + 'rdoSummary + ' + Me.rdoSummary.AutoSize = True + Me.rdoSummary.Location = New System.Drawing.Point(18, 25) + Me.rdoSummary.Name = "rdoSummary" + Me.rdoSummary.Size = New System.Drawing.Size(68, 17) + Me.rdoSummary.TabIndex = 47 + Me.rdoSummary.TabStop = True + Me.rdoSummary.Text = "Summary" + Me.rdoSummary.UseVisualStyleBackColor = True + ' + 'rdoVariable + ' + Me.rdoVariable.AutoSize = True + Me.rdoVariable.Location = New System.Drawing.Point(18, 46) + Me.rdoVariable.Name = "rdoVariable" + Me.rdoVariable.Size = New System.Drawing.Size(63, 17) + Me.rdoVariable.TabIndex = 49 + Me.rdoVariable.TabStop = True + Me.rdoVariable.Text = "Variable" + Me.rdoVariable.UseVisualStyleBackColor = True + ' + 'rdoNoColumnFactor + ' + Me.rdoNoColumnFactor.AutoSize = True + Me.rdoNoColumnFactor.Location = New System.Drawing.Point(18, 67) + Me.rdoNoColumnFactor.Name = "rdoNoColumnFactor" + Me.rdoNoColumnFactor.Size = New System.Drawing.Size(110, 17) + Me.rdoNoColumnFactor.TabIndex = 50 + Me.rdoNoColumnFactor.TabStop = True + Me.rdoNoColumnFactor.Text = "No Column Factor" + Me.rdoNoColumnFactor.UseVisualStyleBackColor = True + ' 'lblMarginName ' Me.lblMarginName.AutoSize = True Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(11, 101) + Me.lblMarginName.Location = New System.Drawing.Point(11, 75) Me.lblMarginName.Name = "lblMarginName" Me.lblMarginName.Size = New System.Drawing.Size(41, 13) Me.lblMarginName.TabIndex = 3 @@ -267,7 +315,7 @@ Partial Class dlgDescribeTwoVariable Me.grpSummaries.Controls.Add(Me.lblSummary) Me.grpSummaries.Controls.Add(Me.lblBy) Me.grpSummaries.Controls.Add(Me.lblSecondType) - Me.grpSummaries.Location = New System.Drawing.Point(3, 224) + Me.grpSummaries.Location = New System.Drawing.Point(3, 219) Me.grpSummaries.Name = "grpSummaries" Me.grpSummaries.Size = New System.Drawing.Size(210, 72) Me.grpSummaries.TabIndex = 39 @@ -343,7 +391,7 @@ Partial Class dlgDescribeTwoVariable 'lblFirstGroupByFactor ' Me.lblFirstGroupByFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstGroupByFactor.Location = New System.Drawing.Point(261, 161) + Me.lblFirstGroupByFactor.Location = New System.Drawing.Point(261, 158) Me.lblFirstGroupByFactor.Name = "lblFirstGroupByFactor" Me.lblFirstGroupByFactor.Size = New System.Drawing.Size(100, 15) Me.lblFirstGroupByFactor.TabIndex = 29 @@ -369,7 +417,7 @@ Partial Class dlgDescribeTwoVariable 'lblThirdVariable ' Me.lblThirdVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblThirdVariable.Location = New System.Drawing.Point(263, 200) + Me.lblThirdVariable.Location = New System.Drawing.Point(263, 198) Me.lblThirdVariable.Name = "lblThirdVariable" Me.lblThirdVariable.Size = New System.Drawing.Size(154, 15) Me.lblThirdVariable.TabIndex = 37 @@ -379,7 +427,7 @@ Partial Class dlgDescribeTwoVariable 'lblSecondGroupByFactor ' Me.lblSecondGroupByFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondGroupByFactor.Location = New System.Drawing.Point(263, 203) + Me.lblSecondGroupByFactor.Location = New System.Drawing.Point(263, 201) Me.lblSecondGroupByFactor.Name = "lblSecondGroupByFactor" Me.lblSecondGroupByFactor.Size = New System.Drawing.Size(137, 15) Me.lblSecondGroupByFactor.TabIndex = 33 @@ -392,7 +440,7 @@ Partial Class dlgDescribeTwoVariable Me.grpTwoVariablePercentages.Controls.Add(Me.lblFactorsAsPercentage) Me.grpTwoVariablePercentages.Controls.Add(Me.ucrChkPercentageProportion) Me.grpTwoVariablePercentages.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpTwoVariablePercentages.Location = New System.Drawing.Point(232, 247) + Me.grpTwoVariablePercentages.Location = New System.Drawing.Point(233, 220) Me.grpTwoVariablePercentages.Name = "grpTwoVariablePercentages" Me.grpTwoVariablePercentages.Size = New System.Drawing.Size(174, 120) Me.grpTwoVariablePercentages.TabIndex = 45 @@ -415,20 +463,50 @@ Partial Class dlgDescribeTwoVariable Me.rdoTwoVariable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoTwoVariable.UseVisualStyleBackColor = True ' - 'cmdMissingOptions + 'ucrReceiverPercentages ' - Me.cmdMissingOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdMissingOptions.Location = New System.Drawing.Point(6, 72) - Me.cmdMissingOptions.Name = "cmdMissingOptions" - Me.cmdMissingOptions.Size = New System.Drawing.Size(105, 23) - Me.cmdMissingOptions.TabIndex = 46 - Me.cmdMissingOptions.Text = "Missing Options..." - Me.cmdMissingOptions.UseVisualStyleBackColor = True + Me.ucrReceiverPercentages.AutoSize = True + Me.ucrReceiverPercentages.frmParent = Nothing + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(21, 63) + 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.strNcFilePath = "" + Me.ucrReceiverPercentages.TabIndex = 8 + Me.ucrReceiverPercentages.ucrSelector = Nothing + ' + 'ucrChkPercentageProportion + ' + Me.ucrChkPercentageProportion.AutoSize = True + Me.ucrChkPercentageProportion.Checked = False + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(14, 86) + Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(154, 23) + Me.ucrChkPercentageProportion.TabIndex = 3 + ' + 'ucrChkDisplayAsPercentage + ' + Me.ucrChkDisplayAsPercentage.AutoSize = True + Me.ucrChkDisplayAsPercentage.Checked = False + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) + Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) + Me.ucrChkDisplayAsPercentage.TabIndex = 0 + ' + 'ucrChkOmitMissing + ' + Me.ucrChkOmitMissing.AutoSize = True + Me.ucrChkOmitMissing.Checked = False + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(9, 19) + Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) + Me.ucrChkOmitMissing.TabIndex = 0 ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(9, 438) + Me.ucrSaveTable.Location = New System.Drawing.Point(9, 506) Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveTable.Name = "ucrSaveTable" Me.ucrSaveTable.Size = New System.Drawing.Size(399, 34) @@ -465,24 +543,11 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkThreeVariableDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) Me.ucrChkThreeVariableDisplayAsPercentage.TabIndex = 0 ' - 'ucrReceiverThreeVariableSecondFactor - ' - Me.ucrReceiverThreeVariableSecondFactor.AutoSize = True - Me.ucrReceiverThreeVariableSecondFactor.frmParent = Me - Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(264, 176) - Me.ucrReceiverThreeVariableSecondFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverThreeVariableSecondFactor.Name = "ucrReceiverThreeVariableSecondFactor" - Me.ucrReceiverThreeVariableSecondFactor.Selector = Nothing - Me.ucrReceiverThreeVariableSecondFactor.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverThreeVariableSecondFactor.strNcFilePath = "" - Me.ucrReceiverThreeVariableSecondFactor.TabIndex = 36 - Me.ucrReceiverThreeVariableSecondFactor.ucrSelector = Nothing - ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(8, 477) + Me.ucrBase.Location = New System.Drawing.Point(6, 536) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 43 @@ -491,7 +556,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverThreeVariableThirdVariable.AutoSize = True Me.ucrReceiverThreeVariableThirdVariable.frmParent = Me - Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(265, 219) + Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(265, 214) Me.ucrReceiverThreeVariableThirdVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverThreeVariableThirdVariable.Name = "ucrReceiverThreeVariableThirdVariable" Me.ucrReceiverThreeVariableThirdVariable.Selector = Nothing @@ -504,7 +569,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverSecondSkimrGroupByFactor.AutoSize = True Me.ucrReceiverSecondSkimrGroupByFactor.frmParent = Me - Me.ucrReceiverSecondSkimrGroupByFactor.Location = New System.Drawing.Point(265, 219) + Me.ucrReceiverSecondSkimrGroupByFactor.Location = New System.Drawing.Point(265, 214) Me.ucrReceiverSecondSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSecondSkimrGroupByFactor.Name = "ucrReceiverSecondSkimrGroupByFactor" Me.ucrReceiverSecondSkimrGroupByFactor.Selector = Nothing @@ -513,24 +578,11 @@ Partial Class dlgDescribeTwoVariable Me.ucrReceiverSecondSkimrGroupByFactor.TabIndex = 34 Me.ucrReceiverSecondSkimrGroupByFactor.ucrSelector = Nothing ' - 'ucrReceiverSkimrGroupByFactor - ' - Me.ucrReceiverSkimrGroupByFactor.AutoSize = True - Me.ucrReceiverSkimrGroupByFactor.frmParent = Me - Me.ucrReceiverSkimrGroupByFactor.Location = New System.Drawing.Point(264, 176) - Me.ucrReceiverSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverSkimrGroupByFactor.Name = "ucrReceiverSkimrGroupByFactor" - Me.ucrReceiverSkimrGroupByFactor.Selector = Nothing - Me.ucrReceiverSkimrGroupByFactor.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverSkimrGroupByFactor.strNcFilePath = "" - Me.ucrReceiverSkimrGroupByFactor.TabIndex = 32 - Me.ucrReceiverSkimrGroupByFactor.ucrSelector = Nothing - ' 'ucrReceiverSecondTwoVariableFactor ' Me.ucrReceiverSecondTwoVariableFactor.AutoSize = True Me.ucrReceiverSecondTwoVariableFactor.frmParent = Me - Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(264, 176) + Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(264, 173) Me.ucrReceiverSecondTwoVariableFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSecondTwoVariableFactor.Name = "ucrReceiverSecondTwoVariableFactor" Me.ucrReceiverSecondTwoVariableFactor.Selector = Nothing @@ -551,27 +603,13 @@ Partial Class dlgDescribeTwoVariable Me.ucrSelectorDescribeTwoVar.Size = New System.Drawing.Size(213, 183) Me.ucrSelectorDescribeTwoVar.TabIndex = 28 ' - 'ucrChkOmitMissing + 'ucrPnlColumnFactor ' - Me.ucrChkOmitMissing.AutoSize = True - Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(9, 19) - Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) - Me.ucrChkOmitMissing.TabIndex = 0 - ' - 'ucrNudColumnFactors - ' - Me.ucrNudColumnFactors.AutoSize = True - Me.ucrNudColumnFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudColumnFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudColumnFactors.Location = New System.Drawing.Point(129, 48) - Me.ucrNudColumnFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudColumnFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudColumnFactors.Name = "ucrNudColumnFactors" - Me.ucrNudColumnFactors.Size = New System.Drawing.Size(50, 20) - Me.ucrNudColumnFactors.TabIndex = 6 - Me.ucrNudColumnFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(8, 19) + Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" + Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(147, 68) + Me.ucrPnlColumnFactor.TabIndex = 48 ' 'ucrNudSigFigs ' @@ -592,7 +630,7 @@ Partial Class dlgDescribeTwoVariable Me.ucrInputMarginName.AutoSize = True Me.ucrInputMarginName.IsMultiline = False Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(53, 98) + Me.ucrInputMarginName.Location = New System.Drawing.Point(53, 72) Me.ucrInputMarginName.Name = "ucrInputMarginName" Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) Me.ucrInputMarginName.TabIndex = 4 @@ -601,42 +639,11 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrChkDisplayMargins.AutoSize = True Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(9, 74) + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(9, 49) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(149, 23) Me.ucrChkDisplayMargins.TabIndex = 2 ' - 'ucrReceiverPercentages - ' - Me.ucrReceiverPercentages.AutoSize = True - Me.ucrReceiverPercentages.frmParent = Nothing - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(21, 63) - 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.strNcFilePath = "" - Me.ucrReceiverPercentages.TabIndex = 8 - Me.ucrReceiverPercentages.ucrSelector = Nothing - ' - 'ucrChkPercentageProportion - ' - Me.ucrChkPercentageProportion.AutoSize = True - Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(14, 86) - Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(154, 23) - Me.ucrChkPercentageProportion.TabIndex = 3 - ' - 'ucrChkDisplayAsPercentage - ' - Me.ucrChkDisplayAsPercentage.AutoSize = True - Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) - Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) - Me.ucrChkDisplayAsPercentage.TabIndex = 0 - ' 'ucrReceiverFirstVars ' Me.ucrReceiverFirstVars.AutoSize = True @@ -658,37 +665,63 @@ Partial Class dlgDescribeTwoVariable Me.ucrPnlDescribe.Size = New System.Drawing.Size(317, 34) Me.ucrPnlDescribe.TabIndex = 22 ' + 'ucrReceiverThreeVariableSecondFactor + ' + Me.ucrReceiverThreeVariableSecondFactor.AutoSize = True + Me.ucrReceiverThreeVariableSecondFactor.frmParent = Me + Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(264, 173) + Me.ucrReceiverThreeVariableSecondFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverThreeVariableSecondFactor.Name = "ucrReceiverThreeVariableSecondFactor" + Me.ucrReceiverThreeVariableSecondFactor.Selector = Nothing + Me.ucrReceiverThreeVariableSecondFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverThreeVariableSecondFactor.strNcFilePath = "" + Me.ucrReceiverThreeVariableSecondFactor.TabIndex = 36 + Me.ucrReceiverThreeVariableSecondFactor.ucrSelector = Nothing + ' + 'ucrReceiverSkimrGroupByFactor + ' + Me.ucrReceiverSkimrGroupByFactor.AutoSize = True + Me.ucrReceiverSkimrGroupByFactor.frmParent = Me + Me.ucrReceiverSkimrGroupByFactor.Location = New System.Drawing.Point(264, 174) + Me.ucrReceiverSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSkimrGroupByFactor.Name = "ucrReceiverSkimrGroupByFactor" + Me.ucrReceiverSkimrGroupByFactor.Selector = Nothing + Me.ucrReceiverSkimrGroupByFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverSkimrGroupByFactor.strNcFilePath = "" + Me.ucrReceiverSkimrGroupByFactor.TabIndex = 32 + Me.ucrReceiverSkimrGroupByFactor.ucrSelector = Nothing + ' 'dlgDescribeTwoVariable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ClientSize = New System.Drawing.Size(419, 530) + Me.ClientSize = New System.Drawing.Size(419, 594) + Me.Controls.Add(Me.grpTwoVariablePercentages) Me.Controls.Add(Me.grpOptions) Me.Controls.Add(Me.ucrSaveTable) Me.Controls.Add(Me.grpThreeVariablePercentages) Me.Controls.Add(Me.cmdFormatTable) - Me.Controls.Add(Me.lblThreeVariableSecondFactor) - Me.Controls.Add(Me.ucrReceiverThreeVariableSecondFactor) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.ucrReceiverThreeVariableThirdVariable) Me.Controls.Add(Me.ucrReceiverSecondSkimrGroupByFactor) - Me.Controls.Add(Me.ucrReceiverSkimrGroupByFactor) Me.Controls.Add(Me.ucrReceiverSecondTwoVariableFactor) Me.Controls.Add(Me.ucrSelectorDescribeTwoVar) - Me.Controls.Add(Me.lbSecondVariable) Me.Controls.Add(Me.lblFirstVariable) Me.Controls.Add(Me.grpFrequency) Me.Controls.Add(Me.grpSummaries) Me.Controls.Add(Me.lblFirstGroupByFactor) Me.Controls.Add(Me.lblThirdVariable) Me.Controls.Add(Me.lblSecondGroupByFactor) - Me.Controls.Add(Me.grpTwoVariablePercentages) Me.Controls.Add(Me.ucrReceiverFirstVars) Me.Controls.Add(Me.rdoThreeVariable) Me.Controls.Add(Me.rdoTwoVariable) Me.Controls.Add(Me.rdoSkim) Me.Controls.Add(Me.ucrPnlDescribe) + Me.Controls.Add(Me.lblThreeVariableSecondFactor) + Me.Controls.Add(Me.lbSecondVariable) + Me.Controls.Add(Me.ucrReceiverThreeVariableSecondFactor) + Me.Controls.Add(Me.ucrReceiverSkimrGroupByFactor) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -702,6 +735,8 @@ Partial Class dlgDescribeTwoVariable Me.grpOptions.PerformLayout() Me.grpFrequency.ResumeLayout(False) Me.grpFrequency.PerformLayout() + Me.grpColumnFactor.ResumeLayout(False) + Me.grpColumnFactor.PerformLayout() Me.grpSummaries.ResumeLayout(False) Me.grpSummaries.PerformLayout() Me.grpTwoVariablePercentages.ResumeLayout(False) @@ -710,8 +745,6 @@ Partial Class dlgDescribeTwoVariable Me.PerformLayout() End Sub - - Friend WithEvents ucrNudColumnFactors As ucrNud Friend WithEvents ucrReceiverPercentages As ucrReceiverSingle Friend WithEvents grpThreeVariablePercentages As GroupBox Friend WithEvents ucrReceiverThreeVariablePercentage As ucrReceiverSingle @@ -733,7 +766,6 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents lbSecondVariable As Label Friend WithEvents lblFirstVariable As Label Friend WithEvents grpFrequency As GroupBox - Friend WithEvents lblColumnFactors As Label Friend WithEvents ucrNudSigFigs As ucrNud Friend WithEvents ucrInputMarginName As ucrInputTextBox Friend WithEvents lblMarginName As Label @@ -761,4 +793,9 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents ucrPnlDescribe As UcrPanel Friend WithEvents cmdMissingOptions As Button Friend WithEvents ucrSaveTable As ucrSave + Friend WithEvents rdoNoColumnFactor As RadioButton + Friend WithEvents rdoVariable As RadioButton + Friend WithEvents rdoSummary As RadioButton + Friend WithEvents ucrPnlColumnFactor As UcrPanel + Friend WithEvents grpColumnFactor As GroupBox End Class diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 29d52c262ef..1461420683c 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -30,7 +30,7 @@ Public Class dlgDescribeTwoVariable clsRCorrelationFunction, clsRCustomSummaryFunction, clsRenameFunction, clsSecondHeaderFunction, clsSkimrFunction, clsSummariesListFunction, clsSummaryMapFunction, clsSummaryTableCombineFactorsFunction, - clsSummaryTableFunction, clsThreeVariableCombineFrequencyParametersFunction As New RFunction + clsSummaryTableFunction, clsThreeVariableCombineFrequencyParametersFunction, clsPivotWiderFunction As New RFunction 'FORMAT TABLE FUNCTIONS Private clsFootnoteCellBodyFunction, clsFootnoteCellFunction, @@ -51,6 +51,7 @@ Public Class dlgDescribeTwoVariable clsHeaderTopLeftSummaryVariableFunction, clsgtFunction, clsCombineFrequencyFactorParameterFunction, clsSelectFunction, clsRenameCombineFunction, clsFrequencyTables2Function, clsSummaryMap2Function As New RFunction + Private clsDataTildeOperator, clsMapFrequency2PipeOperator As New ROperator 'Frequency Parameters Private lstFrequencyParameters As New List(Of String)({"percentage_type", "margin_name", @@ -90,7 +91,7 @@ Public Class dlgDescribeTwoVariable ucrReceiverFirstVars.SetParameter(New RParameter("columns_to_summarise", 1)) ucrReceiverFirstVars.SetParameterIsString() ucrReceiverFirstVars.Selector = ucrSelectorDescribeTwoVar - 'ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) + ' ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) ucrReceiverSecondTwoVariableFactor.SetParameter(New RParameter("factors", 2)) ucrReceiverSecondTwoVariableFactor.SetParameterIsString() @@ -187,11 +188,19 @@ Public Class dlgDescribeTwoVariable ucrNudSigFigs.SetMinMax(0, 22) ucrNudSigFigs.SetRDefault(2) + ucrPnlColumnFactor.AddRadioButton(rdoSummary) + ucrPnlColumnFactor.AddRadioButton(rdoVariable) + ucrPnlColumnFactor.AddRadioButton(rdoNoColumnFactor) + ucrPnlColumnFactor.AddParameterValuesCondition(rdoNoColumnFactor, "factor_cols", "NoColFactor") + ucrPnlColumnFactor.AddParameterValuesCondition(rdoSummary, "factor_cols", "Sum") + ucrPnlColumnFactor.AddParameterValuesCondition(rdoVariable, "factor_cols", "Var") + ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetDataFrameSelector(ucrSelectorDescribeTwoVar.ucrAvailableDataFrames) ucrSaveTable.SetIsComboBox() - ucrNudColumnFactors.SetMinMax(1, 2) + 'ucrNudColumnFactors.SetMinMax(1, 2) + End Sub Private Sub SetDefaults() @@ -203,13 +212,8 @@ Public Class dlgDescribeTwoVariable clsFootnoteCellFunction = New RFunction clsFootnoteSubtitleLocationFunction = New RFunction clsFootnoteTitleLocationFunction = New RFunction - clsFormatTableMapFunction = New RFunction clsGroupByFunction = New RFunction clsHeaderFormatFunction = New RFunction - clsHeaderLeftTopFunction = New RFunction - clsHeaderTopLeftFunction = New RFunction - 'clsMmtableFunction = New RFunction - 'clsMmtableMapFunction = New RFunction clsRAnovaFunction = New RFunction clsRCorrelationFunction = New RFunction clsRCustomSummaryFunction = New RFunction @@ -233,28 +237,21 @@ Public Class dlgDescribeTwoVariable clsTabStyleFunction = New RFunction clsTabStylePxFunction = New RFunction clsThreeVariableCombineFrequencyParametersFunction = New RFunction - 'clsEmptyOperator = New ROperator - 'clsFormatTableMappingPipeOperator = New ROperator clsFormatTableTildeOperator = New ROperator clsGroupByPipeOperator = New ROperator clsJoiningPipeOperator = New ROperator - 'clsMapPipeOperator = New ROperator - 'clsMmtablePlusOperator = New ROperator - 'clsMmtableTildeOperator = New ROperator clsPipeOperator = New ROperator - 'clsSecondEmptyOperator = New ROperator clsTabFootnoteOperator = New ROperator clsMapFrequency2PipeOperator = New ROperator - ' clsFrequencyTables2Function = New RFunction clsDataTildeOperator = New ROperator clsSummaryMap2Function = New RFunction clsgtFunction = New RFunction clsSummaryOperator = New ROperator + clsPivotWiderFunction = New RFunction ucrSelectorDescribeTwoVar.Reset() ucrReceiverFirstVars.SetMeAsReceiver() ucrInputMarginName.SetText("All") - ucrNudColumnFactors.SetText("2") ucrInputMarginName.Visible = False ucrBase.clsRsyntax.ClearCodes() @@ -263,24 +260,20 @@ Public Class dlgDescribeTwoVariable clsCombineFunction.SetRCommand("c") - 'clsCombineMultipleColumnsFunction.SetRCommand("c") - 'clsCombineMultipleColumnsFunction.SetAssignTo("multiple_receiver_cols") - clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) - clsRenameCombineFunction.SetRCommand("c") - clsRenameCombineFunction.AddParameter("by_var", ".x", iPosition:=0) + clsDummyFunction.AddParameter("factor_cols", "Sum", iPosition:=1) + clsDummyFunction.AddParameter("theme", "select", iPosition:=2) + + clsPivotWiderFunction.SetRCommand("pivot_wider") + clsPivotWiderFunction.AddParameter("values_from", "value", iPosition:=1) clsSelectFunction.SetPackageName("dplyr") clsSelectFunction.SetRCommand("rename") clsSelectFunction.AddParameter(".data", clsRFunctionParameter:=clsFrequencyTablesFunction, iPosition:=0) clsSelectFunction.AddParameter("rename_function", bIncludeArgumentName:=False, clsRFunctionParameter:=clsRenameCombineFunction, iPosition:=1) - clsCombineFrequencyFactorParameterFunction.SetRCommand("c") - clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", iPosition:=1, bIncludeArgumentName:=False) - - 'clsEmptyOperator.SetOperation("") - 'clsEmptyOperator.AddParameter("multiple_receiver_cols", "multiple_receiver_cols", iPosition:=0) - 'clsEmptyOperator.SetAssignTo("names(list_of_tables)") + 'clsCombineFrequencyFactorParameterFunction.SetRCommand("c") + 'clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", iPosition:=1, bIncludeArgumentName:=False) clsFootnoteCellBodyFunction.SetPackageName("gt") clsFootnoteCellBodyFunction.SetRCommand("cells_body") @@ -294,19 +287,6 @@ Public Class dlgDescribeTwoVariable clsFootnoteTitleLocationFunction.SetPackageName("gt") clsFootnoteTitleLocationFunction.SetRCommand("cells_title") - 'clsFormatTableMapFunction.SetPackageName("purrr") - 'clsFormatTableMapFunction.SetRCommand("map") - 'clsFormatTableMapFunction.AddParameter(".x", "list_of_tables", iPosition:=0) - 'clsFormatTableMapFunction.AddParameter(".f", clsROperatorParameter:=clsJoiningPipeOperator, iPosition:=1) - - 'clsFormatTableMappingPipeOperator.SetOperation("%>%") - 'clsFormatTableMappingPipeOperator.AddParameter("map", clsRFunctionParameter:=clsFormatTableMapFunction, iPosition:=1) - '' clsFormatTableMappingPipeOperator.SetAssignTo("list_of_tables") - - clsFormatTableTildeOperator.SetOperation("~") - clsFormatTableTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) - clsFormatTableTildeOperator.AddParameter(".x", ".x", iPosition:=1) - clsGroupByFunction.SetPackageName("dplyr") clsGroupByFunction.SetRCommand("group_by") @@ -315,44 +295,11 @@ Public Class dlgDescribeTwoVariable iPosition:=2, bIncludeArgumentName:=False) clsGroupByPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - - 'clsHeaderFormatFunction.SetPackageName("mmtable2") - 'clsHeaderFormatFunction.SetRCommand("header_format") - 'clsHeaderFormatFunction.AddParameter("header", Chr(34) & "all_cols" & Chr(34), iPosition:=0) - 'clsHeaderFormatFunction.AddParameter("style", clsRFunctionParameter:=clsStyleListFunction, iPosition:=1) - - 'clsHeaderLeftTopFunction.SetPackageName("mmtable2") - 'clsHeaderLeftTopFunction.SetRCommand("header_left_top") - - 'clsHeaderTopLeftFunction.SetPackageName("mmtable2") - 'clsHeaderTopLeftFunction.SetRCommand("header_top_left") - - - 'clsMapPipeOperator.SetOperation("%>%") - 'clsMapPipeOperator.AddParameter("map_summary_table", clsRFunctionParameter:=clsSummaryMapFunction, iPosition:=1) - 'clsMapPipeOperator.AddParameter("map_mmtable", clsRFunctionParameter:=clsMmtableMapFunction, iPosition:=2) - 'clsMapPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - 'clsMapPipeOperator.SetAssignTo("list_of_tables ") - - 'clsMmtableFunction.SetPackageName("mmtable2") - 'clsMmtableFunction.SetRCommand("mmtable") - 'clsMmtableFunction.AddParameter("data", ".x", iPosition:=0) - 'clsMmtableFunction.AddParameter("cells", "value", iPosition:=1) - - 'clsMmtableMapFunction.SetPackageName("purrr") - 'clsMmtableMapFunction.SetRCommand("map") - 'clsMmtableMapFunction.AddParameter(".x", ".", iPosition:=0) - 'clsMmtableMapFunction.AddParameter(".f", clsROperatorParameter:=clsMmtablePlusOperator, iPosition:=1) - - 'clsMmtablePlusOperator.SetOperation("+") - 'clsMmtablePlusOperator.bBrackets = False - 'clsMmtablePlusOperator.AddParameter("mmtable2", clsROperatorParameter:=clsMmtableTildeOperator, iPosition:=0) - 'clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftFunction, iPosition:=1) - 'clsMmtablePlusOperator.AddParameter("header_left_top", clsRFunctionParameter:=clsHeaderLeftTopFunction, iPosition:=2) - - 'clsMmtableTildeOperator.SetOperation("~") - 'clsMmtableTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) - 'clsMmtableTildeOperator.AddParameter("mmtable", clsRFunctionParameter:=clsMmtableFunction, iPosition:=1) + clsGroupByPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary, + strRObjectFormatToAssignTo:=RObjectFormat.Text, + strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + strObjectName:="last_summary") clsGroupByFunction.SetPackageName("dplyr") clsGroupByFunction.SetRCommand("group_by") @@ -377,33 +324,14 @@ Public Class dlgDescribeTwoVariable clsRCorrelationFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$cor") - 'clsRCustomSummaryFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary") - 'clsRCustomSummaryFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction) - 'clsRCustomSummaryFunction.AddParameter("store_results", "FALSE", iPosition:=4) - 'clsRCustomSummaryFunction.AddParameter("drop", "TRUE", iPosition:=5) - 'clsRCustomSummaryFunction.AddParameter("na.rm", "FALSE", iPosition:=6) - 'clsRCustomSummaryFunction.AddParameter("return_output", "TRUE", iPosition:=7) - - 'clsRenameFunction.SetPackageName("dplyr") - 'clsRenameFunction.SetRCommand("rename") - 'clsRenameFunction.AddParameter(".data", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=0) - 'clsRenameFunction.AddParameter("by_var", ".x", iPosition:=1) - - 'clsSecondEmptyOperator.SetOperation("") - 'clsSecondEmptyOperator.iCallType = 2 - 'clsSecondEmptyOperator.AddParameter("list_of_tables", "list_of_tables", iPosition:=0) - clsSecondFootnoteCellBodyFunction.SetPackageName("gt") clsSecondFootnoteCellBodyFunction.SetRCommand("cells_body") clsSecondFootnoteCellFunction.SetPackageName("gt") clsSecondFootnoteCellFunction.SetRCommand("tab_footnote") - 'clsSecondHeaderFunction.SetPackageName("mmtable2") - 'clsSecondHeaderFunction.SetRCommand("header_left_top") - clsSkimrFunction.SetPackageName("skimr") - clsSkimrFunction.SetRCommand("skim_without_charts") + clsSkimrFunction.SetRCommand("skim") clsStyleListFunction.SetRCommand("list") @@ -411,17 +339,9 @@ Public Class dlgDescribeTwoVariable clsSummariesListFunction.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) - 'clsSummaryMapFunction.SetPackageName("purrr") - 'clsSummaryMapFunction.SetRCommand("map") - 'clsSummaryMapFunction.AddParameter(".x", clsRFunctionParameter:=clsCombineMultipleColumnsFunction, iPosition:=0) - 'clsSummaryMapFunction.AddParameter(".f", clsROperatorParameter:=clsSummaryTildeOperator, iPosition:=1) - clsSummaryTableCombineFactorsFunction.SetRCommand("c") clsSummaryTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") - 'clsSummaryTableFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - 'clsSummaryTableFunction.AddParameter("factors", clsRFunctionParameter:=clsSummaryTableCombineFactorsFunction, iPosition:=3) - 'clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=3) clsSummaryTableFunction.AddParameter("treat_columns_as_factor", "TRUE", iPosition:=3) clsSummaryTableFunction.SetAssignTo("summary_table") @@ -430,7 +350,6 @@ Public Class dlgDescribeTwoVariable clsSummaryOperator.SetOperation("%>%") clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=0) - 'change ipositions after adding factor_cols (pivot wider function) clsSummaryOperator.AddParameter("gttbl", clsRFunctionParameter:=clsgtFunction, iPosition:=1) clsJoiningPipeOperator.SetOperation("%>%") @@ -442,9 +361,6 @@ Public Class dlgDescribeTwoVariable strObjectName:="last_table") clsJoiningPipeOperator.bBrackets = False - 'clsSummaryTildeOperator.SetOperation("~") - 'clsSummaryTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) - clsTableSourcenoteFunction.SetPackageName("gt") clsTableSourcenoteFunction.SetRCommand("tab_source_note") @@ -482,27 +398,6 @@ Public Class dlgDescribeTwoVariable clsThreeVariableCombineFrequencyParametersFunction.SetRCommand("c") - 'clsFrequencyTables2Function.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") - 'clsFrequencyTables2Function.AddParameter("data_name", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) - 'clsFrequencyTables2Function.AddParameter("columns_to_summarise", ".x", iPosition:=1) - 'clsFrequencyTables2Function.AddParameter("factors", clsRFunctionParameter:=clsCombineFrequencyFactorParameterFunction, iPosition:=2) - 'clsFrequencyTables2Function.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=3) - - 'clsDataTildeOperator.SetOperation("~") - 'clsDataTildeOperator.AddParameter("empty_parameter", "", iPosition:=0) - 'clsDataTildeOperator.AddParameter("x", clsRFunctionParameter:=clsFrequencyTables2Function, iPosition:=1, bIncludeArgumentName:=False) - - 'clsSummaryMap2Function.SetPackageName("purrr") - 'clsSummaryMap2Function.SetRCommand("map") - 'clsSummaryMap2Function.AddParameter(".x", clsRFunctionParameter:=clsCombineMultipleColumnsFunction, iPosition:=0) - 'clsSummaryMap2Function.AddParameter(".f", clsROperatorParameter:=clsDataTildeOperator, iPosition:=1) - - clsMapFrequency2PipeOperator.SetOperation("%>%") - 'clsMapFrequency2PipeOperator.AddParameter("map_summary_table", clsRFunctionParameter:=clsSummaryMap2Function, iPosition:=1) - 'clsMapFrequency2PipeOperator.AddParameter("map_mmtable", clsRFunctionParameter:=clsMmtableMapFunction, iPosition:=2) - clsMapFrequency2PipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - 'clsMapFrequency2PipeOperator.SetAssignTo("list_of_tables ") - ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) bResetSubdialog = True End Sub @@ -511,21 +406,17 @@ Public Class dlgDescribeTwoVariable bRcodeSet = False ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsRAnovaFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=1) ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=2) - ' ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrReceiverSecondTwoVariableFactor.GetParameter, iAdditionalPairNo:=3) ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsRAnovaFunction, New RParameter("x_col_names", 1), iAdditionalPairNo:=1) ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("x_col_names", 1), iAdditionalPairNo:=2) ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsSkimrFunction, New RParameter("col_names", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=3) ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1) - ' ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRCustomSummaryFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) - 'ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsFormatTableMappingPipeOperator, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=4) - - ucrChkDisplayMargins.AddAdditionalCodeParameterPair(clsThreeVariableCombineFrequencyParametersFunction, ucrChkDisplayMargins.GetParameter, iAdditionalPairNo:=1) ucrNudSigFigs.AddAdditionalCodeParameterPair(clsThreeVariableCombineFrequencyParametersFunction, ucrNudSigFigs.GetParameter, iAdditionalPairNo:=1) + ucrSaveTable.AddAdditionalRCode(clsGroupByPipeOperator, bReset) ucrChkOmitMissing.SetRCode(clsSummaryTableFunction, bReset) ucrReceiverFirstVars.SetRCode(clsSummaryTableFunction, bReset) @@ -544,6 +435,7 @@ Public Class dlgDescribeTwoVariable ucrNudSigFigs.SetRCode(clsCombineFrequencyParametersFunction, bReset) ucrReceiverThreeVariableSecondFactor.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrReceiverThreeVariableThirdVariable.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) + ucrPnlColumnFactor.SetRCode(clsDummyFunction, bReset) ucrSaveTable.SetRCode(clsJoiningPipeOperator) bRcodeSet = True End Sub @@ -556,7 +448,7 @@ Public Class dlgDescribeTwoVariable OrElse (Not ucrReceiverThreeVariableSecondFactor.IsEmpty _ AndAlso Not ucrReceiverThreeVariableThirdVariable.IsEmpty) _ AndAlso (IsCategoricalByCategorical() OrElse IsNumericByCategorical() _ - OrElse IsCategoricalByNumeric()))) + OrElse IsCategoricalByNumeric() OrElse IsNumericByNumeric()))) End Sub Private Function IsCategoricalByCategorical() As Boolean @@ -596,20 +488,20 @@ Public Class dlgDescribeTwoVariable TestOKEnabled() End Sub - 'Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) - ' sdgDescribeDisplay.SetRFunction(clsSummaryTableFunction, clsRAnovaFunction, bResetSubdialog) - ' bResetSubdialog = False - ' sdgDescribeDisplay.ShowDialog() - ' TestOKEnabled() - 'End Sub + Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) + sdgDescribeDisplay.SetRFunction(clsSummaryTableFunction, clsRAnovaFunction, bResetSubdialog) + bResetSubdialog = False + sdgDescribeDisplay.ShowDialog() + TestOKEnabled() + End Sub Private Sub ManageControlsVisibility() grpSummaries.Visible = rdoThreeVariable.Checked OrElse rdoTwoVariable.Checked If rdoTwoVariable.Checked Then ucrChkOmitMissing.Visible = strFirstVariablesType = "numeric" - cmdMissingOptions.Enabled = ucrChkOmitMissing.Checked AndAlso IsNumericByCategorical() grpOptions.Visible = IsNumericByCategorical() + cmdMissingOptions.Enabled = ucrChkOmitMissing.Checked AndAlso IsNumericByCategorical() ElseIf rdoThreeVariable.Checked Then grpOptions.Visible = IsCategoricalByNumeric() OrElse IsNumericByCategorical() Else @@ -618,108 +510,39 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub ChangeBaseRCode() - 'ucrBase.clsRsyntax.RemoveFromAfterCodes(clsEmptyOperator) - 'ucrBase.clsRsyntax.RemoveFromAfterCodes(clsSecondEmptyOperator) - 'AddFormatTableMapToAfterCode() - If rdoSkim.Checked Then clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) + ucrSaveTable.Visible = True + ucrSaveTable.SetSaveType(RObjectTypeLabel.Summary, strRObjectFormat:=RObjectFormat.Text) + ucrSaveTable.SetAssignToIfUncheckedValue("last_summary") + ucrSaveTable.SetCheckBoxText("Save Summary") ElseIf rdoTwoVariable.Checked Then clsDummyFunction.AddParameter("checked", "customize", iPosition:=0) If IsNumericByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRCorrelationFunction) + ucrSaveTable.Visible = False ElseIf IsCategoricalByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRAnovaFunction) + ucrSaveTable.Visible = False ElseIf IsNumericByCategorical() OrElse IsCategoricalByCategorical() Then - 'If IsNumericByCategorical() Then - 'ucrReceiverFirstVars.SetParameterIsString() - 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=1) - 'Else - 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsRenameFunction, iPosition:=1) - 'End If + ucrSaveTable.Visible = True ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") - 'ucrBase.clsRsyntax.AddToAfterCodes(clsEmptyOperator, 1) - 'ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 3) End If ElseIf rdoThreeVariable.Checked Then clsDummyFunction.AddParameter("checked", "three_variable", iPosition:=0) - If IsCategoricalByNumeric() OrElse IsCategoricalByCategorical() Then - 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsRenameFunction, iPosition:=1) - ElseIf IsNumericByCategorical() Then - 'clsSummaryTildeOperator.AddParameter("_function", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=1) - End If ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") - 'ucrBase.clsRsyntax.AddToAfterCodes(clsEmptyOperator, 1) - 'ucrBase.clsRsyntax.AddToAfterCodes(clsSecondEmptyOperator, 3) End If End Sub - 'Private Sub AddFormatTableMapToAfterCode() - ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsFormatTableMappingPipeOperator) - ' If rdoSkim.Checked Then 'OrElse IsNothing(clsJoiningPipeOperator.GetParameter("pipe")) Then - ' Exit Sub - ' End If - - ' If IsNumericByCategorical() OrElse IsCategoricalByCategorical() _ - ' OrElse (IsCategoricalByNumeric() AndAlso rdoThreeVariable.Checked) Then - ' ucrBase.clsRsyntax.AddToAfterCodes(clsFormatTableMappingPipeOperator, 2) - ' End If - 'End Sub - - 'Private Sub UpdateCombineFactorFunctions() - ' If rdoSkim.Checked OrElse ucrReceiverFirstVars.IsEmpty Then - ' Exit Sub - ' End If - - ' Dim iPosition As Integer = 0 - ' clsCombineMultipleColumnsFunction.ClearParameters() - ' For Each strColumn In ucrReceiverFirstVars.GetVariableNamesList() - ' clsCombineMultipleColumnsFunction.AddParameter(strColumn, strColumn, bIncludeArgumentName:=False, iPosition:=iPosition) - ' iPosition += 1 - ' Next - 'End Sub - Private Sub UpdateCombineFactorParameterFunction() - clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_one") - clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_two") - clsSummaryTableCombineFactorsFunction.RemoveParameterByName("factor_three") - ' 'If rdoTwoVariable.Checked Then - ' ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", - ' ' ucrReceiverSecondTwoVariableFactor.GetVariableNames(), iPosition:=0, - ' ' bIncludeArgumentName:=False) - ' ' If strFirstVariablesType = "categorical" Then - ' ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", - ' ' ".x", iPosition:=1, - ' ' bIncludeArgumentName:=False) - ' ' End If If rdoThreeVariable.Checked Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_one", - ucrReceiverThreeVariableSecondFactor.GetVariableNames(), iPosition:=0, - bIncludeArgumentName:=False) - If strSecondVariableType = "categorical" Then - clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", - ucrReceiverThreeVariableThirdVariable.GetVariableNames(), iPosition:=1, - bIncludeArgumentName:=False) - End If - - 'If IsCategoricalByCategorical() Then - ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_three", - ' ".x", iPosition:=2, - ' bIncludeArgumentName:=False) - 'End If - 'If IsCategoricalByNumeric() Then - ' clsSummaryTableCombineFactorsFunction.AddParameter("factor_two", - ' ".x", iPosition:=1, - ' bIncludeArgumentName:=False) - 'End If - clsSummaryTableFunction.AddParameter("factors", clsRFunctionParameter:=clsSummaryTableCombineFactorsFunction, iPosition:=2) End If End Sub @@ -737,11 +560,8 @@ Public Class dlgDescribeTwoVariable End If End If End If - 'SwapMmtableHeaderFunctions() - 'Results() EnableDisableFrequencyControls() AddRemoveFrequencyParameters() - ' AddRemoveTopLeftVariable() ChangeLocations() TestOKEnabled() End Sub @@ -789,7 +609,6 @@ Public Class dlgDescribeTwoVariable UpdateCombineFactorParameterFunction() ChangeLocations() EnableDisableFrequencyControls() - 'SwapMmtableHeaderFunctions() AddRemoveNAParameter() HideFormatTableButton() End Sub @@ -801,20 +620,17 @@ Public Class dlgDescribeTwoVariable End Sub Private Sub ChangeLocations() - 'If rdoSkim.Checked Then - ' ucrBase.Location = New Point(iUcrBaseXLocation, 328) - ' Me.Size = New Point(iDialogueXsize, 425) - 'Else - - ' If IsNumericByCategorical() OrElse IsCategoricalByCategorical() _ - ' OrElse (IsCategoricalByNumeric() AndAlso rdoThreeVariable.Checked) Then - ' ucrBase.Location = New Point(iUcrBaseXLocation, 435) - ' Me.Size = New Point(iDialogueXsize, 530) - ' ElseIf IsCategoricalByNumeric() Then - ' ucrBase.Location = New Point(iUcrBaseXLocation, 328) - ' Me.Size = New Point(iDialogueXsize, 425) - ' End If - 'End If + If IsNumericByCategorical() OrElse IsCategoricalByCategorical() _ + OrElse (IsCategoricalByNumeric() AndAlso rdoThreeVariable.Checked) Then + ucrBase.Location = New Point(iUcrBaseXLocation, 542) + Me.Size = New Point(iDialogueXsize, 640) + ElseIf IsCategoricalByNumeric() Then + ucrBase.Location = New Point(iUcrBaseXLocation, 350) + Me.Size = New Point(iDialogueXsize, 450) + Else + ucrBase.Location = New Point(iUcrBaseXLocation, 328) + Me.Size = New Point(iDialogueXsize, 425) + End If End Sub Private Sub ucrReceiverSecondOpt_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSkimrGroupByFactor.ControlValueChanged @@ -837,83 +653,25 @@ Public Class dlgDescribeTwoVariable ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked End Sub - 'Private Sub SwapMmtableHeaderFunctions() - ' If rdoSkim.Checked Then - ' Exit Sub - ' End If - ' Dim ucrReceiverSecondFactor As ucrReceiverSingle = If(rdoTwoVariable.Checked, - ' ucrReceiverSecondTwoVariableFactor, ucrReceiverThreeVariableSecondFactor) - ' Dim strFactor As String = ucrReceiverSecondFactor.GetVariableNames - ' Dim strLeftTop As String = "" - ' Dim strTopLeft As String = "" - ' Dim strSecondHeader As String = "" - - 'clsMmtablePlusOperator.RemoveParameterByName("second_header_function") - - ' If rdoTwoVariable.Checked Then - 'If IsNumericByCategorical() Then - ' If ucrNudColumnFactors.GetText = 1 Then - ' strLeftTop = Chr(39) & "summary-variable" & Chr(39) - ' strTopLeft = strFactor - ' Else - ' strTopLeft = Chr(39) & "summary-variable" & Chr(39) - ' strLeftTop = strFactor - ' End If - 'ElseIf IsCategoricalByCategorical() Then - ' If ucrNudColumnFactors.GetText = 1 Then - ' strTopLeft = Chr(39) & "by_var" & Chr(39) - ' strLeftTop = strFactor - ' ElseIf ucrNudColumnFactors.GetText = 2 Then - ' strLeftTop = Chr(39) & "by_var" & Chr(39) - ' strTopLeft = strFactor - ' End If - 'End If - 'Else - ' If IsCategoricalByCategorical() Then - ' If ucrNudColumnFactors.GetText = 1 Then - ' clsSecondHeaderFunction.strRCommand = "header_left_top" - ' strLeftTop = Chr(39) & "by_var" & Chr(39) - ' strTopLeft = strFactor - ' ElseIf ucrNudColumnFactors.GetText = 2 Then - ' strLeftTop = strFactor - ' strTopLeft = Chr(39) & "by_var" & Chr(39) - ' clsSecondHeaderFunction.strRCommand = "header_top_left" - ' End If - ' strSecondHeader = ucrReceiverThreeVariableThirdVariable.GetVariableNames() - ' ElseIf IsNumericByCategorical() Then - ' If ucrNudColumnFactors.GetText = 1 Then - ' clsSecondHeaderFunction.strRCommand = "header_top_left" - ' strLeftTop = ucrReceiverThreeVariableThirdVariable.GetVariableNames() - ' strTopLeft = strFactor - ' ElseIf ucrNudColumnFactors.GetText = 2 Then - ' clsSecondHeaderFunction.strRCommand = "header_left_top" - ' strTopLeft = ucrReceiverThreeVariableThirdVariable.GetVariableNames() - ' strLeftTop = strFactor - ' End If - ' strSecondHeader = Chr(34) & "summary-variable" & Chr(34) - ' ElseIf IsCategoricalByNumeric() Then - ' If ucrNudColumnFactors.GetText = 1 Then - ' clsSecondHeaderFunction.strRCommand = "header_top_left" - ' strTopLeft = Chr(39) & "by_var" & Chr(39) - ' strLeftTop = strFactor - - ' ElseIf ucrNudColumnFactors.GetText = 2 Then - ' clsSecondHeaderFunction.strRCommand = "header_left_top" - ' strLeftTop = Chr(39) & "by_var" & Chr(39) - ' strTopLeft = strFactor - ' End If - ' strSecondHeader = Chr(34) & "summary-variable" & Chr(34) - ' End If - 'End If - 'clsHeaderTopLeftFunction.AddParameter("variable", strLeftTop, iPosition:=0) - 'clsHeaderLeftTopFunction.AddParameter("variable", strTopLeft, iPosition:=0) - - 'If strSecondHeader <> "" Then - ' clsSecondHeaderFunction.AddParameter("variable", strSecondHeader, iPosition:=0) - ' clsMmtablePlusOperator.AddParameter("second_header_function", - ' clsRFunctionParameter:=clsSecondHeaderFunction, iPosition:=3) - ' End If - 'End Sub + Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnFactor.ControlValueChanged + FactorColumns() + End Sub + Private Sub FactorColumns() + If rdoNoColumnFactor.Checked Then + clsSummaryOperator.RemoveParameterByName("col_factor") + clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=1) + Else + clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + If rdoSummary.Checked Then + clsDummyFunction.AddParameter("factor_cols", "Sum", iPosition:=1) + clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0) + ElseIf rdoVariable.Checked Then + clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=1) + clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) + End If + End If + + End Sub Private Sub AddRemoveFrequencyParameters() If rdoSkim.Checked Then @@ -970,36 +728,27 @@ Public Class dlgDescribeTwoVariable AddRemoveFrequencyParameters() End Sub - Private Sub ucrNudColumnFactors_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudColumnFactors.ControlValueChanged - 'SwapMmtableHeaderFunctions() - End Sub - Private Sub ucrSelectorDescribeTwoVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDescribeTwoVar.ControlValueChanged clsGroupByPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - 'clsMapPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) End Sub Private Sub UpdateSummaryTableFunction() If rdoSkim.Checked Then Exit Sub End If - 'clsSummaryTableFunction.RemoveParameterByName("columns_to_summarise") If rdoTwoVariable.Checked Then If IsCategoricalByCategorical() Then clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=4) ElseIf IsNumericByCategorical() Then clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) - 'clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x", iPosition:=3) End If ElseIf rdoThreeVariable.Checked Then If IsCategoricalByNumeric() Then clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) - clsSummaryTableFunction.AddParameter("columns_to_summarise", ucrReceiverThreeVariableThirdVariable.GetVariableNames(), iPosition:=3) ElseIf IsCategoricalByCategorical() Then clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=4) ElseIf IsNumericByCategorical() Then clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) - 'clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x", iPosition:=3) End If End If End Sub @@ -1013,7 +762,6 @@ Public Class dlgDescribeTwoVariable ChangeLocations() EnableDisableFrequencyControls() UpdateSummaryTableFunction() - 'SwapMmtableHeaderFunctions() AddRemoveFrequencyParameters() EnableDisableFrequencyControls() AddRemoveNAParameter() @@ -1041,11 +789,7 @@ Public Class dlgDescribeTwoVariable strSummaryName = "" End If ElseIf rdoThreeVariable.Checked Then - If IsCategoricalByNumeric() Then - strSummaryName = "Summary tables" - Else - strSummaryName = "Summary tables" - End If + strSummaryName = "Summary tables" End If End If @@ -1084,10 +828,8 @@ Public Class dlgDescribeTwoVariable AssignSecondVariableType() ChangeBaseRCode() UpdateSummaryTableFunction() - 'UpdateCombineFactorParameterFunction() ChangeLocations() EnableDisableFrequencyControls() - ' SwapMmtableHeaderFunctions() AddRemoveNAParameter() HideFormatTableButton() TestOKEnabled() @@ -1125,13 +867,11 @@ Public Class dlgDescribeTwoVariable ChangeFirstTypeLabel() ChangeSumaryLabelText() UpdateSummaryTableFunction() - 'UpdateCombineFactorParameterFunction() + UpdateCombineFactorParameterFunction() ChangeBaseRCode() ManageControlsVisibility() - ' UpdateCombineFactorFunctions() ChangeLocations() EnableDisableFrequencyControls() - ' SwapMmtableHeaderFunctions() AddRemoveFrequencyParameters() AddRemoveNAParameter() HideFormatTableButton() @@ -1140,7 +880,6 @@ Public Class dlgDescribeTwoVariable Private Sub ucrReceiverThreeVariableSecondFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverThreeVariableSecondFactor.ControlValueChanged UpdateCombineFactorParameterFunction() - ' SwapMmtableHeaderFunctions() End Sub Private Sub controls_contentChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayAsPercentage.ControlContentsChanged, @@ -1224,22 +963,10 @@ Public Class dlgDescribeTwoVariable clsNewMutableOPerator:=clsMmtablePlusOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, clsNewgtExtraThemesFunction:=clsgtExtraThemesFuction, clsNewTabStyleCellTextFunction:=clsTabStyleCellTextFunction, clsNewTabStyleFunction:=clsTabStyleFunction, clsNewTabStylePxFunction:=clsTabStylePxFunction, bReset:=bReset) sdgFormatSummaryTables.ShowDialog() - ' AddFormatTableMapToAfterCode() End Sub Private Sub cmdMissingOptions_Click(sender As Object, e As EventArgs) Handles cmdMissingOptions.Click sdgMissingOptions.SetRFunction(clsNewSummaryFunction:=clsSummaryTableFunction, clsNewConcFunction:=clsCombineFunction, bReset:=bResetSubdialog) bResetSubdialog = False sdgMissingOptions.ShowDialog() End Sub - - 'Private Sub AddRemoveTopLeftVariable() - ' If IsNumericByCategorical() Then - ' clsCombineFrequencyFactorParameterFunction.RemoveParameterByName("factor_by") - ' clsMmtablePlusOperator.RemoveParameterByName("header_top_left") - ' clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftSummaryVariableFunction, iPosition:=1, bIncludeArgumentName:=False) - ' Else - ' clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", iPosition:=1, bIncludeArgumentName:=False) - ' clsMmtablePlusOperator.AddParameter("header_top_left", clsRFunctionParameter:=clsHeaderTopLeftFunction, iPosition:=1) - ' End If - 'End Sub End Class From 6fc4ecacf5954bfe89ffa71c07e4f20fd24b4ec1 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Thu, 15 Jun 2023 13:18:54 +0300 Subject: [PATCH 12/21] More changes --- instat/dlgDescribeTwoVariable.Designer.vb | 387 ++++++---------------- instat/dlgDescribeTwoVariable.vb | 372 ++++++++++----------- instat/dlgSummaryTables.vb | 4 +- instat/sdgFormatSummaryTables.vb | 2 +- 4 files changed, 281 insertions(+), 484 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index 1de4a8c3d2d..6445fcf27bd 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -38,24 +38,17 @@ Partial Class dlgDescribeTwoVariable 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.lblFactorsAsPercentage = New System.Windows.Forms.Label() - Me.lblSigFigs = New System.Windows.Forms.Label() - Me.grpThreeVariablePercentages = New System.Windows.Forms.GroupBox() - Me.lblThreeVariableFactorAsPercentages = New System.Windows.Forms.Label() Me.rdoThreeVariable = New System.Windows.Forms.RadioButton() Me.cmdFormatTable = New System.Windows.Forms.Button() Me.lblThreeVariableSecondFactor = New System.Windows.Forms.Label() - Me.cmdSummaries = New System.Windows.Forms.Button() - Me.grpOptions = New System.Windows.Forms.GroupBox() Me.cmdMissingOptions = New System.Windows.Forms.Button() Me.lbSecondVariable = New System.Windows.Forms.Label() Me.lblFirstVariable = New System.Windows.Forms.Label() - Me.grpFrequency = New System.Windows.Forms.GroupBox() Me.grpColumnFactor = New System.Windows.Forms.GroupBox() + Me.rdoVariableFactor = New System.Windows.Forms.RadioButton() Me.rdoSummary = New System.Windows.Forms.RadioButton() Me.rdoVariable = New System.Windows.Forms.RadioButton() Me.rdoNoColumnFactor = New System.Windows.Forms.RadioButton() - Me.lblMarginName = New System.Windows.Forms.Label() Me.grpSummaries = New System.Windows.Forms.GroupBox() Me.lblFirstType = New System.Windows.Forms.Label() Me.lblSecondBy = New System.Windows.Forms.Label() @@ -68,83 +61,26 @@ Partial Class dlgDescribeTwoVariable Me.rdoSkim = New System.Windows.Forms.RadioButton() Me.lblThirdVariable = New System.Windows.Forms.Label() Me.lblSecondGroupByFactor = New System.Windows.Forms.Label() - Me.grpTwoVariablePercentages = New System.Windows.Forms.GroupBox() Me.rdoTwoVariable = New System.Windows.Forms.RadioButton() - Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() - Me.ucrChkPercentageProportion = New instat.ucrCheck() - Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() + Me.cmdSummaries = New System.Windows.Forms.Button() + Me.ucrReorderSummary = New instat.ucrReorder() Me.ucrChkOmitMissing = New instat.ucrCheck() + Me.ucrReceiverColumnFactor = New instat.ucrReceiverSingle() + Me.ucrPnlColumnFactor = New instat.UcrPanel() Me.ucrSaveTable = New instat.ucrSave() - Me.ucrReceiverThreeVariablePercentage = New instat.ucrReceiverSingle() - Me.ucrChkThreeVariablePercentageProportion = New instat.ucrCheck() - Me.ucrChkThreeVariableDisplayAsPercentage = New instat.ucrCheck() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverThreeVariableThirdVariable = New instat.ucrReceiverSingle() Me.ucrReceiverSecondSkimrGroupByFactor = New instat.ucrReceiverSingle() Me.ucrReceiverSecondTwoVariableFactor = New instat.ucrReceiverSingle() Me.ucrSelectorDescribeTwoVar = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrPnlColumnFactor = New instat.UcrPanel() - Me.ucrNudSigFigs = New instat.ucrNud() - Me.ucrInputMarginName = New instat.ucrInputTextBox() - Me.ucrChkDisplayMargins = New instat.ucrCheck() Me.ucrReceiverFirstVars = New instat.ucrReceiverMultiple() Me.ucrPnlDescribe = New instat.UcrPanel() Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() Me.ucrReceiverSkimrGroupByFactor = New instat.ucrReceiverSingle() - Me.grpThreeVariablePercentages.SuspendLayout() - Me.grpOptions.SuspendLayout() - Me.grpFrequency.SuspendLayout() Me.grpColumnFactor.SuspendLayout() Me.grpSummaries.SuspendLayout() - Me.grpTwoVariablePercentages.SuspendLayout() Me.SuspendLayout() ' - 'lblFactorsAsPercentage - ' - Me.lblFactorsAsPercentage.AutoSize = True - Me.lblFactorsAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(18, 44) - Me.lblFactorsAsPercentage.Name = "lblFactorsAsPercentage" - Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(117, 13) - Me.lblFactorsAsPercentage.TabIndex = 1 - Me.lblFactorsAsPercentage.Tag = "Of Factor (Optional):" - Me.lblFactorsAsPercentage.Text = "Factors as Percentage:" - ' - 'lblSigFigs - ' - Me.lblSigFigs.AutoSize = True - Me.lblSigFigs.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSigFigs.Location = New System.Drawing.Point(8, 25) - Me.lblSigFigs.Name = "lblSigFigs" - Me.lblSigFigs.Size = New System.Drawing.Size(96, 13) - Me.lblSigFigs.TabIndex = 0 - Me.lblSigFigs.Tag = "Significant_Figures:" - Me.lblSigFigs.Text = "Significant Figures:" - ' - 'grpThreeVariablePercentages - ' - Me.grpThreeVariablePercentages.Controls.Add(Me.ucrReceiverThreeVariablePercentage) - Me.grpThreeVariablePercentages.Controls.Add(Me.lblThreeVariableFactorAsPercentages) - Me.grpThreeVariablePercentages.Controls.Add(Me.ucrChkThreeVariablePercentageProportion) - Me.grpThreeVariablePercentages.Controls.Add(Me.ucrChkThreeVariableDisplayAsPercentage) - Me.grpThreeVariablePercentages.Location = New System.Drawing.Point(234, 239) - Me.grpThreeVariablePercentages.Name = "grpThreeVariablePercentages" - Me.grpThreeVariablePercentages.Size = New System.Drawing.Size(174, 114) - Me.grpThreeVariablePercentages.TabIndex = 41 - Me.grpThreeVariablePercentages.TabStop = False - Me.grpThreeVariablePercentages.Text = "Percentages" - ' - 'lblThreeVariableFactorAsPercentages - ' - Me.lblThreeVariableFactorAsPercentages.AutoSize = True - Me.lblThreeVariableFactorAsPercentages.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblThreeVariableFactorAsPercentages.Location = New System.Drawing.Point(18, 44) - Me.lblThreeVariableFactorAsPercentages.Name = "lblThreeVariableFactorAsPercentages" - Me.lblThreeVariableFactorAsPercentages.Size = New System.Drawing.Size(102, 13) - Me.lblThreeVariableFactorAsPercentages.TabIndex = 2 - Me.lblThreeVariableFactorAsPercentages.Tag = "Factors as Percentage:" - Me.lblThreeVariableFactorAsPercentages.Text = "Of Factor (Optional):" - ' 'rdoThreeVariable ' Me.rdoThreeVariable.Appearance = System.Windows.Forms.Appearance.Button @@ -164,7 +100,7 @@ Partial Class dlgDescribeTwoVariable 'cmdFormatTable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFormatTable.Location = New System.Drawing.Point(250, 468) + Me.cmdFormatTable.Location = New System.Drawing.Point(317, 421) Me.cmdFormatTable.Name = "cmdFormatTable" Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23) Me.cmdFormatTable.TabIndex = 44 @@ -174,40 +110,17 @@ Partial Class dlgDescribeTwoVariable 'lblThreeVariableSecondFactor ' Me.lblThreeVariableSecondFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblThreeVariableSecondFactor.Location = New System.Drawing.Point(261, 158) + Me.lblThreeVariableSecondFactor.Location = New System.Drawing.Point(303, 150) Me.lblThreeVariableSecondFactor.Name = "lblThreeVariableSecondFactor" Me.lblThreeVariableSecondFactor.Size = New System.Drawing.Size(100, 15) Me.lblThreeVariableSecondFactor.TabIndex = 35 Me.lblThreeVariableSecondFactor.Tag = "" Me.lblThreeVariableSecondFactor.Text = "Second Variable :" ' - 'cmdSummaries - ' - Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdSummaries.Location = New System.Drawing.Point(6, 45) - Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(105, 23) - Me.cmdSummaries.TabIndex = 1 - Me.cmdSummaries.Tag = "Summaries" - Me.cmdSummaries.Text = "Summaries" - Me.cmdSummaries.UseVisualStyleBackColor = True - ' - 'grpOptions - ' - Me.grpOptions.Controls.Add(Me.ucrChkOmitMissing) - Me.grpOptions.Controls.Add(Me.cmdSummaries) - Me.grpOptions.Controls.Add(Me.cmdMissingOptions) - Me.grpOptions.Location = New System.Drawing.Point(245, 352) - Me.grpOptions.Name = "grpOptions" - Me.grpOptions.Size = New System.Drawing.Size(168, 108) - Me.grpOptions.TabIndex = 40 - Me.grpOptions.TabStop = False - Me.grpOptions.Text = "Options" - ' 'cmdMissingOptions ' Me.cmdMissingOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdMissingOptions.Location = New System.Drawing.Point(6, 72) + Me.cmdMissingOptions.Location = New System.Drawing.Point(158, 296) Me.cmdMissingOptions.Name = "cmdMissingOptions" Me.cmdMissingOptions.Size = New System.Drawing.Size(105, 23) Me.cmdMissingOptions.TabIndex = 46 @@ -217,7 +130,7 @@ Partial Class dlgDescribeTwoVariable 'lbSecondVariable ' Me.lbSecondVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lbSecondVariable.Location = New System.Drawing.Point(261, 158) + Me.lbSecondVariable.Location = New System.Drawing.Point(306, 150) Me.lbSecondVariable.Name = "lbSecondVariable" Me.lbSecondVariable.Size = New System.Drawing.Size(100, 15) Me.lbSecondVariable.TabIndex = 27 @@ -228,45 +141,43 @@ Partial Class dlgDescribeTwoVariable ' Me.lblFirstVariable.AutoSize = True Me.lblFirstVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstVariable.Location = New System.Drawing.Point(261, 55) + Me.lblFirstVariable.Location = New System.Drawing.Point(306, 49) Me.lblFirstVariable.Name = "lblFirstVariable" Me.lblFirstVariable.Size = New System.Drawing.Size(75, 13) Me.lblFirstVariable.TabIndex = 31 Me.lblFirstVariable.Tag = "" Me.lblFirstVariable.Text = "First Variables:" ' - 'grpFrequency - ' - Me.grpFrequency.Controls.Add(Me.grpColumnFactor) - Me.grpFrequency.Controls.Add(Me.ucrNudSigFigs) - Me.grpFrequency.Controls.Add(Me.ucrInputMarginName) - Me.grpFrequency.Controls.Add(Me.lblMarginName) - Me.grpFrequency.Controls.Add(Me.lblSigFigs) - Me.grpFrequency.Controls.Add(Me.ucrChkDisplayMargins) - Me.grpFrequency.Location = New System.Drawing.Point(3, 293) - Me.grpFrequency.Name = "grpFrequency" - Me.grpFrequency.Size = New System.Drawing.Size(223, 199) - Me.grpFrequency.TabIndex = 42 - Me.grpFrequency.TabStop = False - Me.grpFrequency.Text = "Display" - ' 'grpColumnFactor ' + Me.grpColumnFactor.Controls.Add(Me.ucrReceiverColumnFactor) + Me.grpColumnFactor.Controls.Add(Me.rdoVariableFactor) Me.grpColumnFactor.Controls.Add(Me.rdoSummary) Me.grpColumnFactor.Controls.Add(Me.rdoVariable) Me.grpColumnFactor.Controls.Add(Me.rdoNoColumnFactor) Me.grpColumnFactor.Controls.Add(Me.ucrPnlColumnFactor) - Me.grpColumnFactor.Location = New System.Drawing.Point(5, 99) + Me.grpColumnFactor.Location = New System.Drawing.Point(5, 321) Me.grpColumnFactor.Name = "grpColumnFactor" - Me.grpColumnFactor.Size = New System.Drawing.Size(168, 94) + Me.grpColumnFactor.Size = New System.Drawing.Size(255, 110) Me.grpColumnFactor.TabIndex = 51 Me.grpColumnFactor.TabStop = False Me.grpColumnFactor.Text = "Columns" ' + 'rdoVariableFactor + ' + Me.rdoVariableFactor.AutoSize = True + Me.rdoVariableFactor.Location = New System.Drawing.Point(15, 61) + Me.rdoVariableFactor.Name = "rdoVariableFactor" + Me.rdoVariableFactor.Size = New System.Drawing.Size(96, 17) + Me.rdoVariableFactor.TabIndex = 51 + Me.rdoVariableFactor.TabStop = True + Me.rdoVariableFactor.Text = "Variable Factor" + Me.rdoVariableFactor.UseVisualStyleBackColor = True + ' 'rdoSummary ' Me.rdoSummary.AutoSize = True - Me.rdoSummary.Location = New System.Drawing.Point(18, 25) + Me.rdoSummary.Location = New System.Drawing.Point(15, 40) Me.rdoSummary.Name = "rdoSummary" Me.rdoSummary.Size = New System.Drawing.Size(68, 17) Me.rdoSummary.TabIndex = 47 @@ -277,7 +188,7 @@ Partial Class dlgDescribeTwoVariable 'rdoVariable ' Me.rdoVariable.AutoSize = True - Me.rdoVariable.Location = New System.Drawing.Point(18, 46) + Me.rdoVariable.Location = New System.Drawing.Point(15, 19) Me.rdoVariable.Name = "rdoVariable" Me.rdoVariable.Size = New System.Drawing.Size(63, 17) Me.rdoVariable.TabIndex = 49 @@ -288,7 +199,7 @@ Partial Class dlgDescribeTwoVariable 'rdoNoColumnFactor ' Me.rdoNoColumnFactor.AutoSize = True - Me.rdoNoColumnFactor.Location = New System.Drawing.Point(18, 67) + Me.rdoNoColumnFactor.Location = New System.Drawing.Point(15, 82) Me.rdoNoColumnFactor.Name = "rdoNoColumnFactor" Me.rdoNoColumnFactor.Size = New System.Drawing.Size(110, 17) Me.rdoNoColumnFactor.TabIndex = 50 @@ -296,16 +207,6 @@ Partial Class dlgDescribeTwoVariable Me.rdoNoColumnFactor.Text = "No Column Factor" Me.rdoNoColumnFactor.UseVisualStyleBackColor = True ' - 'lblMarginName - ' - Me.lblMarginName.AutoSize = True - Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(11, 75) - Me.lblMarginName.Name = "lblMarginName" - Me.lblMarginName.Size = New System.Drawing.Size(41, 13) - Me.lblMarginName.TabIndex = 3 - Me.lblMarginName.Text = "Name :" - ' 'grpSummaries ' Me.grpSummaries.Controls.Add(Me.lblFirstType) @@ -325,7 +226,7 @@ Partial Class dlgDescribeTwoVariable ' Me.lblFirstType.AutoSize = True Me.lblFirstType.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstType.Location = New System.Drawing.Point(12, 15) + Me.lblFirstType.Location = New System.Drawing.Point(12, 18) Me.lblFirstType.Name = "lblFirstType" Me.lblFirstType.Size = New System.Drawing.Size(0, 13) Me.lblFirstType.TabIndex = 0 @@ -391,7 +292,7 @@ Partial Class dlgDescribeTwoVariable 'lblFirstGroupByFactor ' Me.lblFirstGroupByFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstGroupByFactor.Location = New System.Drawing.Point(261, 158) + Me.lblFirstGroupByFactor.Location = New System.Drawing.Point(302, 149) Me.lblFirstGroupByFactor.Name = "lblFirstGroupByFactor" Me.lblFirstGroupByFactor.Size = New System.Drawing.Size(100, 15) Me.lblFirstGroupByFactor.TabIndex = 29 @@ -417,7 +318,7 @@ Partial Class dlgDescribeTwoVariable 'lblThirdVariable ' Me.lblThirdVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblThirdVariable.Location = New System.Drawing.Point(263, 198) + Me.lblThirdVariable.Location = New System.Drawing.Point(306, 191) Me.lblThirdVariable.Name = "lblThirdVariable" Me.lblThirdVariable.Size = New System.Drawing.Size(154, 15) Me.lblThirdVariable.TabIndex = 37 @@ -427,26 +328,13 @@ Partial Class dlgDescribeTwoVariable 'lblSecondGroupByFactor ' Me.lblSecondGroupByFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondGroupByFactor.Location = New System.Drawing.Point(263, 201) + Me.lblSecondGroupByFactor.Location = New System.Drawing.Point(306, 191) Me.lblSecondGroupByFactor.Name = "lblSecondGroupByFactor" Me.lblSecondGroupByFactor.Size = New System.Drawing.Size(137, 15) Me.lblSecondGroupByFactor.TabIndex = 33 Me.lblSecondGroupByFactor.Tag = "" Me.lblSecondGroupByFactor.Text = "Second Factor (Optional) :" ' - 'grpTwoVariablePercentages - ' - Me.grpTwoVariablePercentages.Controls.Add(Me.ucrReceiverPercentages) - Me.grpTwoVariablePercentages.Controls.Add(Me.lblFactorsAsPercentage) - Me.grpTwoVariablePercentages.Controls.Add(Me.ucrChkPercentageProportion) - Me.grpTwoVariablePercentages.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpTwoVariablePercentages.Location = New System.Drawing.Point(233, 220) - Me.grpTwoVariablePercentages.Name = "grpTwoVariablePercentages" - Me.grpTwoVariablePercentages.Size = New System.Drawing.Size(174, 120) - Me.grpTwoVariablePercentages.TabIndex = 45 - Me.grpTwoVariablePercentages.TabStop = False - Me.grpTwoVariablePercentages.Text = "Percentages" - ' 'rdoTwoVariable ' Me.rdoTwoVariable.Appearance = System.Windows.Forms.Appearance.Button @@ -463,91 +351,70 @@ Partial Class dlgDescribeTwoVariable Me.rdoTwoVariable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoTwoVariable.UseVisualStyleBackColor = True ' - 'ucrReceiverPercentages - ' - Me.ucrReceiverPercentages.AutoSize = True - Me.ucrReceiverPercentages.frmParent = Nothing - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(21, 63) - 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.strNcFilePath = "" - Me.ucrReceiverPercentages.TabIndex = 8 - Me.ucrReceiverPercentages.ucrSelector = Nothing - ' - 'ucrChkPercentageProportion - ' - Me.ucrChkPercentageProportion.AutoSize = True - Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(14, 86) - Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(154, 23) - Me.ucrChkPercentageProportion.TabIndex = 3 - ' - 'ucrChkDisplayAsPercentage - ' - Me.ucrChkDisplayAsPercentage.AutoSize = True - Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) - Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) - Me.ucrChkDisplayAsPercentage.TabIndex = 0 + 'cmdSummaries + ' + Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdSummaries.Location = New System.Drawing.Point(301, 229) + Me.cmdSummaries.Name = "cmdSummaries" + Me.cmdSummaries.Size = New System.Drawing.Size(120, 23) + Me.cmdSummaries.TabIndex = 1 + Me.cmdSummaries.Tag = "Summaries" + Me.cmdSummaries.Text = "Choose Summaries..." + Me.cmdSummaries.UseVisualStyleBackColor = True + ' + 'ucrReorderSummary + ' + Me.ucrReorderSummary.Location = New System.Drawing.Point(266, 252) + Me.ucrReorderSummary.Name = "ucrReorderSummary" + Me.ucrReorderSummary.Size = New System.Drawing.Size(194, 163) + Me.ucrReorderSummary.TabIndex = 52 + Me.ucrReorderSummary.ucrDataFrameList = Nothing + Me.ucrReorderSummary.ucrReceiver = Nothing ' 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.AutoSize = True Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(9, 19) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(9, 296) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) Me.ucrChkOmitMissing.TabIndex = 0 ' + 'ucrReceiverColumnFactor + ' + Me.ucrReceiverColumnFactor.AutoSize = True + Me.ucrReceiverColumnFactor.frmParent = Nothing + Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(131, 59) + 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 = 52 + Me.ucrReceiverColumnFactor.ucrSelector = Nothing + ' + 'ucrPnlColumnFactor + ' + Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(6, 15) + Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" + Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(119, 88) + Me.ucrPnlColumnFactor.TabIndex = 48 + ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(9, 506) + Me.ucrSaveTable.Location = New System.Drawing.Point(7, 453) Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(399, 34) + Me.ucrSaveTable.Size = New System.Drawing.Size(414, 34) Me.ucrSaveTable.TabIndex = 47 ' - 'ucrReceiverThreeVariablePercentage - ' - Me.ucrReceiverThreeVariablePercentage.AutoSize = True - Me.ucrReceiverThreeVariablePercentage.frmParent = Nothing - Me.ucrReceiverThreeVariablePercentage.Location = New System.Drawing.Point(21, 63) - Me.ucrReceiverThreeVariablePercentage.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverThreeVariablePercentage.Name = "ucrReceiverThreeVariablePercentage" - Me.ucrReceiverThreeVariablePercentage.Selector = Nothing - Me.ucrReceiverThreeVariablePercentage.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverThreeVariablePercentage.strNcFilePath = "" - Me.ucrReceiverThreeVariablePercentage.TabIndex = 3 - Me.ucrReceiverThreeVariablePercentage.ucrSelector = Nothing - ' - 'ucrChkThreeVariablePercentageProportion - ' - Me.ucrChkThreeVariablePercentageProportion.AutoSize = True - Me.ucrChkThreeVariablePercentageProportion.Checked = False - Me.ucrChkThreeVariablePercentageProportion.Location = New System.Drawing.Point(14, 88) - Me.ucrChkThreeVariablePercentageProportion.Name = "ucrChkThreeVariablePercentageProportion" - Me.ucrChkThreeVariablePercentageProportion.Size = New System.Drawing.Size(136, 23) - Me.ucrChkThreeVariablePercentageProportion.TabIndex = 0 - ' - 'ucrChkThreeVariableDisplayAsPercentage - ' - Me.ucrChkThreeVariableDisplayAsPercentage.AutoSize = True - Me.ucrChkThreeVariableDisplayAsPercentage.Checked = False - Me.ucrChkThreeVariableDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) - Me.ucrChkThreeVariableDisplayAsPercentage.Name = "ucrChkThreeVariableDisplayAsPercentage" - Me.ucrChkThreeVariableDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) - Me.ucrChkThreeVariableDisplayAsPercentage.TabIndex = 0 - ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(6, 536) + Me.ucrBase.Location = New System.Drawing.Point(7, 492) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 43 @@ -556,7 +423,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverThreeVariableThirdVariable.AutoSize = True Me.ucrReceiverThreeVariableThirdVariable.frmParent = Me - Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(265, 214) + Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(301, 204) Me.ucrReceiverThreeVariableThirdVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverThreeVariableThirdVariable.Name = "ucrReceiverThreeVariableThirdVariable" Me.ucrReceiverThreeVariableThirdVariable.Selector = Nothing @@ -569,7 +436,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverSecondSkimrGroupByFactor.AutoSize = True Me.ucrReceiverSecondSkimrGroupByFactor.frmParent = Me - Me.ucrReceiverSecondSkimrGroupByFactor.Location = New System.Drawing.Point(265, 214) + Me.ucrReceiverSecondSkimrGroupByFactor.Location = New System.Drawing.Point(301, 204) Me.ucrReceiverSecondSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSecondSkimrGroupByFactor.Name = "ucrReceiverSecondSkimrGroupByFactor" Me.ucrReceiverSecondSkimrGroupByFactor.Selector = Nothing @@ -582,7 +449,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverSecondTwoVariableFactor.AutoSize = True Me.ucrReceiverSecondTwoVariableFactor.frmParent = Me - Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(264, 173) + Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(301, 164) Me.ucrReceiverSecondTwoVariableFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSecondTwoVariableFactor.Name = "ucrReceiverSecondTwoVariableFactor" Me.ucrReceiverSecondTwoVariableFactor.Selector = Nothing @@ -603,52 +470,11 @@ Partial Class dlgDescribeTwoVariable Me.ucrSelectorDescribeTwoVar.Size = New System.Drawing.Size(213, 183) Me.ucrSelectorDescribeTwoVar.TabIndex = 28 ' - 'ucrPnlColumnFactor - ' - Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(8, 19) - Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" - Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(147, 68) - Me.ucrPnlColumnFactor.TabIndex = 48 - ' - '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(129, 22) - 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 = 5 - Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrInputMarginName - ' - Me.ucrInputMarginName.AddQuotesIfUnrecognised = True - Me.ucrInputMarginName.AutoSize = True - Me.ucrInputMarginName.IsMultiline = False - Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(53, 72) - Me.ucrInputMarginName.Name = "ucrInputMarginName" - Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) - Me.ucrInputMarginName.TabIndex = 4 - ' - 'ucrChkDisplayMargins - ' - Me.ucrChkDisplayMargins.AutoSize = True - Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(9, 49) - Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" - Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(149, 23) - Me.ucrChkDisplayMargins.TabIndex = 2 - ' 'ucrReceiverFirstVars ' Me.ucrReceiverFirstVars.AutoSize = True Me.ucrReceiverFirstVars.frmParent = Me - Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(264, 73) + Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(301, 64) Me.ucrReceiverFirstVars.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFirstVars.Name = "ucrReceiverFirstVars" Me.ucrReceiverFirstVars.Selector = Nothing @@ -669,7 +495,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverThreeVariableSecondFactor.AutoSize = True Me.ucrReceiverThreeVariableSecondFactor.frmParent = Me - Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(264, 173) + Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(301, 164) Me.ucrReceiverThreeVariableSecondFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverThreeVariableSecondFactor.Name = "ucrReceiverThreeVariableSecondFactor" Me.ucrReceiverThreeVariableSecondFactor.Selector = Nothing @@ -682,7 +508,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverSkimrGroupByFactor.AutoSize = True Me.ucrReceiverSkimrGroupByFactor.frmParent = Me - Me.ucrReceiverSkimrGroupByFactor.Location = New System.Drawing.Point(264, 174) + Me.ucrReceiverSkimrGroupByFactor.Location = New System.Drawing.Point(301, 164) Me.ucrReceiverSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSkimrGroupByFactor.Name = "ucrReceiverSkimrGroupByFactor" Me.ucrReceiverSkimrGroupByFactor.Selector = Nothing @@ -696,11 +522,13 @@ Partial Class dlgDescribeTwoVariable Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ClientSize = New System.Drawing.Size(419, 594) - Me.Controls.Add(Me.grpTwoVariablePercentages) - Me.Controls.Add(Me.grpOptions) + Me.ClientSize = New System.Drawing.Size(482, 548) + Me.Controls.Add(Me.cmdSummaries) + Me.Controls.Add(Me.ucrReorderSummary) + Me.Controls.Add(Me.ucrChkOmitMissing) + Me.Controls.Add(Me.cmdMissingOptions) + Me.Controls.Add(Me.grpColumnFactor) Me.Controls.Add(Me.ucrSaveTable) - Me.Controls.Add(Me.grpThreeVariablePercentages) Me.Controls.Add(Me.cmdFormatTable) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.ucrReceiverThreeVariableThirdVariable) @@ -708,20 +536,19 @@ Partial Class dlgDescribeTwoVariable Me.Controls.Add(Me.ucrReceiverSecondTwoVariableFactor) Me.Controls.Add(Me.ucrSelectorDescribeTwoVar) Me.Controls.Add(Me.lblFirstVariable) - Me.Controls.Add(Me.grpFrequency) Me.Controls.Add(Me.grpSummaries) - Me.Controls.Add(Me.lblFirstGroupByFactor) - Me.Controls.Add(Me.lblThirdVariable) - Me.Controls.Add(Me.lblSecondGroupByFactor) Me.Controls.Add(Me.ucrReceiverFirstVars) Me.Controls.Add(Me.rdoThreeVariable) Me.Controls.Add(Me.rdoTwoVariable) Me.Controls.Add(Me.rdoSkim) Me.Controls.Add(Me.ucrPnlDescribe) - Me.Controls.Add(Me.lblThreeVariableSecondFactor) Me.Controls.Add(Me.lbSecondVariable) Me.Controls.Add(Me.ucrReceiverThreeVariableSecondFactor) Me.Controls.Add(Me.ucrReceiverSkimrGroupByFactor) + Me.Controls.Add(Me.lblThirdVariable) + Me.Controls.Add(Me.lblSecondGroupByFactor) + Me.Controls.Add(Me.lblFirstGroupByFactor) + Me.Controls.Add(Me.lblThreeVariableSecondFactor) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -729,28 +556,14 @@ Partial Class dlgDescribeTwoVariable Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Describe_Two_Variable" Me.Text = "Describe Two Variables" - Me.grpThreeVariablePercentages.ResumeLayout(False) - Me.grpThreeVariablePercentages.PerformLayout() - Me.grpOptions.ResumeLayout(False) - Me.grpOptions.PerformLayout() - Me.grpFrequency.ResumeLayout(False) - Me.grpFrequency.PerformLayout() Me.grpColumnFactor.ResumeLayout(False) Me.grpColumnFactor.PerformLayout() Me.grpSummaries.ResumeLayout(False) Me.grpSummaries.PerformLayout() - Me.grpTwoVariablePercentages.ResumeLayout(False) - Me.grpTwoVariablePercentages.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub - Friend WithEvents ucrReceiverPercentages As ucrReceiverSingle - Friend WithEvents grpThreeVariablePercentages As GroupBox - Friend WithEvents ucrReceiverThreeVariablePercentage As ucrReceiverSingle - Friend WithEvents lblThreeVariableFactorAsPercentages As Label - Friend WithEvents ucrChkThreeVariablePercentageProportion As ucrCheck - Friend WithEvents ucrChkThreeVariableDisplayAsPercentage As ucrCheck Friend WithEvents cmdFormatTable As Button Friend WithEvents lblThreeVariableSecondFactor As Label Friend WithEvents ucrReceiverThreeVariableSecondFactor As ucrReceiverSingle @@ -760,17 +573,9 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents ucrReceiverSkimrGroupByFactor As ucrReceiverSingle Friend WithEvents ucrReceiverSecondTwoVariableFactor As ucrReceiverSingle Friend WithEvents ucrSelectorDescribeTwoVar As ucrSelectorByDataFrameAddRemove - Friend WithEvents grpOptions As GroupBox Friend WithEvents ucrChkOmitMissing As ucrCheck - Friend WithEvents cmdSummaries As Button Friend WithEvents lbSecondVariable As Label Friend WithEvents lblFirstVariable As Label - Friend WithEvents grpFrequency As GroupBox - Friend WithEvents ucrNudSigFigs As ucrNud - Friend WithEvents ucrInputMarginName As ucrInputTextBox - Friend WithEvents lblMarginName As Label - Friend WithEvents lblSigFigs As Label - Friend WithEvents ucrChkDisplayMargins As ucrCheck Friend WithEvents grpSummaries As GroupBox Friend WithEvents lblFirstType As Label Friend WithEvents lblSecondBy As Label @@ -782,10 +587,6 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents lblFirstGroupByFactor As Label Friend WithEvents lblThirdVariable As Label Friend WithEvents lblSecondGroupByFactor As Label - Friend WithEvents grpTwoVariablePercentages As GroupBox - Friend WithEvents lblFactorsAsPercentage As Label - Friend WithEvents ucrChkPercentageProportion As ucrCheck - Friend WithEvents ucrChkDisplayAsPercentage As ucrCheck Friend WithEvents ucrReceiverFirstVars As ucrReceiverMultiple Friend WithEvents rdoThreeVariable As RadioButton Friend WithEvents rdoTwoVariable As RadioButton @@ -798,4 +599,8 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents rdoSummary As RadioButton Friend WithEvents ucrPnlColumnFactor As UcrPanel Friend WithEvents grpColumnFactor As GroupBox + Friend WithEvents ucrReorderSummary As ucrReorder + Friend WithEvents cmdSummaries As Button + Friend WithEvents rdoVariableFactor As RadioButton + Friend WithEvents ucrReceiverColumnFactor As ucrReceiverSingle End Class diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 1461420683c..3535107f297 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -24,35 +24,24 @@ Public Class dlgDescribeTwoVariable 'MAPPING AND SUMMARY FUNCTIoNS Private clsCombineFrequencyParametersFunction, clsCombineFunction, - clsCombineMultipleColumnsFunction, clsDummyFunction, clsFormatTableMapFunction, - clsGroupByFunction, clsHeaderLeftTopFunction, clsHeaderTopLeftFunction, - clsMmtableFunction, clsMmtableMapFunction, clsRAnovaFunction, - clsRCorrelationFunction, clsRCustomSummaryFunction, clsRenameFunction, - clsSecondHeaderFunction, clsSkimrFunction, clsSummariesListFunction, - clsSummaryMapFunction, clsSummaryTableCombineFactorsFunction, - clsSummaryTableFunction, clsThreeVariableCombineFrequencyParametersFunction, clsPivotWiderFunction As New RFunction + clsDummyFunction, clsGroupByFunction, clsRAnovaFunction, + clsRCorrelationFunction, clsSkimrFunction, clsSummariesListFunction, + clsSummaryTableCombineFactorsFunction, clsSummaryTableFunction, + clsThreeVariableCombineFrequencyParametersFunction, clsPivotWiderFunction As New RFunction 'FORMAT TABLE FUNCTIONS Private clsFootnoteCellBodyFunction, clsFootnoteCellFunction, - clsFootnoteSubtitleLocationFunction, clsFootnoteTitleLocationFunction, - clsHeaderFormatFunction, clsSecondFootnoteCellBodyFunction, + clsFootnoteSubtitleLocationFunction, clsFootnoteTitleLocationFunction, clsSecondFootnoteCellBodyFunction, clsSecondFootnoteCellFunction, clsStyleListFunction, clsTabFootnoteSubtitleFunction, clsTabFootnoteTitleFunction, clsTableSourcenoteFunction, clsTableTitleFunction, clsThemesTabOptionFunction, clsTabStyleCellTextFunction, clsTabStyleCellTitleFunction, clsTabStyleFunction, - clsTabStylePxFunction, clsgtExtraThemesFuction As New RFunction + clsTabStylePxFunction, clsgtExtrasThemesFuction As New RFunction - Private clsGroupByPipeOperator, clsMmtablePlusOperator, clsMapPipeOperator, - clsMmtableTildeOperator, clsSummaryTildeOperator, clsEmptyOperator, - clsSecondEmptyOperator, clsSummaryOperator As New ROperator + Private clsGroupByPipeOperator, clsSummaryOperator As New ROperator - Private clsGetDataTypeFunction, clsGetSecondDataTypeFunction, - clsFrequencyTablesFunction, clsCombineFactorsFunction, - clsHeaderTopLeftSummaryVariableFunction, clsgtFunction, - clsCombineFrequencyFactorParameterFunction, clsSelectFunction, clsRenameCombineFunction, - clsFrequencyTables2Function, clsSummaryMap2Function As New RFunction - - Private clsDataTildeOperator, clsMapFrequency2PipeOperator As New ROperator + Private clsFrequencyTablesFunction, clsgtFunction, clsCombineFrequencyFactorParameterFunction, + clsSelectFunction, clsRenameCombineFunction As New RFunction 'Frequency Parameters Private lstFrequencyParameters As New List(Of String)({"percentage_type", "margin_name", "perc_total_factors", "perc_decimal", @@ -60,8 +49,7 @@ Public Class dlgDescribeTwoVariable 'Format Operators Private clsPipeOperator, clsTabFootnoteOperator, - clsJoiningPipeOperator, clsFormatTableTildeOperator, - clsFormatTableMappingPipeOperator As ROperator + clsJoiningPipeOperator, clsMutableOperator As ROperator Private iUcrBaseXLocation, iDialogueXsize As Integer Private Sub dlgDescribeTwoVariable_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -91,7 +79,6 @@ Public Class dlgDescribeTwoVariable ucrReceiverFirstVars.SetParameter(New RParameter("columns_to_summarise", 1)) ucrReceiverFirstVars.SetParameterIsString() ucrReceiverFirstVars.Selector = ucrSelectorDescribeTwoVar - ' ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) ucrReceiverSecondTwoVariableFactor.SetParameter(New RParameter("factors", 2)) ucrReceiverSecondTwoVariableFactor.SetParameterIsString() @@ -122,12 +109,6 @@ Public Class dlgDescribeTwoVariable ucrChkOmitMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkOmitMissing.bUpdateRCodeFromControl = True - ucrChkDisplayMargins.SetParameter(New RParameter("include_margins", 7)) - ucrChkDisplayMargins.SetText("Display Margins") - ucrChkDisplayMargins.SetRDefault("FALSE") - - ucrInputMarginName.SetLinkedDisplayControl(lblMarginName) - ucrPnlDescribe.AddRadioButton(rdoTwoVariable) ucrPnlDescribe.AddRadioButton(rdoSkim) ucrPnlDescribe.AddRadioButton(rdoThreeVariable) @@ -140,91 +121,49 @@ Public Class dlgDescribeTwoVariable ucrPnlDescribe.AddToLinkedControls({ucrReceiverSecondTwoVariableFactor}, {rdoTwoVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlDescribe.AddToLinkedControls({ucrReceiverThreeVariableSecondFactor}, {rdoThreeVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkDisplayAsPercentage.SetParameter(New RParameter("percentage_type", 1)) - ucrChkDisplayAsPercentage.SetText("As Percentages") - ucrChkDisplayAsPercentage.SetValuesCheckedAndUnchecked(Chr(34) & "factors" & Chr(34), Chr(34) & "none" & Chr(34)) - ucrChkDisplayAsPercentage.SetRDefault(Chr(34) & "none" & Chr(34)) - - ucrChkDisplayAsPercentage.AddToLinkedControls(ucrReceiverPercentages, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkDisplayAsPercentage.AddToLinkedControls(ucrChkPercentageProportion, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrReceiverThreeVariableSecondFactor.SetParameter(New RParameter("second_three_varible_factor", 0, bNewIncludeArgumentName:=False)) ucrReceiverThreeVariableSecondFactor.SetParameterIsString() ucrReceiverThreeVariableSecondFactor.Selector = ucrSelectorDescribeTwoVar ucrReceiverThreeVariableSecondFactor.SetIncludedDataTypes({"factor"}) ucrReceiverThreeVariableSecondFactor.SetLinkedDisplayControl(lblThreeVariableSecondFactor) - ucrReceiverPercentages.SetParameter(New RParameter("perc_total_factors", 2)) - ucrReceiverPercentages.SetParameterIsString() - ucrReceiverPercentages.Selector = ucrSelectorDescribeTwoVar - ucrReceiverPercentages.SetDataType("factor") - ucrReceiverPercentages.SetLinkedDisplayControl(lblFactorsAsPercentage) - - ucrChkThreeVariableDisplayAsPercentage.SetParameter(New RParameter("percentage_type", 1)) - ucrChkThreeVariableDisplayAsPercentage.SetText("As Percentages") - ucrChkThreeVariableDisplayAsPercentage.SetValuesCheckedAndUnchecked(Chr(34) & "factors" & Chr(34), Chr(34) & "none" & Chr(34)) - ucrChkThreeVariableDisplayAsPercentage.SetRDefault(Chr(34) & "none" & Chr(34)) - - ucrChkThreeVariableDisplayAsPercentage.AddToLinkedControls(ucrReceiverThreeVariablePercentage, {True}, bNewLinkedHideIfParameterMissing:=True, - bNewLinkedAddRemoveParameter:=True) - ucrChkThreeVariableDisplayAsPercentage.AddToLinkedControls(ucrChkThreeVariablePercentageProportion, {True}, bNewLinkedAddRemoveParameter:=True, - bNewLinkedHideIfParameterMissing:=True) - - ucrReceiverThreeVariablePercentage.SetParameter(New RParameter("perc_total_factors", 2)) - ucrReceiverThreeVariablePercentage.SetParameterIsString() - ucrReceiverThreeVariablePercentage.Selector = ucrSelectorDescribeTwoVar - ucrReceiverThreeVariablePercentage.SetDataType("factor") - ucrReceiverThreeVariablePercentage.SetLinkedDisplayControl(lblThreeVariableFactorAsPercentages) - - ucrChkThreeVariablePercentageProportion.SetParameter(New RParameter("perc_decimal", 3)) - ucrChkThreeVariablePercentageProportion.SetText("Display as Decimal") - ucrChkThreeVariablePercentageProportion.SetRDefault("FALSE") - - ucrChkPercentageProportion.SetParameter(New RParameter("perc_decimal", 3)) - ucrChkPercentageProportion.SetText("Display as Decimal") - ucrChkPercentageProportion.SetRDefault("FALSE") - - ucrNudSigFigs.SetParameter(New RParameter("signif_fig", 6)) - ucrNudSigFigs.SetMinMax(0, 22) - ucrNudSigFigs.SetRDefault(2) - ucrPnlColumnFactor.AddRadioButton(rdoSummary) ucrPnlColumnFactor.AddRadioButton(rdoVariable) + ucrPnlColumnFactor.AddRadioButton(rdoVariableFactor) ucrPnlColumnFactor.AddRadioButton(rdoNoColumnFactor) ucrPnlColumnFactor.AddParameterValuesCondition(rdoNoColumnFactor, "factor_cols", "NoColFactor") ucrPnlColumnFactor.AddParameterValuesCondition(rdoSummary, "factor_cols", "Sum") ucrPnlColumnFactor.AddParameterValuesCondition(rdoVariable, "factor_cols", "Var") + ucrPnlColumnFactor.AddParameterValuesCondition(rdoVariableFactor, "factor_cols", "FactorVar") + ucrPnlColumnFactor.AddToLinkedControls(ucrReceiverColumnFactor, {rdoVariableFactor}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + ucrReceiverColumnFactor.SetParameter(New RParameter("names_from", 0)) + ucrReceiverColumnFactor.Selector = ucrSelectorDescribeTwoVar + ucrReceiverColumnFactor.SetDataType("factor") ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetDataFrameSelector(ucrSelectorDescribeTwoVar.ucrAvailableDataFrames) ucrSaveTable.SetIsComboBox() - 'ucrNudColumnFactors.SetMinMax(1, 2) - + ucrReorderSummary.bDataIsSummaries = True End Sub Private Sub SetDefaults() clsCombineFrequencyParametersFunction = New RFunction clsCombineFunction = New RFunction - clsCombineMultipleColumnsFunction = New RFunction clsDummyFunction = New RFunction clsFootnoteCellBodyFunction = New RFunction clsFootnoteCellFunction = New RFunction clsFootnoteSubtitleLocationFunction = New RFunction clsFootnoteTitleLocationFunction = New RFunction clsGroupByFunction = New RFunction - clsHeaderFormatFunction = New RFunction clsRAnovaFunction = New RFunction clsRCorrelationFunction = New RFunction - clsRCustomSummaryFunction = New RFunction - clsRenameFunction = New RFunction clsSecondFootnoteCellBodyFunction = New RFunction clsSecondFootnoteCellFunction = New RFunction - clsSecondHeaderFunction = New RFunction clsSkimrFunction = New RFunction clsStyleListFunction = New RFunction clsSummariesListFunction = New RFunction - clsSummaryMapFunction = New RFunction clsSummaryTableCombineFactorsFunction = New RFunction clsSummaryTableFunction = New RFunction clsTabFootnoteSubtitleFunction = New RFunction @@ -237,22 +176,18 @@ Public Class dlgDescribeTwoVariable clsTabStyleFunction = New RFunction clsTabStylePxFunction = New RFunction clsThreeVariableCombineFrequencyParametersFunction = New RFunction - clsFormatTableTildeOperator = New ROperator clsGroupByPipeOperator = New ROperator clsJoiningPipeOperator = New ROperator clsPipeOperator = New ROperator clsTabFootnoteOperator = New ROperator - clsMapFrequency2PipeOperator = New ROperator - clsDataTildeOperator = New ROperator - clsSummaryMap2Function = New RFunction clsgtFunction = New RFunction clsSummaryOperator = New ROperator clsPivotWiderFunction = New RFunction + clsgtExtrasThemesFuction = New RFunction + clsMutableOperator = New ROperator ucrSelectorDescribeTwoVar.Reset() ucrReceiverFirstVars.SetMeAsReceiver() - ucrInputMarginName.SetText("All") - ucrInputMarginName.Visible = False ucrBase.clsRsyntax.ClearCodes() @@ -261,7 +196,7 @@ Public Class dlgDescribeTwoVariable clsCombineFunction.SetRCommand("c") clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) - clsDummyFunction.AddParameter("factor_cols", "Sum", iPosition:=1) + clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=1) clsDummyFunction.AddParameter("theme", "select", iPosition:=2) clsPivotWiderFunction.SetRCommand("pivot_wider") @@ -272,9 +207,6 @@ Public Class dlgDescribeTwoVariable clsSelectFunction.AddParameter(".data", clsRFunctionParameter:=clsFrequencyTablesFunction, iPosition:=0) clsSelectFunction.AddParameter("rename_function", bIncludeArgumentName:=False, clsRFunctionParameter:=clsRenameCombineFunction, iPosition:=1) - 'clsCombineFrequencyFactorParameterFunction.SetRCommand("c") - 'clsCombineFrequencyFactorParameterFunction.AddParameter("factor_by", ".x", iPosition:=1, bIncludeArgumentName:=False) - clsFootnoteCellBodyFunction.SetPackageName("gt") clsFootnoteCellBodyFunction.SetRCommand("cells_body") @@ -287,6 +219,8 @@ Public Class dlgDescribeTwoVariable clsFootnoteTitleLocationFunction.SetPackageName("gt") clsFootnoteTitleLocationFunction.SetRCommand("cells_title") + clsgtExtrasThemesFuction.SetPackageName("gtExtras") + clsGroupByFunction.SetPackageName("dplyr") clsGroupByFunction.SetRCommand("group_by") @@ -330,9 +264,6 @@ Public Class dlgDescribeTwoVariable clsSecondFootnoteCellFunction.SetPackageName("gt") clsSecondFootnoteCellFunction.SetRCommand("tab_footnote") - clsSkimrFunction.SetPackageName("skimr") - clsSkimrFunction.SetRCommand("skim") - clsStyleListFunction.SetRCommand("list") clsSummariesListFunction.SetRCommand("c") @@ -413,9 +344,6 @@ Public Class dlgDescribeTwoVariable ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1) ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) - ucrChkDisplayMargins.AddAdditionalCodeParameterPair(clsThreeVariableCombineFrequencyParametersFunction, ucrChkDisplayMargins.GetParameter, iAdditionalPairNo:=1) - - ucrNudSigFigs.AddAdditionalCodeParameterPair(clsThreeVariableCombineFrequencyParametersFunction, ucrNudSigFigs.GetParameter, iAdditionalPairNo:=1) ucrSaveTable.AddAdditionalRCode(clsGroupByPipeOperator, bReset) ucrChkOmitMissing.SetRCode(clsSummaryTableFunction, bReset) @@ -424,20 +352,14 @@ Public Class dlgDescribeTwoVariable ucrSelectorDescribeTwoVar.SetRCode(clsRCorrelationFunction, bReset) ucrReceiverSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset) ucrReceiverSecondSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset) - ucrChkDisplayMargins.SetRCode(clsCombineFrequencyParametersFunction, bReset) - ucrChkDisplayAsPercentage.SetRCode(clsCombineFrequencyParametersFunction, bReset) - ucrReceiverPercentages.SetRCode(clsCombineFrequencyParametersFunction, bReset) - ucrChkPercentageProportion.SetRCode(clsCombineFrequencyParametersFunction, bReset) - ucrChkThreeVariableDisplayAsPercentage.SetRCode(clsThreeVariableCombineFrequencyParametersFunction, bReset) - ucrReceiverThreeVariablePercentage.SetRCode(clsThreeVariableCombineFrequencyParametersFunction, bReset) - ucrChkThreeVariablePercentageProportion.SetRCode(clsThreeVariableCombineFrequencyParametersFunction, bReset) ucrPnlDescribe.SetRCode(clsDummyFunction, bReset) - ucrNudSigFigs.SetRCode(clsCombineFrequencyParametersFunction, bReset) ucrReceiverThreeVariableSecondFactor.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrReceiverThreeVariableThirdVariable.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrPnlColumnFactor.SetRCode(clsDummyFunction, bReset) ucrSaveTable.SetRCode(clsJoiningPipeOperator) bRcodeSet = True + + FillListView() End Sub Public Sub TestOKEnabled() @@ -447,19 +369,19 @@ Public Class dlgDescribeTwoVariable OrElse rdoSkim.Checked _ OrElse (Not ucrReceiverThreeVariableSecondFactor.IsEmpty _ AndAlso Not ucrReceiverThreeVariableThirdVariable.IsEmpty) _ - AndAlso (IsCategoricalByCategorical() OrElse IsNumericByCategorical() _ - OrElse IsCategoricalByNumeric() OrElse IsNumericByNumeric()))) + AndAlso (IsFactorByFactor() OrElse IsNumericByFactor() _ + OrElse IsFactorByNumeric() OrElse IsNumericByNumeric()))) End Sub - Private Function IsCategoricalByCategorical() As Boolean + Private Function IsFactorByFactor() As Boolean Return strFirstVariablesType = "categorical" AndAlso strSecondVariableType = "categorical" End Function - Private Function IsCategoricalByNumeric() As Boolean + Private Function IsFactorByNumeric() As Boolean Return strFirstVariablesType = "categorical" AndAlso strSecondVariableType = "numeric" End Function - Private Function IsNumericByCategorical() As Boolean + Private Function IsNumericByFactor() As Boolean Return strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "categorical" End Function @@ -475,16 +397,17 @@ Public Class dlgDescribeTwoVariable Private Sub cmdSummaries_Click(sender As Object, e As EventArgs) Handles cmdSummaries.Click If rdoTwoVariable.Checked Then - If IsNumericByCategorical() Then + If IsNumericByFactor() Then sdgSummaries.SetRFunction(clsSummariesListFunction, clsSummaryTableFunction, clsCombineFunction, ucrSelectorDescribeTwoVar, bResetSubdialog) End If ElseIf rdoThreeVariable.Checked Then - If IsCategoricalByNumeric() OrElse IsNumericByCategorical() Then + If IsFactorByNumeric() OrElse IsNumericByFactor() Then sdgSummaries.SetRFunction(clsSummariesListFunction, clsSummaryTableFunction, clsCombineFunction, ucrSelectorDescribeTwoVar, bResetSubdialog) End If End If bResetSubdialog = False sdgSummaries.ShowDialog() + FillListView() TestOKEnabled() End Sub @@ -497,15 +420,17 @@ Public Class dlgDescribeTwoVariable Private Sub ManageControlsVisibility() grpSummaries.Visible = rdoThreeVariable.Checked OrElse rdoTwoVariable.Checked - + ucrReorderSummary.Visible = IsFactorByFactor() OrElse IsNumericByFactor() + cmdSummaries.Visible = IsFactorByFactor() OrElse IsNumericByFactor() + grpColumnFactor.Visible = IsFactorByFactor() OrElse IsNumericByFactor() If rdoTwoVariable.Checked Then ucrChkOmitMissing.Visible = strFirstVariablesType = "numeric" - grpOptions.Visible = IsNumericByCategorical() - cmdMissingOptions.Enabled = ucrChkOmitMissing.Checked AndAlso IsNumericByCategorical() + cmdMissingOptions.Visible = ucrChkOmitMissing.Checked AndAlso IsNumericByFactor() ElseIf rdoThreeVariable.Checked Then - grpOptions.Visible = IsCategoricalByNumeric() OrElse IsNumericByCategorical() + ucrChkOmitMissing.Visible = IsFactorByNumeric() OrElse IsNumericByFactor() Else - grpOptions.Visible = False + ucrChkOmitMissing.Visible = False + cmdMissingOptions.Visible = False End If End Sub @@ -522,11 +447,19 @@ Public Class dlgDescribeTwoVariable If IsNumericByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRCorrelationFunction) ucrSaveTable.Visible = False - ElseIf IsCategoricalByNumeric() Then + ElseIf IsfactorByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRAnovaFunction) ucrSaveTable.Visible = False - ElseIf IsNumericByCategorical() OrElse IsCategoricalByCategorical() Then + ElseIf IsNumericByfactor() Then ucrSaveTable.Visible = True + clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=1) + ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + ucrSaveTable.SetAssignToIfUncheckedValue("last_table") + ucrSaveTable.SetCheckBoxText("Save Table") + ElseIf IsfactorByfactor() Then + ucrSaveTable.Visible = True + clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=1) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") @@ -539,6 +472,7 @@ Public Class dlgDescribeTwoVariable ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") End If + FactorColumns() End Sub Private Sub UpdateCombineFactorParameterFunction() @@ -551,16 +485,16 @@ Public Class dlgDescribeTwoVariable clsSummaryTableFunction.RemoveParameterByName("na.rm") If ucrChkOmitMissing.Checked Then If rdoTwoVariable.Checked Then - If IsNumericByCategorical() Then + If IsNumericByFactor() Then clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=5) End If ElseIf rdoThreeVariable.Checked Then - If IsNumericByCategorical() OrElse IsCategoricalByNumeric() Then + If IsNumericByFactor() OrElse IsFactorByNumeric() Then clsSummaryTableFunction.AddParameter("na.rm", "TRUE", iPosition:=5) End If End If End If - EnableDisableFrequencyControls() + 'EnableDisableFrequencyControls() AddRemoveFrequencyParameters() ChangeLocations() TestOKEnabled() @@ -592,7 +526,7 @@ Public Class dlgDescribeTwoVariable ucrReceiverFirstVars.SetSingleTypeStatus(False) ElseIf rdoThreeVariable.Checked Then lblThreeVariableCategorical.Visible = True - lblThreeVariableCategorical.Location = New Point(106, 16) + lblThreeVariableCategorical.Location = New Point(106, 18) lblSecondType.Location = New Point(12, 33) lblSecondBy.Visible = True Else @@ -601,6 +535,8 @@ Public Class dlgDescribeTwoVariable lblSecondType.Location = New Point(106, 18) lblSecondBy.Visible = False End If + ' cmdSummaries.Visible = rdoTwoVariable.Checked OrElse rdoThreeVariable.Checked + ChangeFirstTypeLabel() AssignSecondVariableType() ChangeBaseRCode() @@ -608,25 +544,25 @@ Public Class dlgDescribeTwoVariable UpdateSummaryTableFunction() UpdateCombineFactorParameterFunction() ChangeLocations() - EnableDisableFrequencyControls() + ' EnableDisableFrequencyControls() AddRemoveNAParameter() HideFormatTableButton() End Sub Private Sub HideFormatTableButton() - cmdFormatTable.Visible = IsNumericByCategorical() _ - OrElse IsCategoricalByCategorical() OrElse (IsCategoricalByNumeric() _ + cmdFormatTable.Visible = IsNumericByFactor() _ + OrElse IsFactorByFactor() OrElse (IsFactorByNumeric() _ AndAlso rdoThreeVariable.Checked) End Sub Private Sub ChangeLocations() - If IsNumericByCategorical() OrElse IsCategoricalByCategorical() _ - OrElse (IsCategoricalByNumeric() AndAlso rdoThreeVariable.Checked) Then - ucrBase.Location = New Point(iUcrBaseXLocation, 542) - Me.Size = New Point(iDialogueXsize, 640) - ElseIf IsCategoricalByNumeric() Then - ucrBase.Location = New Point(iUcrBaseXLocation, 350) - Me.Size = New Point(iDialogueXsize, 450) + If IsNumericByFactor() OrElse IsFactorByFactor() _ + OrElse (IsFactorByNumeric() AndAlso rdoThreeVariable.Checked) Then + ucrBase.Location = New Point(iUcrBaseXLocation, 487) + Me.Size = New Point(iDialogueXsize, 580) + ElseIf IsFactorByNumeric() Then + ucrBase.Location = New Point(iUcrBaseXLocation, 319) + Me.Size = New Point(iDialogueXsize, 415) Else ucrBase.Location = New Point(iUcrBaseXLocation, 328) Me.Size = New Point(iDialogueXsize, 425) @@ -641,21 +577,22 @@ Public Class dlgDescribeTwoVariable End If End Sub - Private Sub EnableDisableFrequencyControls() - grpThreeVariablePercentages.Visible = rdoThreeVariable.Checked _ - AndAlso IsCategoricalByCategorical() - grpTwoVariablePercentages.Visible = rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ - OrElse IsNumericByCategorical()) - grpFrequency.Visible = (rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ - OrElse IsNumericByCategorical())) OrElse (rdoThreeVariable.Checked _ - AndAlso (IsNumericByCategorical() OrElse IsCategoricalByNumeric() _ - OrElse IsCategoricalByCategorical())) - ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked - End Sub + 'Private Sub EnableDisableFrequencyControls() + ' grpThreeVariablePercentages.Visible = rdoThreeVariable.Checked _ + ' AndAlso IsFactorByFactor() + ' ' grpTwoVariablePercentages.Visible = rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ + ' 'OrElse IsNumericByCategorical()) + ' ' grpFrequency.Visible = (rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ + ' 'OrElse IsNumericByCategorical())) OrElse (rdoThreeVariable.Checked _ + ' 'AndAlso (IsNumericByCategorical() OrElse IsCategoricalByNumeric() _ + ' ' OrElse IsCategoricalByCategorical())) + ' ' ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked + 'End Sub - Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnFactor.ControlValueChanged + Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnFactor.ControlValueChanged, ucrReceiverColumnFactor.ControlValueChanged FactorColumns() End Sub + Private Sub FactorColumns() If rdoNoColumnFactor.Checked Then clsSummaryOperator.RemoveParameterByName("col_factor") @@ -668,9 +605,14 @@ Public Class dlgDescribeTwoVariable ElseIf rdoVariable.Checked Then clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=1) clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) + ElseIf rdoVariableFactor.Checked Then + ucrReceiverColumnFactor.SetMeAsReceiver() + clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=1) + clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) End If End If + AddingColumnFactor() End Sub Private Sub AddRemoveFrequencyParameters() @@ -687,10 +629,10 @@ Public Class dlgDescribeTwoVariable clsCombineFrequencyParametersFunction).Clone For Each clsParameter In clsTempFrequency.clsParameters - If IsCategoricalByCategorical() Then + If IsFactorByFactor() Then clsSummaryTableFunction.AddParameter(clsParameter) Else - If IsNumericByCategorical() OrElse IsCategoricalByNumeric() Then + If IsNumericByFactor() OrElse IsFactorByNumeric() Then Select Case clsParameter.strArgumentName Case "signif_fig", "include_margins", "margin_name" clsSummaryTableFunction.AddParameter(clsParameter) @@ -700,33 +642,32 @@ Public Class dlgDescribeTwoVariable Next End Sub - Private Sub Frequencies_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkPercentageProportion.ControlValueChanged, - ucrChkDisplayAsPercentage.ControlValueChanged, ucrNudSigFigs.ControlValueChanged, ucrChkDisplayMargins.ControlValueChanged, - ucrReceiverPercentages.ControlValueChanged, ucrInputMarginName.ControlValueChanged, ucrChkThreeVariablePercentageProportion.ControlValueChanged, ucrChkThreeVariableDisplayAsPercentage.ControlValueChanged - If rdoTwoVariable.Checked Then - If ucrChkDisplayAsPercentage.Checked Then - ucrReceiverPercentages.SetMeAsReceiver() - Else - ucrReceiverFirstVars.SetMeAsReceiver() - End If - ElseIf rdoThreeVariable.Checked Then - If ucrChkThreeVariableDisplayAsPercentage.Checked Then - ucrReceiverThreeVariablePercentage.SetMeAsReceiver() - Else - ucrReceiverFirstVars.SetMeAsReceiver() - End If - End If - If ucrChkDisplayMargins.Checked Then - ucrInputMarginName.Visible = True - clsCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) - clsThreeVariableCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) - Else - ucrInputMarginName.Visible = False - clsCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") - clsThreeVariableCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") - End If - AddRemoveFrequencyParameters() - End Sub + 'Private Sub Frequencies_ControlValueChanged(ucrChangedControl As ucrCore) Handles + ' ucrChkDisplayAsPercentage.ControlValueChanged, ucrChkDisplayMargins.ControlValueChanged, ucrChkThreeVariablePercentageProportion.ControlValueChanged, ucrChkThreeVariableDisplayAsPercentage.ControlValueChanged + ' If rdoTwoVariable.Checked Then + ' If ucrChkDisplayAsPercentage.Checked Then + ' ucrReceiverPercentages.SetMeAsReceiver() + ' Else + ' ucrReceiverFirstVars.SetMeAsReceiver() + ' End If + ' ElseIf rdoThreeVariable.Checked Then + ' If ucrChkThreeVariableDisplayAsPercentage.Checked Then + ' ucrReceiverThreeVariablePercentage.SetMeAsReceiver() + ' Else + ' ucrReceiverFirstVars.SetMeAsReceiver() + ' End If + ' End If + ' If ucrChkDisplayMargins.Checked Then + ' ucrInputMarginName.Visible = True + ' clsCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) + ' clsThreeVariableCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) + ' Else + ' ucrInputMarginName.Visible = False + ' clsCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") + ' clsThreeVariableCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") + ' End If + ' AddRemoveFrequencyParameters() + 'End Sub Private Sub ucrSelectorDescribeTwoVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDescribeTwoVar.ControlValueChanged clsGroupByPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) @@ -737,17 +678,17 @@ Public Class dlgDescribeTwoVariable Exit Sub End If If rdoTwoVariable.Checked Then - If IsCategoricalByCategorical() Then + If IsFactorByFactor() Then clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=4) - ElseIf IsNumericByCategorical() Then + ElseIf IsNumericByFactor() Then clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) End If ElseIf rdoThreeVariable.Checked Then - If IsCategoricalByNumeric() Then + If IsFactorByNumeric() Then clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) - ElseIf IsCategoricalByCategorical() Then + ElseIf IsFactorByFactor() Then clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=4) - ElseIf IsNumericByCategorical() Then + ElseIf IsNumericByFactor() Then clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) End If End If @@ -760,10 +701,10 @@ Public Class dlgDescribeTwoVariable UpdateCombineFactorParameterFunction() ChangeBaseRCode() ChangeLocations() - EnableDisableFrequencyControls() + 'EnableDisableFrequencyControls() UpdateSummaryTableFunction() AddRemoveFrequencyParameters() - EnableDisableFrequencyControls() + ' EnableDisableFrequencyControls() AddRemoveNAParameter() HideFormatTableButton() TestOKEnabled() @@ -775,15 +716,15 @@ Public Class dlgDescribeTwoVariable End If Dim strSummaryName As String = "" - If IsCategoricalByCategorical() Then + If IsFactorByFactor() Then strSummaryName = "Frequency tables" - ElseIf IsNumericByCategorical() Then + ElseIf IsNumericByFactor() Then strSummaryName = "Summary tables" Else If rdoTwoVariable.Checked Then If IsNumericByNumeric() Then strSummaryName = "Correlations" - ElseIf IsCategoricalByNumeric() Then + ElseIf IsFactorByNumeric() Then strSummaryName = "ANOVA tables" Else strSummaryName = "" @@ -829,7 +770,7 @@ Public Class dlgDescribeTwoVariable ChangeBaseRCode() UpdateSummaryTableFunction() ChangeLocations() - EnableDisableFrequencyControls() + 'EnableDisableFrequencyControls() AddRemoveNAParameter() HideFormatTableButton() TestOKEnabled() @@ -871,7 +812,7 @@ Public Class dlgDescribeTwoVariable ChangeBaseRCode() ManageControlsVisibility() ChangeLocations() - EnableDisableFrequencyControls() + 'EnableDisableFrequencyControls() AddRemoveFrequencyParameters() AddRemoveNAParameter() HideFormatTableButton() @@ -882,11 +823,10 @@ Public Class dlgDescribeTwoVariable UpdateCombineFactorParameterFunction() End Sub - Private Sub controls_contentChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayAsPercentage.ControlContentsChanged, - ucrReceiverPercentages.ControlContentsChanged, - ucrChkThreeVariableDisplayAsPercentage.ControlContentsChanged, ucrReceiverThreeVariableSecondFactor.ControlContentsChanged - TestOKEnabled() - End Sub + 'Private Sub controls_contentChanged(ucrChangedControl As ucrCore) Handles + ' ucrChkThreeVariableDisplayAsPercentage.ControlContentsChanged, ucrReceiverThreeVariableSecondFactor.ControlContentsChanged + ' TestOKEnabled() + 'End Sub Private Sub ucrReceiverSecondTwoVariableFactor_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverSecondTwoVariableFactor.SelectionChanged MatchingCategoricalByCategoricalVariables(ucrReceiverSecondTwoVariableFactor) @@ -960,7 +900,7 @@ Public Class dlgDescribeTwoVariable clsNewThemesTabOptionFunction:=clsThemesTabOptionFunction, clsNewFootnoteCellFunction:=clsFootnoteCellFunction, clsNewSecondFootnoteCellBodyFunction:=clsSecondFootnoteCellBodyFunction, clsNewPipeOperator:=clsPipeOperator, clsNewFootnoteTitleLocationFunction:=clsFootnoteTitleLocationFunction, clsNewFootnoteCellBodyFunction:=clsFootnoteCellBodyFunction, clsNewFootnoteSubtitleLocationFunction:=clsFootnoteSubtitleLocationFunction, clsNewTabFootnoteSubtitleFunction:=clsTabFootnoteSubtitleFunction, clsNewJoiningOperator:=clsJoiningPipeOperator, - clsNewMutableOPerator:=clsMmtablePlusOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, clsNewgtExtraThemesFunction:=clsgtExtraThemesFuction, + clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, clsNewgtExtraThemesFunction:=clsgtExtrasThemesFuction, clsNewMutableOperator:=clsMutableOperator, clsNewTabStyleCellTextFunction:=clsTabStyleCellTextFunction, clsNewTabStyleFunction:=clsTabStyleFunction, clsNewTabStylePxFunction:=clsTabStylePxFunction, bReset:=bReset) sdgFormatSummaryTables.ShowDialog() End Sub @@ -969,4 +909,56 @@ Public Class dlgDescribeTwoVariable bResetSubdialog = False sdgMissingOptions.ShowDialog() End Sub + + Private Sub FillListView() + If clsSummariesListFunction.clsParameters.Count > 0 Then + ucrReorderSummary.lstAvailableData.Clear() + ucrReorderSummary.lstAvailableData.Columns.Add("Summaries") + ucrReorderSummary.lstAvailableData.Columns(0).Width = -2 + For i = 0 To clsSummariesListFunction.clsParameters.Count - 1 + clsSummariesListFunction.clsParameters(i).Position = i + ucrReorderSummary.lstAvailableData.Items.Add(clsSummariesListFunction.clsParameters(i).strArgumentName) + Next + Else + ucrReorderSummary.lstAvailableData.Items.Clear() + End If + End Sub + + Private Sub ucrReorderSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReorderSummary.ControlValueChanged + Dim lstOrderedSummaries As New List(Of RParameter) + Dim iPosition As Integer = 0 + For i = 0 To ucrReorderSummary.lstAvailableData.Items.Count - 1 + lstOrderedSummaries.Add(clsSummariesListFunction.GetParameter(ucrReorderSummary.lstAvailableData.Items(i).Text)) + Next + + clsSummariesListFunction.ClearParameters() + 'Changing the parameter positions + For Each clsParameter In lstOrderedSummaries + clsParameter.Position = iPosition + clsSummariesListFunction.AddParameter(clsParameter) + iPosition += 1 + Next + End Sub + + Private Sub AddingColumnFactor() + Dim lstVariables As New List(Of String) + Dim iXVarCount As Integer + + iXVarCount = lstVariables.Count + If bRcodeSet Then + If lstVariables.Contains(ucrReceiverColumnFactor.GetVariableNames(False)) OrElse + Not ucrReceiverSecondTwoVariableFactor.GetVariableNames().Contains(ucrReceiverColumnFactor.GetVariableNames(False)) Then + ucrReceiverColumnFactor.Clear() + ucrReceiverSecondTwoVariableFactor.SetMeAsReceiver() + End If + If iXVarCount = 0 AndAlso Not ucrReceiverSecondTwoVariableFactor.IsEmpty AndAlso + ucrReceiverColumnFactor.IsEmpty() Then + ucrReceiverColumnFactor.SetText(ucrReceiverSecondTwoVariableFactor.GetVariableNames(False)) + ucrReceiverSecondTwoVariableFactor.SetMeAsReceiver() + ElseIf ucrReceiverSecondTwoVariableFactor.IsEmpty Then + ucrReceiverColumnFactor.Clear() + End If + 'lstVariables = ucrReceiverSecondTwoVariableFactor.GetVariableNamesAsList() + End If + End Sub End Class diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 83b33aa566c..607c7cc44f3 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -396,7 +396,7 @@ Public Class dlgSummaryTables clsNewFootnoteCellFunction:=clsFootnoteCellFunction, clsNewSecondFootnoteCellBodyFunction:=clsSecondFootnoteCellBodyFunction, clsNewPipeOperator:=clsPipeOperator, clsNewFootnoteTitleLocationFunction:=clsFootnoteTitleLocationFunction, clsNewFootnoteCellBodyFunction:=clsFootnoteCellBodyFunction, clsNewFootnoteSubtitleLocationFunction:=clsFootnoteSubtitleLocationFunction, clsNewTabFootnoteSubtitleFunction:=clsTabFootnoteSubtitleFunction, clsNewJoiningOperator:=clsJoiningPipeOperator, - clsNewMutableOPerator:=clsSummaryOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, + clsNewMutableOperator:=clsSummaryOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, clsNewTabStyleCellTextFunction:=clsTabStyleCellTextFunction, clsNewTabStyleFunction:=clsTabStyleFunction, clsNewTabStylePxFunction:=clsTabStylePxFunction, clsNewThemesTabOptionFunction:=clsThemesTabOptionsFunction, clsNewgtExtraThemesFunction:=clsgtExtraThemesFunction, bReset:=bResetFormatSubdialog) Else @@ -404,7 +404,7 @@ Public Class dlgSummaryTables clsNewFootnoteCellFunction:=clsFootnoteCellFunction, clsNewSecondFootnoteCellBodyFunction:=clsSecondFootnoteCellBodyFunction, clsNewPipeOperator:=clsPipeOperator, clsNewFootnoteTitleLocationFunction:=clsFootnoteTitleLocationFunction, clsNewFootnoteCellBodyFunction:=clsFootnoteCellBodyFunction, clsNewFootnoteSubtitleLocationFunction:=clsFootnoteSubtitleLocationFunction, clsNewTabFootnoteSubtitleFunction:=clsTabFootnoteSubtitleFunction, clsNewJoiningOperator:=clsJoiningPipeOperator, - clsNewMutableOPerator:=clsFrequencyOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, + clsNewMutableOperator:=clsFrequencyOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, clsNewTabStyleCellTextFunction:=clsTabStyleCellTextFunction, clsNewTabStyleFunction:=clsTabStyleFunction, clsNewTabStylePxFunction:=clsTabStylePxFunction, clsNewThemesTabOptionFunction:=clsThemesTabOptionsFunction, clsNewgtExtraThemesFunction:=clsgtExtraThemesFunction, bReset:=bResetFormatSubdialog) End If diff --git a/instat/sdgFormatSummaryTables.vb b/instat/sdgFormatSummaryTables.vb index 9296e0b6661..a4890c9a25b 100644 --- a/instat/sdgFormatSummaryTables.vb +++ b/instat/sdgFormatSummaryTables.vb @@ -133,7 +133,7 @@ Public Class sdgFormatSummaryTables End Sub Public Sub SetRCode(bReset As Boolean, clsNewTableTitleFunction As RFunction, clsNewTabFootnoteTitleFunction As RFunction, clsNewFootnoteCellFunction As RFunction, - clsNewTableSourcenoteFunction As RFunction, clsNewTabStyleFunction As RFunction, clsNewMutableOPerator As ROperator, + clsNewTableSourcenoteFunction As RFunction, clsNewTabStyleFunction As RFunction, clsNewMutableOperator As ROperator, clsNewPipeOperator As ROperator, clsNewFootnoteTitleLocationFunction As RFunction, clsNewFootnoteSubtitleLocationFunction As RFunction, clsNewTabFootnoteSubtitleFunction As RFunction, clsNewFootnoteCellBodyFunction As RFunction, clsNewJoiningOperator As ROperator, clsNewSecondFootnoteCellFunction As RFunction, clsNewTabStyleCellTextFunction As RFunction, From be1e64b461d1aa495ec6f79bce2f5151ccd72c1e Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Mon, 19 Jun 2023 15:45:01 +0300 Subject: [PATCH 13/21] More changes --- instat/dlgDescribeTwoVariable.Designer.vb | 52 +++++++++++------------ instat/dlgDescribeTwoVariable.vb | 9 ++-- 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index 6445fcf27bd..d6d159e86fe 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -45,10 +45,12 @@ Partial Class dlgDescribeTwoVariable Me.lbSecondVariable = New System.Windows.Forms.Label() Me.lblFirstVariable = New System.Windows.Forms.Label() Me.grpColumnFactor = New System.Windows.Forms.GroupBox() + Me.ucrReceiverColumnFactor = New instat.ucrReceiverSingle() Me.rdoVariableFactor = New System.Windows.Forms.RadioButton() Me.rdoSummary = New System.Windows.Forms.RadioButton() Me.rdoVariable = New System.Windows.Forms.RadioButton() Me.rdoNoColumnFactor = New System.Windows.Forms.RadioButton() + Me.ucrPnlColumnFactor = New instat.UcrPanel() Me.grpSummaries = New System.Windows.Forms.GroupBox() Me.lblFirstType = New System.Windows.Forms.Label() Me.lblSecondBy = New System.Windows.Forms.Label() @@ -65,8 +67,6 @@ Partial Class dlgDescribeTwoVariable Me.cmdSummaries = New System.Windows.Forms.Button() Me.ucrReorderSummary = New instat.ucrReorder() Me.ucrChkOmitMissing = New instat.ucrCheck() - Me.ucrReceiverColumnFactor = New instat.ucrReceiverSingle() - Me.ucrPnlColumnFactor = New instat.UcrPanel() Me.ucrSaveTable = New instat.ucrSave() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverThreeVariableThirdVariable = New instat.ucrReceiverSingle() @@ -110,7 +110,7 @@ Partial Class dlgDescribeTwoVariable 'lblThreeVariableSecondFactor ' Me.lblThreeVariableSecondFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblThreeVariableSecondFactor.Location = New System.Drawing.Point(303, 150) + Me.lblThreeVariableSecondFactor.Location = New System.Drawing.Point(306, 150) Me.lblThreeVariableSecondFactor.Name = "lblThreeVariableSecondFactor" Me.lblThreeVariableSecondFactor.Size = New System.Drawing.Size(100, 15) Me.lblThreeVariableSecondFactor.TabIndex = 35 @@ -163,6 +163,19 @@ Partial Class dlgDescribeTwoVariable Me.grpColumnFactor.TabStop = False Me.grpColumnFactor.Text = "Columns" ' + 'ucrReceiverColumnFactor + ' + Me.ucrReceiverColumnFactor.AutoSize = True + Me.ucrReceiverColumnFactor.frmParent = Me + Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(131, 59) + 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 = 52 + Me.ucrReceiverColumnFactor.ucrSelector = Nothing + ' 'rdoVariableFactor ' Me.rdoVariableFactor.AutoSize = True @@ -207,6 +220,14 @@ Partial Class dlgDescribeTwoVariable 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(6, 15) + Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" + Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(119, 88) + Me.ucrPnlColumnFactor.TabIndex = 48 + ' 'grpSummaries ' Me.grpSummaries.Controls.Add(Me.lblFirstType) @@ -292,7 +313,7 @@ Partial Class dlgDescribeTwoVariable 'lblFirstGroupByFactor ' Me.lblFirstGroupByFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstGroupByFactor.Location = New System.Drawing.Point(302, 149) + Me.lblFirstGroupByFactor.Location = New System.Drawing.Point(306, 149) Me.lblFirstGroupByFactor.Name = "lblFirstGroupByFactor" Me.lblFirstGroupByFactor.Size = New System.Drawing.Size(100, 15) Me.lblFirstGroupByFactor.TabIndex = 29 @@ -380,27 +401,6 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) Me.ucrChkOmitMissing.TabIndex = 0 ' - 'ucrReceiverColumnFactor - ' - Me.ucrReceiverColumnFactor.AutoSize = True - Me.ucrReceiverColumnFactor.frmParent = Nothing - Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(131, 59) - 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 = 52 - Me.ucrReceiverColumnFactor.ucrSelector = Nothing - ' - 'ucrPnlColumnFactor - ' - Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(6, 15) - Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" - Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(119, 88) - Me.ucrPnlColumnFactor.TabIndex = 48 - ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink @@ -542,11 +542,11 @@ Partial Class dlgDescribeTwoVariable Me.Controls.Add(Me.rdoTwoVariable) Me.Controls.Add(Me.rdoSkim) Me.Controls.Add(Me.ucrPnlDescribe) - Me.Controls.Add(Me.lbSecondVariable) Me.Controls.Add(Me.ucrReceiverThreeVariableSecondFactor) Me.Controls.Add(Me.ucrReceiverSkimrGroupByFactor) Me.Controls.Add(Me.lblThirdVariable) Me.Controls.Add(Me.lblSecondGroupByFactor) + Me.Controls.Add(Me.lbSecondVariable) Me.Controls.Add(Me.lblFirstGroupByFactor) Me.Controls.Add(Me.lblThreeVariableSecondFactor) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 3535107f297..7f42828cd93 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -108,6 +108,7 @@ Public Class dlgDescribeTwoVariable ucrChkOmitMissing.SetText("Omit Missing Values") ucrChkOmitMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkOmitMissing.bUpdateRCodeFromControl = True + 'ucrChkOmitMissing.SetLinkedDisplayControl(cmdMissingOptions) ucrPnlDescribe.AddRadioButton(rdoTwoVariable) ucrPnlDescribe.AddRadioButton(rdoSkim) @@ -115,6 +116,7 @@ Public Class dlgDescribeTwoVariable ucrPnlDescribe.AddParameterValuesCondition(rdoTwoVariable, "checked", "customize") ucrPnlDescribe.AddParameterValuesCondition(rdoSkim, "checked", "skim") ucrPnlDescribe.AddParameterValuesCondition(rdoThreeVariable, "checked", "three_variable") + rdoThreeVariable.Enabled=False ucrPnlDescribe.AddToLinkedControls({ucrReceiverSkimrGroupByFactor, ucrReceiverSecondSkimrGroupByFactor}, {rdoSkim}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlDescribe.AddToLinkedControls({ucrReceiverThreeVariableThirdVariable}, {rdoThreeVariable}, bNewLinkedHideIfParameterMissing:=True) @@ -239,7 +241,7 @@ Public Class dlgDescribeTwoVariable clsGroupByFunction.SetRCommand("group_by") clsSkimrFunction.SetPackageName("skimr") - clsSkimrFunction.SetRCommand("skim") + clsSkimrFunction.SetRCommand("skim_without_charts") clsCombineFunction.SetRCommand("c") @@ -425,13 +427,14 @@ Public Class dlgDescribeTwoVariable grpColumnFactor.Visible = IsFactorByFactor() OrElse IsNumericByFactor() If rdoTwoVariable.Checked Then ucrChkOmitMissing.Visible = strFirstVariablesType = "numeric" - cmdMissingOptions.Visible = ucrChkOmitMissing.Checked AndAlso IsNumericByFactor() + 'cmdMissingOptions.Visible = ucrChkOmitMissing.Checked ElseIf rdoThreeVariable.Checked Then ucrChkOmitMissing.Visible = IsFactorByNumeric() OrElse IsNumericByFactor() Else ucrChkOmitMissing.Visible = False - cmdMissingOptions.Visible = False + 'cmdMissingOptions.Visible = False End If + cmdMissingOptions.Visible = ucrChkOmitMissing.Checked End Sub Private Sub ChangeBaseRCode() From 1c6cd00332485add0e85962803893fe15bdb6363 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Tue, 20 Jun 2023 13:15:29 +0300 Subject: [PATCH 14/21] Minor change --- instat/dlgDescribeTwoVariable.vb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 7f42828cd93..489084ea655 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -79,6 +79,7 @@ Public Class dlgDescribeTwoVariable ucrReceiverFirstVars.SetParameter(New RParameter("columns_to_summarise", 1)) ucrReceiverFirstVars.SetParameterIsString() ucrReceiverFirstVars.Selector = ucrSelectorDescribeTwoVar + ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) ucrReceiverSecondTwoVariableFactor.SetParameter(New RParameter("factors", 2)) ucrReceiverSecondTwoVariableFactor.SetParameterIsString() @@ -524,15 +525,17 @@ Public Class dlgDescribeTwoVariable Private Sub ucrPnlDescribe_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDescribe.ControlValueChanged ucrReceiverFirstVars.Clear() ucrReceiverFirstVars.SetMeAsReceiver() - ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) + If rdoSkim.Checked Then ucrReceiverFirstVars.SetSingleTypeStatus(False) ElseIf rdoThreeVariable.Checked Then + ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) lblThreeVariableCategorical.Visible = True lblThreeVariableCategorical.Location = New Point(106, 18) lblSecondType.Location = New Point(12, 33) lblSecondBy.Visible = True Else + ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) lblThreeVariableCategorical.Visible = False lblThreeVariableCategorical.Location = New Point(12, 33) lblSecondType.Location = New Point(106, 18) @@ -806,8 +809,8 @@ Public Class dlgDescribeTwoVariable End If End Sub - Private Sub ucrReceiverFirstVars_ControlValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstVars.ControlValueChanged, - ucrReceiverFirstVars.ControlContentsChanged + Private Sub ucrReceiverFirstVars_ControlValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstVars.ControlValueChanged + 'ucrReceiverFirstVars.ControlContentsChanged() ChangeFirstTypeLabel() ChangeSumaryLabelText() UpdateSummaryTableFunction() From 99bc779d17c1d035d9d907e8955f564306cd68de Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Sun, 30 Jul 2023 01:37:07 +0300 Subject: [PATCH 15/21] Minor changes --- instat/dlgDescribeTwoVariable.Designer.vb | 47 ++++++++- instat/dlgDescribeTwoVariable.vb | 118 ++++++++++++---------- 2 files changed, 106 insertions(+), 59 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index d6d159e86fe..8d0ed65b26d 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -77,6 +77,9 @@ Partial Class dlgDescribeTwoVariable Me.ucrPnlDescribe = New instat.UcrPanel() Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() Me.ucrReceiverSkimrGroupByFactor = New instat.ucrReceiverSingle() + Me.ucrChkDisplayMargins = New instat.ucrCheck() + Me.lblMarginName = New System.Windows.Forms.Label() + Me.ucrInputMarginName = New instat.ucrInputTextBox() Me.grpColumnFactor.SuspendLayout() Me.grpSummaries.SuspendLayout() Me.SuspendLayout() @@ -100,7 +103,7 @@ Partial Class dlgDescribeTwoVariable 'cmdFormatTable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFormatTable.Location = New System.Drawing.Point(317, 421) + Me.cmdFormatTable.Location = New System.Drawing.Point(317, 423) Me.cmdFormatTable.Name = "cmdFormatTable" Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23) Me.cmdFormatTable.TabIndex = 44 @@ -156,7 +159,7 @@ Partial Class dlgDescribeTwoVariable Me.grpColumnFactor.Controls.Add(Me.rdoVariable) Me.grpColumnFactor.Controls.Add(Me.rdoNoColumnFactor) Me.grpColumnFactor.Controls.Add(Me.ucrPnlColumnFactor) - Me.grpColumnFactor.Location = New System.Drawing.Point(5, 321) + Me.grpColumnFactor.Location = New System.Drawing.Point(5, 336) Me.grpColumnFactor.Name = "grpColumnFactor" Me.grpColumnFactor.Size = New System.Drawing.Size(255, 110) Me.grpColumnFactor.TabIndex = 51 @@ -385,9 +388,9 @@ Partial Class dlgDescribeTwoVariable ' 'ucrReorderSummary ' - Me.ucrReorderSummary.Location = New System.Drawing.Point(266, 252) + Me.ucrReorderSummary.Location = New System.Drawing.Point(266, 258) Me.ucrReorderSummary.Name = "ucrReorderSummary" - Me.ucrReorderSummary.Size = New System.Drawing.Size(194, 163) + Me.ucrReorderSummary.Size = New System.Drawing.Size(194, 156) Me.ucrReorderSummary.TabIndex = 52 Me.ucrReorderSummary.ucrDataFrameList = Nothing Me.ucrReorderSummary.ucrReceiver = Nothing @@ -517,12 +520,45 @@ Partial Class dlgDescribeTwoVariable Me.ucrReceiverSkimrGroupByFactor.TabIndex = 32 Me.ucrReceiverSkimrGroupByFactor.ucrSelector = Nothing ' + 'ucrChkDisplayMargins + ' + Me.ucrChkDisplayMargins.AutoSize = True + Me.ucrChkDisplayMargins.Checked = False + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(7, 296) + Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" + Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(143, 23) + Me.ucrChkDisplayMargins.TabIndex = 53 + ' + 'lblMarginName + ' + Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMarginName.Location = New System.Drawing.Point(14, 318) + Me.lblMarginName.Name = "lblMarginName" + Me.lblMarginName.Size = New System.Drawing.Size(62, 15) + Me.lblMarginName.TabIndex = 54 + Me.lblMarginName.Tag = "" + Me.lblMarginName.Text = "Name:" + ' + 'ucrInputMarginName + ' + Me.ucrInputMarginName.AddQuotesIfUnrecognised = True + Me.ucrInputMarginName.AutoSize = True + Me.ucrInputMarginName.IsMultiline = False + Me.ucrInputMarginName.IsReadOnly = False + Me.ucrInputMarginName.Location = New System.Drawing.Point(88, 316) + Me.ucrInputMarginName.Name = "ucrInputMarginName" + Me.ucrInputMarginName.Size = New System.Drawing.Size(158, 21) + Me.ucrInputMarginName.TabIndex = 55 + ' 'dlgDescribeTwoVariable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ClientSize = New System.Drawing.Size(482, 548) + Me.Controls.Add(Me.ucrInputMarginName) + Me.Controls.Add(Me.lblMarginName) + Me.Controls.Add(Me.ucrChkDisplayMargins) Me.Controls.Add(Me.cmdSummaries) Me.Controls.Add(Me.ucrReorderSummary) Me.Controls.Add(Me.ucrChkOmitMissing) @@ -603,4 +639,7 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents cmdSummaries As Button Friend WithEvents rdoVariableFactor As RadioButton Friend WithEvents ucrReceiverColumnFactor As ucrReceiverSingle + Friend WithEvents ucrInputMarginName As ucrInputTextBox + Friend WithEvents lblMarginName As Label + Friend WithEvents ucrChkDisplayMargins As ucrCheck End Class diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 489084ea655..321f61cd3bd 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -111,13 +111,19 @@ Public Class dlgDescribeTwoVariable ucrChkOmitMissing.bUpdateRCodeFromControl = True 'ucrChkOmitMissing.SetLinkedDisplayControl(cmdMissingOptions) + ucrChkDisplayMargins.SetParameter(New RParameter("include_margins", 5)) + ucrChkDisplayMargins.SetText("Display Margins") + ucrChkDisplayMargins.SetRDefault("FALSE") + + ucrInputMarginName.SetLinkedDisplayControl(lblMarginName) + ucrPnlDescribe.AddRadioButton(rdoTwoVariable) ucrPnlDescribe.AddRadioButton(rdoSkim) ucrPnlDescribe.AddRadioButton(rdoThreeVariable) ucrPnlDescribe.AddParameterValuesCondition(rdoTwoVariable, "checked", "customize") ucrPnlDescribe.AddParameterValuesCondition(rdoSkim, "checked", "skim") ucrPnlDescribe.AddParameterValuesCondition(rdoThreeVariable, "checked", "three_variable") - rdoThreeVariable.Enabled=False + rdoThreeVariable.Enabled = False ucrPnlDescribe.AddToLinkedControls({ucrReceiverSkimrGroupByFactor, ucrReceiverSecondSkimrGroupByFactor}, {rdoSkim}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlDescribe.AddToLinkedControls({ucrReceiverThreeVariableThirdVariable}, {rdoThreeVariable}, bNewLinkedHideIfParameterMissing:=True) @@ -191,6 +197,8 @@ Public Class dlgDescribeTwoVariable ucrSelectorDescribeTwoVar.Reset() ucrReceiverFirstVars.SetMeAsReceiver() + ucrInputMarginName.SetText("All") + ucrInputMarginName.Visible = False ucrBase.clsRsyntax.ClearCodes() @@ -359,6 +367,7 @@ Public Class dlgDescribeTwoVariable ucrReceiverThreeVariableSecondFactor.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrReceiverThreeVariableThirdVariable.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrPnlColumnFactor.SetRCode(clsDummyFunction, bReset) + ucrChkDisplayMargins.SetRCode(clsCombineFrequencyParametersFunction, bReset) ucrSaveTable.SetRCode(clsJoiningPipeOperator) bRcodeSet = True @@ -423,12 +432,12 @@ Public Class dlgDescribeTwoVariable Private Sub ManageControlsVisibility() grpSummaries.Visible = rdoThreeVariable.Checked OrElse rdoTwoVariable.Checked - ucrReorderSummary.Visible = IsFactorByFactor() OrElse IsNumericByFactor() + ucrReorderSummary.Visible = IsNumericByFactor() cmdSummaries.Visible = IsFactorByFactor() OrElse IsNumericByFactor() grpColumnFactor.Visible = IsFactorByFactor() OrElse IsNumericByFactor() + ucrChkDisplayMargins.Visible = rdoTwoVariable.Checked AndAlso IsFactorByFactor() If rdoTwoVariable.Checked Then ucrChkOmitMissing.Visible = strFirstVariablesType = "numeric" - 'cmdMissingOptions.Visible = ucrChkOmitMissing.Checked ElseIf rdoThreeVariable.Checked Then ucrChkOmitMissing.Visible = IsFactorByNumeric() OrElse IsNumericByFactor() Else @@ -451,17 +460,17 @@ Public Class dlgDescribeTwoVariable If IsNumericByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRCorrelationFunction) ucrSaveTable.Visible = False - ElseIf IsfactorByNumeric() Then + ElseIf IsFactorByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRAnovaFunction) ucrSaveTable.Visible = False - ElseIf IsNumericByfactor() Then + ElseIf IsNumericByFactor() Then ucrSaveTable.Visible = True clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=1) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") - ElseIf IsfactorByfactor() Then + ElseIf IsFactorByFactor() Then ucrSaveTable.Visible = True clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=1) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) @@ -583,17 +592,17 @@ Public Class dlgDescribeTwoVariable End If End Sub - 'Private Sub EnableDisableFrequencyControls() - ' grpThreeVariablePercentages.Visible = rdoThreeVariable.Checked _ - ' AndAlso IsFactorByFactor() - ' ' grpTwoVariablePercentages.Visible = rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ - ' 'OrElse IsNumericByCategorical()) - ' ' grpFrequency.Visible = (rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ - ' 'OrElse IsNumericByCategorical())) OrElse (rdoThreeVariable.Checked _ - ' 'AndAlso (IsNumericByCategorical() OrElse IsCategoricalByNumeric() _ - ' ' OrElse IsCategoricalByCategorical())) - ' ' ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked - 'End Sub + Private Sub EnableDisableFrequencyControls() + ' grpThreeVariablePercentages.Visible = rdoThreeVariable.Checked _ + ' AndAlso IsFactorByFactor() + ' grpTwoVariablePercentages.Visible = rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ + 'OrElse IsNumericByCategorical()) + ' grpFrequency.Visible = (rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ + 'OrElse IsNumericByCategorical())) OrElse (rdoThreeVariable.Checked _ + 'AndAlso (IsNumericByCategorical() OrElse IsCategoricalByNumeric() _ + ' OrElse IsCategoricalByCategorical())) + ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked + End Sub Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnFactor.ControlValueChanged, ucrReceiverColumnFactor.ControlValueChanged FactorColumns() @@ -648,32 +657,32 @@ Public Class dlgDescribeTwoVariable Next End Sub - 'Private Sub Frequencies_ControlValueChanged(ucrChangedControl As ucrCore) Handles - ' ucrChkDisplayAsPercentage.ControlValueChanged, ucrChkDisplayMargins.ControlValueChanged, ucrChkThreeVariablePercentageProportion.ControlValueChanged, ucrChkThreeVariableDisplayAsPercentage.ControlValueChanged - ' If rdoTwoVariable.Checked Then - ' If ucrChkDisplayAsPercentage.Checked Then - ' ucrReceiverPercentages.SetMeAsReceiver() - ' Else - ' ucrReceiverFirstVars.SetMeAsReceiver() - ' End If - ' ElseIf rdoThreeVariable.Checked Then - ' If ucrChkThreeVariableDisplayAsPercentage.Checked Then - ' ucrReceiverThreeVariablePercentage.SetMeAsReceiver() - ' Else - ' ucrReceiverFirstVars.SetMeAsReceiver() - ' End If - ' End If - ' If ucrChkDisplayMargins.Checked Then - ' ucrInputMarginName.Visible = True - ' clsCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) - ' clsThreeVariableCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) - ' Else - ' ucrInputMarginName.Visible = False - ' clsCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") - ' clsThreeVariableCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") - ' End If - ' AddRemoveFrequencyParameters() - 'End Sub + Private Sub Frequencies_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayMargins.ControlValueChanged + ' ucrChkDisplayAsPercentage.ControlValueChanged, ucrChkThreeVariablePercentageProportion.ControlValueChanged, ucrChkThreeVariableDisplayAsPercentage.ControlValueChanged + ' If rdoTwoVariable.Checked Then + ' If ucrChkDisplayAsPercentage.Checked Then + ' ucrReceiverPercentages.SetMeAsReceiver() + ' Else + ' ucrReceiverFirstVars.SetMeAsReceiver() + ' End If + ' ElseIf rdoThreeVariable.Checked Then + ' If ucrChkThreeVariableDisplayAsPercentage.Checked Then + ' ucrReceiverThreeVariablePercentage.SetMeAsReceiver() + ' Else + ' ucrReceiverFirstVars.SetMeAsReceiver() + ' End If + ' End If + If ucrChkDisplayMargins.Checked Then + ucrInputMarginName.Visible = True + clsCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) + 'clsThreeVariableCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) + Else + ucrInputMarginName.Visible = False + clsCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") + 'clsThreeVariableCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") + End If + AddRemoveFrequencyParameters() + End Sub Private Sub ucrSelectorDescribeTwoVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDescribeTwoVar.ControlValueChanged clsGroupByPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) @@ -700,20 +709,18 @@ Public Class dlgDescribeTwoVariable End If End Sub - Private Sub ucrReceiverNumericVariable_ControlValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverThreeVariableThirdVariable.ControlValueChanged, - ucrReceiverThreeVariableThirdVariable.ControlContentsChanged + Private Sub ucrReceiverNumericVariable_ControlValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverThreeVariableThirdVariable.ControlValueChanged AssignSecondVariableType() ManageControlsVisibility() UpdateCombineFactorParameterFunction() ChangeBaseRCode() ChangeLocations() - 'EnableDisableFrequencyControls() + EnableDisableFrequencyControls() UpdateSummaryTableFunction() AddRemoveFrequencyParameters() - ' EnableDisableFrequencyControls() AddRemoveNAParameter() HideFormatTableButton() - TestOKEnabled() + ' TestOKEnabled() End Sub Private Sub ChangeSumaryLabelText() @@ -779,7 +786,7 @@ Public Class dlgDescribeTwoVariable 'EnableDisableFrequencyControls() AddRemoveNAParameter() HideFormatTableButton() - TestOKEnabled() + 'TestOKEnabled() End Sub Private Sub ChangeFirstTypeLabel() @@ -818,21 +825,22 @@ Public Class dlgDescribeTwoVariable ChangeBaseRCode() ManageControlsVisibility() ChangeLocations() - 'EnableDisableFrequencyControls() + EnableDisableFrequencyControls() AddRemoveFrequencyParameters() AddRemoveNAParameter() HideFormatTableButton() - TestOKEnabled() + 'TestOKEnabled() End Sub Private Sub ucrReceiverThreeVariableSecondFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverThreeVariableSecondFactor.ControlValueChanged UpdateCombineFactorParameterFunction() End Sub - 'Private Sub controls_contentChanged(ucrChangedControl As ucrCore) Handles - ' ucrChkThreeVariableDisplayAsPercentage.ControlContentsChanged, ucrReceiverThreeVariableSecondFactor.ControlContentsChanged - ' TestOKEnabled() - 'End Sub + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstVars.ControlContentsChanged, + ucrReceiverSecondTwoVariableFactor.ControlContentsChanged, ucrPnlDescribe.ControlContentsChanged, + ucrReceiverThreeVariableThirdVariable.ControlContentsChanged + TestOKEnabled() + End Sub Private Sub ucrReceiverSecondTwoVariableFactor_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverSecondTwoVariableFactor.SelectionChanged MatchingCategoricalByCategoricalVariables(ucrReceiverSecondTwoVariableFactor) From b7b2fc71754f1b1bffb3ef64b51426d3a931205c Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Fri, 4 Aug 2023 00:20:45 +0300 Subject: [PATCH 16/21] More additions --- instat/dlgDescribeTwoVariable.Designer.vb | 82 +++++++++++++++++++++-- instat/dlgDescribeTwoVariable.vb | 63 ++++++++++++----- 2 files changed, 120 insertions(+), 25 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index 8d0ed65b26d..a85c91bc5b1 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -80,8 +80,14 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkDisplayMargins = New instat.ucrCheck() Me.lblMarginName = New System.Windows.Forms.Label() Me.ucrInputMarginName = New instat.ucrInputTextBox() + Me.grpDisplay = New System.Windows.Forms.GroupBox() + Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() + Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() + Me.lblFactorAsPercentage = New System.Windows.Forms.Label() + Me.ucrChkPercentageProportion = New instat.ucrCheck() Me.grpColumnFactor.SuspendLayout() Me.grpSummaries.SuspendLayout() + Me.grpDisplay.SuspendLayout() Me.SuspendLayout() ' 'rdoThreeVariable @@ -524,7 +530,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrChkDisplayMargins.AutoSize = True Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(7, 296) + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(12, 106) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(143, 23) Me.ucrChkDisplayMargins.TabIndex = 53 @@ -532,7 +538,7 @@ Partial Class dlgDescribeTwoVariable 'lblMarginName ' Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(14, 318) + Me.lblMarginName.Location = New System.Drawing.Point(9, 132) Me.lblMarginName.Name = "lblMarginName" Me.lblMarginName.Size = New System.Drawing.Size(62, 15) Me.lblMarginName.TabIndex = 54 @@ -545,20 +551,75 @@ Partial Class dlgDescribeTwoVariable Me.ucrInputMarginName.AutoSize = True Me.ucrInputMarginName.IsMultiline = False Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(88, 316) + Me.ucrInputMarginName.Location = New System.Drawing.Point(77, 129) Me.ucrInputMarginName.Name = "ucrInputMarginName" - Me.ucrInputMarginName.Size = New System.Drawing.Size(158, 21) + Me.ucrInputMarginName.Size = New System.Drawing.Size(113, 21) Me.ucrInputMarginName.TabIndex = 55 ' + 'grpDisplay + ' + Me.grpDisplay.Controls.Add(Me.ucrChkPercentageProportion) + Me.grpDisplay.Controls.Add(Me.ucrInputMarginName) + Me.grpDisplay.Controls.Add(Me.lblFactorAsPercentage) + Me.grpDisplay.Controls.Add(Me.lblMarginName) + Me.grpDisplay.Controls.Add(Me.ucrReceiverPercentages) + Me.grpDisplay.Controls.Add(Me.ucrChkDisplayMargins) + Me.grpDisplay.Controls.Add(Me.ucrChkDisplayAsPercentage) + Me.grpDisplay.Location = New System.Drawing.Point(266, 258) + Me.grpDisplay.Name = "grpDisplay" + Me.grpDisplay.Size = New System.Drawing.Size(194, 159) + Me.grpDisplay.TabIndex = 56 + Me.grpDisplay.TabStop = False + Me.grpDisplay.Text = "Display" + ' + 'ucrChkDisplayAsPercentage + ' + Me.ucrChkDisplayAsPercentage.AutoSize = True + Me.ucrChkDisplayAsPercentage.Checked = False + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(12, 17) + Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(143, 23) + Me.ucrChkDisplayAsPercentage.TabIndex = 54 + ' + 'ucrReceiverPercentages + ' + Me.ucrReceiverPercentages.AutoSize = True + Me.ucrReceiverPercentages.frmParent = Me + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(12, 57) + Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" + Me.ucrReceiverPercentages.Selector = Nothing + Me.ucrReceiverPercentages.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverPercentages.strNcFilePath = "" + Me.ucrReceiverPercentages.TabIndex = 55 + Me.ucrReceiverPercentages.ucrSelector = Nothing + ' + 'lblFactorAsPercentage + ' + Me.lblFactorAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFactorAsPercentage.Location = New System.Drawing.Point(9, 42) + Me.lblFactorAsPercentage.Name = "lblFactorAsPercentage" + Me.lblFactorAsPercentage.Size = New System.Drawing.Size(154, 15) + Me.lblFactorAsPercentage.TabIndex = 56 + Me.lblFactorAsPercentage.Tag = "" + Me.lblFactorAsPercentage.Text = "Factor as Percentage:" + ' + 'ucrChkPercentageProportion + ' + Me.ucrChkPercentageProportion.AutoSize = True + Me.ucrChkPercentageProportion.Checked = False + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(12, 84) + Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(143, 23) + Me.ucrChkPercentageProportion.TabIndex = 57 + ' 'dlgDescribeTwoVariable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ClientSize = New System.Drawing.Size(482, 548) - Me.Controls.Add(Me.ucrInputMarginName) - Me.Controls.Add(Me.lblMarginName) - Me.Controls.Add(Me.ucrChkDisplayMargins) + Me.Controls.Add(Me.grpDisplay) Me.Controls.Add(Me.cmdSummaries) Me.Controls.Add(Me.ucrReorderSummary) Me.Controls.Add(Me.ucrChkOmitMissing) @@ -596,6 +657,8 @@ Partial Class dlgDescribeTwoVariable Me.grpColumnFactor.PerformLayout() Me.grpSummaries.ResumeLayout(False) Me.grpSummaries.PerformLayout() + Me.grpDisplay.ResumeLayout(False) + Me.grpDisplay.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -642,4 +705,9 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents ucrInputMarginName As ucrInputTextBox Friend WithEvents lblMarginName As Label Friend WithEvents ucrChkDisplayMargins As ucrCheck + Friend WithEvents grpDisplay As GroupBox + Friend WithEvents ucrChkPercentageProportion As ucrCheck + Friend WithEvents lblFactorAsPercentage As Label + Friend WithEvents ucrReceiverPercentages As ucrReceiverSingle + Friend WithEvents ucrChkDisplayAsPercentage As ucrCheck End Class diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 321f61cd3bd..8696fb49ee3 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -22,7 +22,7 @@ Public Class dlgDescribeTwoVariable Private bResetSubdialog As Boolean = False Public strFirstVariablesType, strSecondVariableType As String - 'MAPPING AND SUMMARY FUNCTIoNS + 'SUMMARY FUNCTIoNS Private clsCombineFrequencyParametersFunction, clsCombineFunction, clsDummyFunction, clsGroupByFunction, clsRAnovaFunction, clsRCorrelationFunction, clsSkimrFunction, clsSummariesListFunction, @@ -117,6 +117,24 @@ Public Class dlgDescribeTwoVariable ucrInputMarginName.SetLinkedDisplayControl(lblMarginName) + ucrChkDisplayAsPercentage.SetParameter(New RParameter("percentage_type", 1)) + ucrChkDisplayAsPercentage.SetText("As Percentages") + ucrChkDisplayAsPercentage.SetValuesCheckedAndUnchecked(Chr(34) & "factors" & Chr(34), Chr(34) & "none" & Chr(34)) + ucrChkDisplayAsPercentage.SetRDefault(Chr(34) & "none" & Chr(34)) + + ucrChkDisplayAsPercentage.AddToLinkedControls(ucrReceiverPercentages, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkDisplayAsPercentage.AddToLinkedControls(ucrChkPercentageProportion, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + ucrReceiverPercentages.SetParameter(New RParameter("perc_total_factors", 2)) + ucrReceiverPercentages.SetParameterIsString() + ucrReceiverPercentages.Selector = ucrSelectorDescribeTwoVar + ucrReceiverPercentages.SetDataType("factor") + ucrReceiverPercentages.SetLinkedDisplayControl(lblFactorAsPercentage) + + ucrChkPercentageProportion.SetParameter(New RParameter("perc_decimal", 3)) + ucrChkPercentageProportion.SetText("Display as Decimal") + ucrChkPercentageProportion.SetRDefault("FALSE") + ucrPnlDescribe.AddRadioButton(rdoTwoVariable) ucrPnlDescribe.AddRadioButton(rdoSkim) ucrPnlDescribe.AddRadioButton(rdoThreeVariable) @@ -363,6 +381,9 @@ Public Class dlgDescribeTwoVariable ucrSelectorDescribeTwoVar.SetRCode(clsRCorrelationFunction, bReset) ucrReceiverSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset) ucrReceiverSecondSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset) + ucrChkDisplayAsPercentage.SetRCode(clsCombineFrequencyParametersFunction, bReset) + ucrReceiverPercentages.SetRCode(clsCombineFrequencyParametersFunction, bReset) + ucrChkPercentageProportion.SetRCode(clsCombineFrequencyParametersFunction, bReset) ucrPnlDescribe.SetRCode(clsDummyFunction, bReset) ucrReceiverThreeVariableSecondFactor.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrReceiverThreeVariableThirdVariable.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) @@ -436,6 +457,9 @@ Public Class dlgDescribeTwoVariable cmdSummaries.Visible = IsFactorByFactor() OrElse IsNumericByFactor() grpColumnFactor.Visible = IsFactorByFactor() OrElse IsNumericByFactor() ucrChkDisplayMargins.Visible = rdoTwoVariable.Checked AndAlso IsFactorByFactor() + ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked + grpDisplay.Visible = rdoTwoVariable.Checked AndAlso IsFactorByFactor() + If rdoTwoVariable.Checked Then ucrChkOmitMissing.Visible = strFirstVariablesType = "numeric" ElseIf rdoThreeVariable.Checked Then @@ -508,7 +532,7 @@ Public Class dlgDescribeTwoVariable End If End If 'EnableDisableFrequencyControls() - AddRemoveFrequencyParameters() + ' AddRemoveFrequencyParameters() ChangeLocations() TestOKEnabled() End Sub @@ -559,7 +583,7 @@ Public Class dlgDescribeTwoVariable UpdateSummaryTableFunction() UpdateCombineFactorParameterFunction() ChangeLocations() - ' EnableDisableFrequencyControls() + EnableDisableFrequencyControls() AddRemoveNAParameter() HideFormatTableButton() End Sub @@ -595,13 +619,13 @@ Public Class dlgDescribeTwoVariable Private Sub EnableDisableFrequencyControls() ' grpThreeVariablePercentages.Visible = rdoThreeVariable.Checked _ ' AndAlso IsFactorByFactor() - ' grpTwoVariablePercentages.Visible = rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ + 'grpDisplay.Visible = rdoTwoVariable.Checked AndAlso IsFactorByFactor() 'OrElse IsNumericByCategorical()) ' grpFrequency.Visible = (rdoTwoVariable.Checked AndAlso (IsCategoricalByCategorical() _ 'OrElse IsNumericByCategorical())) OrElse (rdoThreeVariable.Checked _ 'AndAlso (IsNumericByCategorical() OrElse IsCategoricalByNumeric() _ ' OrElse IsCategoricalByCategorical())) - ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked + 'ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked End Sub Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnFactor.ControlValueChanged, ucrReceiverColumnFactor.ControlValueChanged @@ -657,20 +681,22 @@ Public Class dlgDescribeTwoVariable Next End Sub - Private Sub Frequencies_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayMargins.ControlValueChanged + Private Sub Frequencies_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkPercentageProportion.ControlValueChanged, + ucrChkDisplayAsPercentage.ControlValueChanged, ucrChkDisplayMargins.ControlValueChanged, + ucrReceiverPercentages.ControlValueChanged, ucrInputMarginName.ControlValueChanged ' ucrChkDisplayAsPercentage.ControlValueChanged, ucrChkThreeVariablePercentageProportion.ControlValueChanged, ucrChkThreeVariableDisplayAsPercentage.ControlValueChanged - ' If rdoTwoVariable.Checked Then - ' If ucrChkDisplayAsPercentage.Checked Then - ' ucrReceiverPercentages.SetMeAsReceiver() - ' Else - ' ucrReceiverFirstVars.SetMeAsReceiver() - ' End If - ' ElseIf rdoThreeVariable.Checked Then - ' If ucrChkThreeVariableDisplayAsPercentage.Checked Then - ' ucrReceiverThreeVariablePercentage.SetMeAsReceiver() - ' Else - ' ucrReceiverFirstVars.SetMeAsReceiver() - ' End If + If rdoTwoVariable.Checked Then + If ucrChkDisplayAsPercentage.Checked Then + ucrReceiverPercentages.SetMeAsReceiver() + Else + ucrReceiverFirstVars.SetMeAsReceiver() + End If + ' ElseIf rdoThreeVariable.Checked Then + ' If ucrChkThreeVariableDisplayAsPercentage.Checked Then + ' ucrReceiverThreeVariablePercentage.SetMeAsReceiver() + Else + ucrReceiverFirstVars.SetMeAsReceiver() + End If ' End If If ucrChkDisplayMargins.Checked Then ucrInputMarginName.Visible = True @@ -681,6 +707,7 @@ Public Class dlgDescribeTwoVariable clsCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") 'clsThreeVariableCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") End If + AddRemoveFrequencyParameters() End Sub From 4b652d6eaf3c59640cee30e5833b45ce77e573d4 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Sun, 6 Aug 2023 00:28:12 +0300 Subject: [PATCH 17/21] Minor changes --- instat/dlgDescribeTwoVariable.Designer.vb | 278 ++++++++++------------ instat/dlgDescribeTwoVariable.vb | 108 +++++---- 2 files changed, 193 insertions(+), 193 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index a85c91bc5b1..53bd7c7cee4 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -47,8 +47,7 @@ Partial Class dlgDescribeTwoVariable Me.grpColumnFactor = New System.Windows.Forms.GroupBox() Me.ucrReceiverColumnFactor = New instat.ucrReceiverSingle() Me.rdoVariableFactor = New System.Windows.Forms.RadioButton() - Me.rdoSummary = New System.Windows.Forms.RadioButton() - Me.rdoVariable = New System.Windows.Forms.RadioButton() + Me.rdoSummaryVariable = New System.Windows.Forms.RadioButton() Me.rdoNoColumnFactor = New System.Windows.Forms.RadioButton() Me.ucrPnlColumnFactor = New instat.UcrPanel() Me.grpSummaries = New System.Windows.Forms.GroupBox() @@ -65,9 +64,15 @@ Partial Class dlgDescribeTwoVariable Me.lblSecondGroupByFactor = New System.Windows.Forms.Label() Me.rdoTwoVariable = New System.Windows.Forms.RadioButton() Me.cmdSummaries = New System.Windows.Forms.Button() + Me.lblMarginName = New System.Windows.Forms.Label() + Me.grpDisplay = New System.Windows.Forms.GroupBox() + Me.ucrChkPercentageProportion = New instat.ucrCheck() + Me.lblFactorAsPercentage = New System.Windows.Forms.Label() + Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() + Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() + Me.ucrInputMarginName = New instat.ucrInputTextBox() Me.ucrReorderSummary = New instat.ucrReorder() - Me.ucrChkOmitMissing = New instat.ucrCheck() - Me.ucrSaveTable = New instat.ucrSave() + Me.ucrChkDisplayMargins = New instat.ucrCheck() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverThreeVariableThirdVariable = New instat.ucrReceiverSingle() Me.ucrReceiverSecondSkimrGroupByFactor = New instat.ucrReceiverSingle() @@ -77,14 +82,8 @@ Partial Class dlgDescribeTwoVariable Me.ucrPnlDescribe = New instat.UcrPanel() Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() Me.ucrReceiverSkimrGroupByFactor = New instat.ucrReceiverSingle() - Me.ucrChkDisplayMargins = New instat.ucrCheck() - Me.lblMarginName = New System.Windows.Forms.Label() - Me.ucrInputMarginName = New instat.ucrInputTextBox() - Me.grpDisplay = New System.Windows.Forms.GroupBox() - Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() - Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() - Me.lblFactorAsPercentage = New System.Windows.Forms.Label() - Me.ucrChkPercentageProportion = New instat.ucrCheck() + Me.ucrChkOmitMissing = New instat.ucrCheck() + Me.ucrSaveTable = New instat.ucrSave() Me.grpColumnFactor.SuspendLayout() Me.grpSummaries.SuspendLayout() Me.grpDisplay.SuspendLayout() @@ -161,13 +160,12 @@ Partial Class dlgDescribeTwoVariable ' Me.grpColumnFactor.Controls.Add(Me.ucrReceiverColumnFactor) Me.grpColumnFactor.Controls.Add(Me.rdoVariableFactor) - Me.grpColumnFactor.Controls.Add(Me.rdoSummary) - Me.grpColumnFactor.Controls.Add(Me.rdoVariable) + Me.grpColumnFactor.Controls.Add(Me.rdoSummaryVariable) Me.grpColumnFactor.Controls.Add(Me.rdoNoColumnFactor) Me.grpColumnFactor.Controls.Add(Me.ucrPnlColumnFactor) Me.grpColumnFactor.Location = New System.Drawing.Point(5, 336) Me.grpColumnFactor.Name = "grpColumnFactor" - Me.grpColumnFactor.Size = New System.Drawing.Size(255, 110) + Me.grpColumnFactor.Size = New System.Drawing.Size(255, 97) Me.grpColumnFactor.TabIndex = 51 Me.grpColumnFactor.TabStop = False Me.grpColumnFactor.Text = "Columns" @@ -176,11 +174,11 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverColumnFactor.AutoSize = True Me.ucrReceiverColumnFactor.frmParent = Me - Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(131, 59) + Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(132, 43) 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.Size = New System.Drawing.Size(119, 20) Me.ucrReceiverColumnFactor.strNcFilePath = "" Me.ucrReceiverColumnFactor.TabIndex = 52 Me.ucrReceiverColumnFactor.ucrSelector = Nothing @@ -188,7 +186,7 @@ Partial Class dlgDescribeTwoVariable 'rdoVariableFactor ' Me.rdoVariableFactor.AutoSize = True - Me.rdoVariableFactor.Location = New System.Drawing.Point(15, 61) + Me.rdoVariableFactor.Location = New System.Drawing.Point(15, 45) Me.rdoVariableFactor.Name = "rdoVariableFactor" Me.rdoVariableFactor.Size = New System.Drawing.Size(96, 17) Me.rdoVariableFactor.TabIndex = 51 @@ -196,32 +194,21 @@ Partial Class dlgDescribeTwoVariable Me.rdoVariableFactor.Text = "Variable Factor" Me.rdoVariableFactor.UseVisualStyleBackColor = True ' - 'rdoSummary - ' - Me.rdoSummary.AutoSize = True - Me.rdoSummary.Location = New System.Drawing.Point(15, 40) - Me.rdoSummary.Name = "rdoSummary" - Me.rdoSummary.Size = New System.Drawing.Size(68, 17) - Me.rdoSummary.TabIndex = 47 - Me.rdoSummary.TabStop = True - Me.rdoSummary.Text = "Summary" - Me.rdoSummary.UseVisualStyleBackColor = True - ' - 'rdoVariable + 'rdoSummaryVariable ' - Me.rdoVariable.AutoSize = True - Me.rdoVariable.Location = New System.Drawing.Point(15, 19) - Me.rdoVariable.Name = "rdoVariable" - Me.rdoVariable.Size = New System.Drawing.Size(63, 17) - Me.rdoVariable.TabIndex = 49 - Me.rdoVariable.TabStop = True - Me.rdoVariable.Text = "Variable" - Me.rdoVariable.UseVisualStyleBackColor = True + Me.rdoSummaryVariable.AutoSize = True + Me.rdoSummaryVariable.Location = New System.Drawing.Point(15, 23) + Me.rdoSummaryVariable.Name = "rdoSummaryVariable" + Me.rdoSummaryVariable.Size = New System.Drawing.Size(109, 17) + Me.rdoSummaryVariable.TabIndex = 47 + Me.rdoSummaryVariable.TabStop = True + Me.rdoSummaryVariable.Text = "Summary Variable" + Me.rdoSummaryVariable.UseVisualStyleBackColor = True ' 'rdoNoColumnFactor ' Me.rdoNoColumnFactor.AutoSize = True - Me.rdoNoColumnFactor.Location = New System.Drawing.Point(15, 82) + Me.rdoNoColumnFactor.Location = New System.Drawing.Point(15, 66) Me.rdoNoColumnFactor.Name = "rdoNoColumnFactor" Me.rdoNoColumnFactor.Size = New System.Drawing.Size(110, 17) Me.rdoNoColumnFactor.TabIndex = 50 @@ -232,9 +219,9 @@ Partial Class dlgDescribeTwoVariable 'ucrPnlColumnFactor ' Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(6, 15) + Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(6, 18) Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" - Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(119, 88) + Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(123, 72) Me.ucrPnlColumnFactor.TabIndex = 48 ' 'grpSummaries @@ -392,6 +379,81 @@ Partial Class dlgDescribeTwoVariable Me.cmdSummaries.Text = "Choose Summaries..." Me.cmdSummaries.UseVisualStyleBackColor = True ' + 'lblMarginName + ' + Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMarginName.Location = New System.Drawing.Point(6, 320) + Me.lblMarginName.Name = "lblMarginName" + Me.lblMarginName.Size = New System.Drawing.Size(93, 15) + Me.lblMarginName.TabIndex = 54 + Me.lblMarginName.Tag = "" + Me.lblMarginName.Text = "Margin Name:" + ' + 'grpDisplay + ' + Me.grpDisplay.Controls.Add(Me.ucrChkPercentageProportion) + Me.grpDisplay.Controls.Add(Me.lblFactorAsPercentage) + Me.grpDisplay.Controls.Add(Me.ucrReceiverPercentages) + Me.grpDisplay.Controls.Add(Me.ucrChkDisplayAsPercentage) + Me.grpDisplay.Location = New System.Drawing.Point(266, 205) + Me.grpDisplay.Name = "grpDisplay" + Me.grpDisplay.Size = New System.Drawing.Size(194, 115) + Me.grpDisplay.TabIndex = 56 + Me.grpDisplay.TabStop = False + Me.grpDisplay.Text = "Percentages" + ' + 'ucrChkPercentageProportion + ' + Me.ucrChkPercentageProportion.AutoSize = True + Me.ucrChkPercentageProportion.Checked = False + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(12, 84) + Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(143, 23) + Me.ucrChkPercentageProportion.TabIndex = 57 + ' + 'lblFactorAsPercentage + ' + Me.lblFactorAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFactorAsPercentage.Location = New System.Drawing.Point(9, 42) + Me.lblFactorAsPercentage.Name = "lblFactorAsPercentage" + Me.lblFactorAsPercentage.Size = New System.Drawing.Size(154, 15) + Me.lblFactorAsPercentage.TabIndex = 56 + Me.lblFactorAsPercentage.Tag = "" + Me.lblFactorAsPercentage.Text = "Factor as Percentage:" + ' + 'ucrReceiverPercentages + ' + Me.ucrReceiverPercentages.AutoSize = True + Me.ucrReceiverPercentages.frmParent = Me + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(12, 57) + Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" + Me.ucrReceiverPercentages.Selector = Nothing + Me.ucrReceiverPercentages.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverPercentages.strNcFilePath = "" + Me.ucrReceiverPercentages.TabIndex = 55 + Me.ucrReceiverPercentages.ucrSelector = Nothing + ' + 'ucrChkDisplayAsPercentage + ' + Me.ucrChkDisplayAsPercentage.AutoSize = True + Me.ucrChkDisplayAsPercentage.Checked = False + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(12, 17) + Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(143, 23) + Me.ucrChkDisplayAsPercentage.TabIndex = 54 + ' + 'ucrInputMarginName + ' + Me.ucrInputMarginName.AddQuotesIfUnrecognised = True + Me.ucrInputMarginName.AutoSize = True + Me.ucrInputMarginName.IsMultiline = False + Me.ucrInputMarginName.IsReadOnly = False + Me.ucrInputMarginName.Location = New System.Drawing.Point(105, 318) + Me.ucrInputMarginName.Name = "ucrInputMarginName" + Me.ucrInputMarginName.Size = New System.Drawing.Size(137, 21) + Me.ucrInputMarginName.TabIndex = 55 + ' 'ucrReorderSummary ' Me.ucrReorderSummary.Location = New System.Drawing.Point(266, 258) @@ -401,29 +463,20 @@ Partial Class dlgDescribeTwoVariable Me.ucrReorderSummary.ucrDataFrameList = Nothing Me.ucrReorderSummary.ucrReceiver = Nothing ' - 'ucrChkOmitMissing - ' - Me.ucrChkOmitMissing.AutoSize = True - Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(9, 296) - Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) - Me.ucrChkOmitMissing.TabIndex = 0 - ' - 'ucrSaveTable + 'ucrChkDisplayMargins ' - Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(7, 453) - Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(414, 34) - Me.ucrSaveTable.TabIndex = 47 + Me.ucrChkDisplayMargins.AutoSize = True + Me.ucrChkDisplayMargins.Checked = False + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(8, 296) + Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" + Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(143, 23) + Me.ucrChkDisplayMargins.TabIndex = 53 ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(7, 492) + Me.ucrBase.Location = New System.Drawing.Point(7, 489) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 43 @@ -526,92 +579,23 @@ Partial Class dlgDescribeTwoVariable Me.ucrReceiverSkimrGroupByFactor.TabIndex = 32 Me.ucrReceiverSkimrGroupByFactor.ucrSelector = Nothing ' - 'ucrChkDisplayMargins - ' - Me.ucrChkDisplayMargins.AutoSize = True - Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(12, 106) - Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" - Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(143, 23) - Me.ucrChkDisplayMargins.TabIndex = 53 - ' - 'lblMarginName - ' - Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(9, 132) - Me.lblMarginName.Name = "lblMarginName" - Me.lblMarginName.Size = New System.Drawing.Size(62, 15) - Me.lblMarginName.TabIndex = 54 - Me.lblMarginName.Tag = "" - Me.lblMarginName.Text = "Name:" - ' - 'ucrInputMarginName - ' - Me.ucrInputMarginName.AddQuotesIfUnrecognised = True - Me.ucrInputMarginName.AutoSize = True - Me.ucrInputMarginName.IsMultiline = False - Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(77, 129) - Me.ucrInputMarginName.Name = "ucrInputMarginName" - Me.ucrInputMarginName.Size = New System.Drawing.Size(113, 21) - Me.ucrInputMarginName.TabIndex = 55 - ' - 'grpDisplay - ' - Me.grpDisplay.Controls.Add(Me.ucrChkPercentageProportion) - Me.grpDisplay.Controls.Add(Me.ucrInputMarginName) - Me.grpDisplay.Controls.Add(Me.lblFactorAsPercentage) - Me.grpDisplay.Controls.Add(Me.lblMarginName) - Me.grpDisplay.Controls.Add(Me.ucrReceiverPercentages) - Me.grpDisplay.Controls.Add(Me.ucrChkDisplayMargins) - Me.grpDisplay.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpDisplay.Location = New System.Drawing.Point(266, 258) - Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Size = New System.Drawing.Size(194, 159) - Me.grpDisplay.TabIndex = 56 - Me.grpDisplay.TabStop = False - Me.grpDisplay.Text = "Display" - ' - 'ucrChkDisplayAsPercentage - ' - Me.ucrChkDisplayAsPercentage.AutoSize = True - Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(12, 17) - Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(143, 23) - Me.ucrChkDisplayAsPercentage.TabIndex = 54 - ' - 'ucrReceiverPercentages - ' - Me.ucrReceiverPercentages.AutoSize = True - Me.ucrReceiverPercentages.frmParent = Me - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(12, 57) - Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" - Me.ucrReceiverPercentages.Selector = Nothing - Me.ucrReceiverPercentages.Size = New System.Drawing.Size(143, 20) - Me.ucrReceiverPercentages.strNcFilePath = "" - Me.ucrReceiverPercentages.TabIndex = 55 - Me.ucrReceiverPercentages.ucrSelector = Nothing - ' - 'lblFactorAsPercentage + 'ucrChkOmitMissing ' - Me.lblFactorAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactorAsPercentage.Location = New System.Drawing.Point(9, 42) - Me.lblFactorAsPercentage.Name = "lblFactorAsPercentage" - Me.lblFactorAsPercentage.Size = New System.Drawing.Size(154, 15) - Me.lblFactorAsPercentage.TabIndex = 56 - Me.lblFactorAsPercentage.Tag = "" - Me.lblFactorAsPercentage.Text = "Factor as Percentage:" + Me.ucrChkOmitMissing.AutoSize = True + Me.ucrChkOmitMissing.Checked = False + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(8, 296) + Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) + Me.ucrChkOmitMissing.TabIndex = 0 ' - 'ucrChkPercentageProportion + 'ucrSaveTable ' - Me.ucrChkPercentageProportion.AutoSize = True - Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(12, 84) - Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(143, 23) - Me.ucrChkPercentageProportion.TabIndex = 57 + Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveTable.Location = New System.Drawing.Point(7, 457) + Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveTable.Name = "ucrSaveTable" + Me.ucrSaveTable.Size = New System.Drawing.Size(399, 24) + Me.ucrSaveTable.TabIndex = 57 ' 'dlgDescribeTwoVariable ' @@ -619,13 +603,15 @@ Partial Class dlgDescribeTwoVariable Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ClientSize = New System.Drawing.Size(482, 548) + Me.Controls.Add(Me.ucrSaveTable) Me.Controls.Add(Me.grpDisplay) + Me.Controls.Add(Me.ucrInputMarginName) Me.Controls.Add(Me.cmdSummaries) Me.Controls.Add(Me.ucrReorderSummary) - Me.Controls.Add(Me.ucrChkOmitMissing) + Me.Controls.Add(Me.lblMarginName) Me.Controls.Add(Me.cmdMissingOptions) + Me.Controls.Add(Me.ucrChkDisplayMargins) Me.Controls.Add(Me.grpColumnFactor) - Me.Controls.Add(Me.ucrSaveTable) Me.Controls.Add(Me.cmdFormatTable) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.ucrReceiverThreeVariableThirdVariable) @@ -646,6 +632,7 @@ Partial Class dlgDescribeTwoVariable Me.Controls.Add(Me.lbSecondVariable) Me.Controls.Add(Me.lblFirstGroupByFactor) Me.Controls.Add(Me.lblThreeVariableSecondFactor) + Me.Controls.Add(Me.ucrChkOmitMissing) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -692,10 +679,8 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents rdoSkim As RadioButton Friend WithEvents ucrPnlDescribe As UcrPanel Friend WithEvents cmdMissingOptions As Button - Friend WithEvents ucrSaveTable As ucrSave Friend WithEvents rdoNoColumnFactor As RadioButton - Friend WithEvents rdoVariable As RadioButton - Friend WithEvents rdoSummary As RadioButton + Friend WithEvents rdoSummaryVariable As RadioButton Friend WithEvents ucrPnlColumnFactor As UcrPanel Friend WithEvents grpColumnFactor As GroupBox Friend WithEvents ucrReorderSummary As ucrReorder @@ -710,4 +695,5 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents lblFactorAsPercentage As Label Friend WithEvents ucrReceiverPercentages As ucrReceiverSingle Friend WithEvents ucrChkDisplayAsPercentage As ucrCheck + Friend WithEvents ucrSaveTable As ucrSave End Class diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 8696fb49ee3..688c71075b9 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -69,6 +69,7 @@ Public Class dlgDescribeTwoVariable Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 414 ucrBase.clsRsyntax.iCallType = 2 + ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False iUcrBaseXLocation = ucrBase.Location.X iDialogueXsize = Me.Size.Width @@ -154,13 +155,11 @@ Public Class dlgDescribeTwoVariable ucrReceiverThreeVariableSecondFactor.SetIncludedDataTypes({"factor"}) ucrReceiverThreeVariableSecondFactor.SetLinkedDisplayControl(lblThreeVariableSecondFactor) - ucrPnlColumnFactor.AddRadioButton(rdoSummary) - ucrPnlColumnFactor.AddRadioButton(rdoVariable) + ucrPnlColumnFactor.AddRadioButton(rdoSummaryVariable) ucrPnlColumnFactor.AddRadioButton(rdoVariableFactor) ucrPnlColumnFactor.AddRadioButton(rdoNoColumnFactor) ucrPnlColumnFactor.AddParameterValuesCondition(rdoNoColumnFactor, "factor_cols", "NoColFactor") - ucrPnlColumnFactor.AddParameterValuesCondition(rdoSummary, "factor_cols", "Sum") - ucrPnlColumnFactor.AddParameterValuesCondition(rdoVariable, "factor_cols", "Var") + ucrPnlColumnFactor.AddParameterValuesCondition(rdoSummaryVariable, "factor_cols", "Sum") ucrPnlColumnFactor.AddParameterValuesCondition(rdoVariableFactor, "factor_cols", "FactorVar") ucrPnlColumnFactor.AddToLinkedControls(ucrReceiverColumnFactor, {rdoVariableFactor}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -170,7 +169,7 @@ Public Class dlgDescribeTwoVariable ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetDataFrameSelector(ucrSelectorDescribeTwoVar.ucrAvailableDataFrames) - ucrSaveTable.SetIsComboBox() + ucrSaveTable.SetIsTextBox() ucrReorderSummary.bDataIsSummaries = True End Sub @@ -217,25 +216,21 @@ Public Class dlgDescribeTwoVariable ucrReceiverFirstVars.SetMeAsReceiver() ucrInputMarginName.SetText("All") ucrInputMarginName.Visible = False + ucrSaveTable.Reset() - ucrBase.clsRsyntax.ClearCodes() + 'ucrBase.clsRsyntax.ClearCodes() clsCombineFrequencyParametersFunction.SetRCommand("c") clsCombineFunction.SetRCommand("c") clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) - clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=1) + clsDummyFunction.AddParameter("factor_cols", "Sum", iPosition:=1) clsDummyFunction.AddParameter("theme", "select", iPosition:=2) clsPivotWiderFunction.SetRCommand("pivot_wider") clsPivotWiderFunction.AddParameter("values_from", "value", iPosition:=1) - clsSelectFunction.SetPackageName("dplyr") - clsSelectFunction.SetRCommand("rename") - clsSelectFunction.AddParameter(".data", clsRFunctionParameter:=clsFrequencyTablesFunction, iPosition:=0) - clsSelectFunction.AddParameter("rename_function", bIncludeArgumentName:=False, clsRFunctionParameter:=clsRenameCombineFunction, iPosition:=1) - clsFootnoteCellBodyFunction.SetPackageName("gt") clsFootnoteCellBodyFunction.SetRCommand("cells_body") @@ -258,11 +253,11 @@ Public Class dlgDescribeTwoVariable iPosition:=2, bIncludeArgumentName:=False) clsGroupByPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - clsGroupByPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary", - strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary, - strRObjectFormatToAssignTo:=RObjectFormat.Text, - strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, - strObjectName:="last_summary") + 'clsGroupByPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary", + ' strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary, + ' strRObjectFormatToAssignTo:=RObjectFormat.Text, + ' strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + ' strObjectName:="last_summary") clsGroupByFunction.SetPackageName("dplyr") clsGroupByFunction.SetRCommand("group_by") @@ -272,11 +267,6 @@ Public Class dlgDescribeTwoVariable clsCombineFunction.SetRCommand("c") - clsFrequencyTablesFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") - clsFrequencyTablesFunction.AddParameter("data_name", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) - clsFrequencyTablesFunction.AddParameter("summaries", Chr(34) & "summary_count" & Chr(34), iPosition:=1) - clsFrequencyTablesFunction.AddParameter("factors", clsRFunctionParameter:=clsCombineFrequencyFactorParameterFunction, iPosition:=2) - clsPipeOperator.SetOperation("%>%") clsPipeOperator.bBrackets = False @@ -302,7 +292,7 @@ Public Class dlgDescribeTwoVariable clsSummaryTableCombineFactorsFunction.SetRCommand("c") clsSummaryTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") - clsSummaryTableFunction.AddParameter("treat_columns_as_factor", "TRUE", iPosition:=3) + clsSummaryTableFunction.AddParameter("treat_columns_as_factor", "FALSE", iPosition:=3) clsSummaryTableFunction.SetAssignTo("summary_table") clsgtFunction.SetPackageName("gt") @@ -314,11 +304,11 @@ Public Class dlgDescribeTwoVariable clsJoiningPipeOperator.SetOperation("%>%") clsJoiningPipeOperator.AddParameter("gtable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) - clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", - strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, - strRObjectFormatToAssignTo:=RObjectFormat.Html, - strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, - strObjectName:="last_table") + 'clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + 'strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + ' strRObjectFormatToAssignTo:=RObjectFormat.Html, + ' strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + ' strObjectName:="last_table") clsJoiningPipeOperator.bBrackets = False clsTableSourcenoteFunction.SetPackageName("gt") @@ -373,7 +363,7 @@ Public Class dlgDescribeTwoVariable ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1) ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) - ucrSaveTable.AddAdditionalRCode(clsGroupByPipeOperator, bReset) + ucrSaveTable.AddAdditionalRCode(clsGroupByPipeOperator, iAdditionalPairNo:=1) ucrChkOmitMissing.SetRCode(clsSummaryTableFunction, bReset) ucrReceiverFirstVars.SetRCode(clsSummaryTableFunction, bReset) @@ -389,7 +379,7 @@ Public Class dlgDescribeTwoVariable ucrReceiverThreeVariableThirdVariable.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrPnlColumnFactor.SetRCode(clsDummyFunction, bReset) ucrChkDisplayMargins.SetRCode(clsCombineFrequencyParametersFunction, bReset) - ucrSaveTable.SetRCode(clsJoiningPipeOperator) + ucrSaveTable.SetRCode(clsJoiningPipeOperator, bReset) bRcodeSet = True FillListView() @@ -403,7 +393,7 @@ Public Class dlgDescribeTwoVariable OrElse (Not ucrReceiverThreeVariableSecondFactor.IsEmpty _ AndAlso Not ucrReceiverThreeVariableThirdVariable.IsEmpty) _ AndAlso (IsFactorByFactor() OrElse IsNumericByFactor() _ - OrElse IsFactorByNumeric() OrElse IsNumericByNumeric()))) + OrElse IsFactorByNumeric() OrElse IsNumericByNumeric())) AndAlso ucrSaveTable.IsComplete) End Sub Private Function IsFactorByFactor() As Boolean @@ -454,10 +444,10 @@ Public Class dlgDescribeTwoVariable Private Sub ManageControlsVisibility() grpSummaries.Visible = rdoThreeVariable.Checked OrElse rdoTwoVariable.Checked ucrReorderSummary.Visible = IsNumericByFactor() - cmdSummaries.Visible = IsFactorByFactor() OrElse IsNumericByFactor() + cmdSummaries.Visible = IsNumericByFactor() grpColumnFactor.Visible = IsFactorByFactor() OrElse IsNumericByFactor() ucrChkDisplayMargins.Visible = rdoTwoVariable.Checked AndAlso IsFactorByFactor() - ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked + ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked AndAlso IsFactorByFactor() grpDisplay.Visible = rdoTwoVariable.Checked AndAlso IsFactorByFactor() If rdoTwoVariable.Checked Then @@ -466,7 +456,6 @@ Public Class dlgDescribeTwoVariable ucrChkOmitMissing.Visible = IsFactorByNumeric() OrElse IsNumericByFactor() Else ucrChkOmitMissing.Visible = False - 'cmdMissingOptions.Visible = False End If cmdMissingOptions.Visible = ucrChkOmitMissing.Checked End Sub @@ -474,30 +463,40 @@ Public Class dlgDescribeTwoVariable Private Sub ChangeBaseRCode() If rdoSkim.Checked Then clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) - ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) + ucrSaveTable.Visible = True + 'ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetSaveType(RObjectTypeLabel.Summary, strRObjectFormat:=RObjectFormat.Text) ucrSaveTable.SetAssignToIfUncheckedValue("last_summary") ucrSaveTable.SetCheckBoxText("Save Summary") + ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) + 'clsGroupByPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary", + ' strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary, + ' strRObjectFormatToAssignTo:=RObjectFormat.Text, + ' strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + ' strObjectName:="last_summary") + ElseIf rdoTwoVariable.Checked Then clsDummyFunction.AddParameter("checked", "customize", iPosition:=0) If IsNumericByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRCorrelationFunction) - ucrSaveTable.Visible = False + 'ucrSaveTable.Visible = False ElseIf IsFactorByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRAnovaFunction) - ucrSaveTable.Visible = False + 'ucrSaveTable.Visible = False ElseIf IsNumericByFactor() Then - ucrSaveTable.Visible = True - clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=1) + 'ucrSaveTable.Visible = True + clsDummyFunction.AddParameter("factor_cols", "Sum", iPosition:=1) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + ' ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") ElseIf IsFactorByFactor() Then - ucrSaveTable.Visible = True + 'ucrSaveTable.Visible = True clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=1) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + ' ucrSaveTable.SetPrefix("frequency_table") ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") @@ -506,12 +505,25 @@ Public Class dlgDescribeTwoVariable clsDummyFunction.AddParameter("checked", "three_variable", iPosition:=0) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) - ucrSaveTable.SetAssignToIfUncheckedValue("last_table") + 'ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") End If FactorColumns() + 'ChangePrefix() End Sub + 'Private Sub ChangePrefix() + ' If rdoSkim.Checked Then + ' ucrSaveTable.SetPrefix("summary_table") + ' Else + ' If IsNumericByFactor() Then + ' ucrSaveTable.SetPrefix("summary_table") + ' ElseIf IsFactorByFactor Then + ' ucrSaveTable.SetPrefix("frequency_table") + ' End If + ' End If + 'End Sub + Private Sub UpdateCombineFactorParameterFunction() If rdoThreeVariable.Checked Then clsSummaryTableFunction.AddParameter("factors", clsRFunctionParameter:=clsSummaryTableCombineFactorsFunction, iPosition:=2) @@ -561,6 +573,7 @@ Public Class dlgDescribeTwoVariable If rdoSkim.Checked Then ucrReceiverFirstVars.SetSingleTypeStatus(False) + ucrSaveTable.Location = New Point(10, 286) ElseIf rdoThreeVariable.Checked Then ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) lblThreeVariableCategorical.Visible = True @@ -568,6 +581,7 @@ Public Class dlgDescribeTwoVariable lblSecondType.Location = New Point(12, 33) lblSecondBy.Visible = True Else + ucrSaveTable.Location = New Point(10, 457) ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) lblThreeVariableCategorical.Visible = False lblThreeVariableCategorical.Location = New Point(12, 33) @@ -638,19 +652,15 @@ Public Class dlgDescribeTwoVariable clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=1) Else clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) - If rdoSummary.Checked Then + If rdoSummaryVariable.Checked Then clsDummyFunction.AddParameter("factor_cols", "Sum", iPosition:=1) - clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0) - ElseIf rdoVariable.Checked Then - clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=1) - clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) + clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) ElseIf rdoVariableFactor.Checked Then ucrReceiverColumnFactor.SetMeAsReceiver() clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=1) clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) End If End If - AddingColumnFactor() End Sub @@ -713,6 +723,9 @@ Public Class dlgDescribeTwoVariable Private Sub ucrSelectorDescribeTwoVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDescribeTwoVar.ControlValueChanged clsGroupByPipeOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + + ' clsJoiningPipeOperator._strDataFrameNameToAddAssignToObject = ucrSelectorDescribeTwoVar.strCurrentDataFrame + ' clsGroupByPipeOperator._strDataFrameNameToAddAssignToObject = ucrSelectorDescribeTwoVar.strCurrentDataFrame End Sub Private Sub UpdateSummaryTableFunction() @@ -813,6 +826,7 @@ Public Class dlgDescribeTwoVariable 'EnableDisableFrequencyControls() AddRemoveNAParameter() HideFormatTableButton() + ManageControlsVisibility() 'TestOKEnabled() End Sub From 6bf04c51abdf86be6a017e1c36cae69cc94637a4 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Wed, 9 Aug 2023 16:44:32 +0300 Subject: [PATCH 18/21] Changes --- instat/dlgDescribeTwoVariable.vb | 12 ++++++------ instat/dlgLinePlot.vb | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index 688c71075b9..e69f9299662 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -480,23 +480,23 @@ Public Class dlgDescribeTwoVariable clsDummyFunction.AddParameter("checked", "customize", iPosition:=0) If IsNumericByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRCorrelationFunction) - 'ucrSaveTable.Visible = False + ucrSaveTable.Visible = False ElseIf IsFactorByNumeric() Then ucrBase.clsRsyntax.SetBaseRFunction(clsRAnovaFunction) - 'ucrSaveTable.Visible = False + ucrSaveTable.Visible = False ElseIf IsNumericByFactor() Then - 'ucrSaveTable.Visible = True + ucrSaveTable.Visible = True clsDummyFunction.AddParameter("factor_cols", "Sum", iPosition:=1) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) - ' ucrSaveTable.SetPrefix("summary_table") + ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") ElseIf IsFactorByFactor() Then - 'ucrSaveTable.Visible = True + ucrSaveTable.Visible = True clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=1) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) - ' ucrSaveTable.SetPrefix("frequency_table") + ucrSaveTable.SetPrefix("frequency_table") ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") diff --git a/instat/dlgLinePlot.vb b/instat/dlgLinePlot.vb index 9d5c27dd49f..48f1cf788f6 100644 --- a/instat/dlgLinePlot.vb +++ b/instat/dlgLinePlot.vb @@ -746,7 +746,7 @@ Public Class dlgLinePlot Private Sub PeakOptionsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PeakOptionsToolStripMenuItem.Click openSdgLayerOptions(clsPeakFunction) End Sub - + Private Sub DumbbellOptionsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DumbbellOptionsToolStripMenuItem.Click openSdgLayerOptions(clsGeomDumbbellFunction) End Sub @@ -754,7 +754,7 @@ Public Class dlgLinePlot Private Sub LineOptionsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles LineOptionsToolStripMenuItem.Click openSdgLayerOptions(clsGeomLineFunction) End Sub - + Private Sub SmoothOptionsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SmoothOptionsToolStripMenuItem.Click openSdgLayerOptions(clsGeomSmoothFunction) End Sub @@ -766,7 +766,7 @@ Public Class dlgLinePlot Private Sub PathOptionsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PathOptionsToolStripMenuItem.Click openSdgLayerOptions(clsPathFunction) End Sub - + Private Sub StepOptionsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles StepOptionsToolStripMenuItem.Click openSdgLayerOptions(clsGeomStepFunction) End Sub From ff9a5c4c614aace93fe7af4b88247fd0082d925d Mon Sep 17 00:00:00 2001 From: n-thony Date: Thu, 10 Aug 2023 10:56:05 +0300 Subject: [PATCH 19/21] minor design change --- instat/dlgDescribeTwoVariable.Designer.vb | 230 +++++++++++++--------- 1 file changed, 135 insertions(+), 95 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index 53bd7c7cee4..51a8ff99b8b 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -97,9 +97,10 @@ Partial Class dlgDescribeTwoVariable Me.rdoThreeVariable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoThreeVariable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoThreeVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoThreeVariable.Location = New System.Drawing.Point(235, 8) + Me.rdoThreeVariable.Location = New System.Drawing.Point(432, 12) + Me.rdoThreeVariable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoThreeVariable.Name = "rdoThreeVariable" - Me.rdoThreeVariable.Size = New System.Drawing.Size(100, 28) + Me.rdoThreeVariable.Size = New System.Drawing.Size(150, 42) Me.rdoThreeVariable.TabIndex = 26 Me.rdoThreeVariable.Text = "Three Variables" Me.rdoThreeVariable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -108,9 +109,10 @@ Partial Class dlgDescribeTwoVariable 'cmdFormatTable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFormatTable.Location = New System.Drawing.Point(317, 423) + Me.cmdFormatTable.Location = New System.Drawing.Point(489, 634) + Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 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 = 44 Me.cmdFormatTable.Text = "Format Table..." Me.cmdFormatTable.UseVisualStyleBackColor = True @@ -118,9 +120,10 @@ Partial Class dlgDescribeTwoVariable 'lblThreeVariableSecondFactor ' Me.lblThreeVariableSecondFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblThreeVariableSecondFactor.Location = New System.Drawing.Point(306, 150) + Me.lblThreeVariableSecondFactor.Location = New System.Drawing.Point(472, 225) + Me.lblThreeVariableSecondFactor.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblThreeVariableSecondFactor.Name = "lblThreeVariableSecondFactor" - Me.lblThreeVariableSecondFactor.Size = New System.Drawing.Size(100, 15) + Me.lblThreeVariableSecondFactor.Size = New System.Drawing.Size(150, 22) Me.lblThreeVariableSecondFactor.TabIndex = 35 Me.lblThreeVariableSecondFactor.Tag = "" Me.lblThreeVariableSecondFactor.Text = "Second Variable :" @@ -128,9 +131,10 @@ Partial Class dlgDescribeTwoVariable 'cmdMissingOptions ' Me.cmdMissingOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdMissingOptions.Location = New System.Drawing.Point(158, 296) + Me.cmdMissingOptions.Location = New System.Drawing.Point(250, 444) + Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdMissingOptions.Name = "cmdMissingOptions" - Me.cmdMissingOptions.Size = New System.Drawing.Size(105, 23) + Me.cmdMissingOptions.Size = New System.Drawing.Size(158, 34) Me.cmdMissingOptions.TabIndex = 46 Me.cmdMissingOptions.Text = "Missing Options..." Me.cmdMissingOptions.UseVisualStyleBackColor = True @@ -138,9 +142,10 @@ Partial Class dlgDescribeTwoVariable 'lbSecondVariable ' Me.lbSecondVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lbSecondVariable.Location = New System.Drawing.Point(306, 150) + Me.lbSecondVariable.Location = New System.Drawing.Point(472, 225) + Me.lbSecondVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lbSecondVariable.Name = "lbSecondVariable" - Me.lbSecondVariable.Size = New System.Drawing.Size(100, 15) + Me.lbSecondVariable.Size = New System.Drawing.Size(150, 22) Me.lbSecondVariable.TabIndex = 27 Me.lbSecondVariable.Tag = "" Me.lbSecondVariable.Text = "Second Variable:" @@ -149,9 +154,10 @@ Partial Class dlgDescribeTwoVariable ' Me.lblFirstVariable.AutoSize = True Me.lblFirstVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstVariable.Location = New System.Drawing.Point(306, 49) + Me.lblFirstVariable.Location = New System.Drawing.Point(472, 74) + Me.lblFirstVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFirstVariable.Name = "lblFirstVariable" - Me.lblFirstVariable.Size = New System.Drawing.Size(75, 13) + Me.lblFirstVariable.Size = New System.Drawing.Size(114, 20) Me.lblFirstVariable.TabIndex = 31 Me.lblFirstVariable.Tag = "" Me.lblFirstVariable.Text = "First Variables:" @@ -163,9 +169,11 @@ Partial Class dlgDescribeTwoVariable Me.grpColumnFactor.Controls.Add(Me.rdoSummaryVariable) Me.grpColumnFactor.Controls.Add(Me.rdoNoColumnFactor) Me.grpColumnFactor.Controls.Add(Me.ucrPnlColumnFactor) - Me.grpColumnFactor.Location = New System.Drawing.Point(5, 336) + Me.grpColumnFactor.Location = New System.Drawing.Point(21, 504) + Me.grpColumnFactor.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.grpColumnFactor.Name = "grpColumnFactor" - Me.grpColumnFactor.Size = New System.Drawing.Size(255, 97) + Me.grpColumnFactor.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpColumnFactor.Size = New System.Drawing.Size(382, 146) Me.grpColumnFactor.TabIndex = 51 Me.grpColumnFactor.TabStop = False Me.grpColumnFactor.Text = "Columns" @@ -174,11 +182,11 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverColumnFactor.AutoSize = True Me.ucrReceiverColumnFactor.frmParent = Me - Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(132, 43) + Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(198, 64) Me.ucrReceiverColumnFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverColumnFactor.Name = "ucrReceiverColumnFactor" Me.ucrReceiverColumnFactor.Selector = Nothing - Me.ucrReceiverColumnFactor.Size = New System.Drawing.Size(119, 20) + Me.ucrReceiverColumnFactor.Size = New System.Drawing.Size(178, 30) Me.ucrReceiverColumnFactor.strNcFilePath = "" Me.ucrReceiverColumnFactor.TabIndex = 52 Me.ucrReceiverColumnFactor.ucrSelector = Nothing @@ -186,9 +194,10 @@ Partial Class dlgDescribeTwoVariable 'rdoVariableFactor ' Me.rdoVariableFactor.AutoSize = True - Me.rdoVariableFactor.Location = New System.Drawing.Point(15, 45) + Me.rdoVariableFactor.Location = New System.Drawing.Point(22, 68) + Me.rdoVariableFactor.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoVariableFactor.Name = "rdoVariableFactor" - Me.rdoVariableFactor.Size = New System.Drawing.Size(96, 17) + Me.rdoVariableFactor.Size = New System.Drawing.Size(142, 24) Me.rdoVariableFactor.TabIndex = 51 Me.rdoVariableFactor.TabStop = True Me.rdoVariableFactor.Text = "Variable Factor" @@ -197,9 +206,10 @@ Partial Class dlgDescribeTwoVariable 'rdoSummaryVariable ' Me.rdoSummaryVariable.AutoSize = True - Me.rdoSummaryVariable.Location = New System.Drawing.Point(15, 23) + Me.rdoSummaryVariable.Location = New System.Drawing.Point(22, 34) + Me.rdoSummaryVariable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoSummaryVariable.Name = "rdoSummaryVariable" - Me.rdoSummaryVariable.Size = New System.Drawing.Size(109, 17) + Me.rdoSummaryVariable.Size = New System.Drawing.Size(163, 24) Me.rdoSummaryVariable.TabIndex = 47 Me.rdoSummaryVariable.TabStop = True Me.rdoSummaryVariable.Text = "Summary Variable" @@ -208,9 +218,10 @@ Partial Class dlgDescribeTwoVariable 'rdoNoColumnFactor ' Me.rdoNoColumnFactor.AutoSize = True - Me.rdoNoColumnFactor.Location = New System.Drawing.Point(15, 66) + Me.rdoNoColumnFactor.Location = New System.Drawing.Point(22, 99) + Me.rdoNoColumnFactor.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoNoColumnFactor.Name = "rdoNoColumnFactor" - Me.rdoNoColumnFactor.Size = New System.Drawing.Size(110, 17) + Me.rdoNoColumnFactor.Size = New System.Drawing.Size(162, 24) Me.rdoNoColumnFactor.TabIndex = 50 Me.rdoNoColumnFactor.TabStop = True Me.rdoNoColumnFactor.Text = "No Column Factor" @@ -219,9 +230,10 @@ Partial Class dlgDescribeTwoVariable 'ucrPnlColumnFactor ' Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(6, 18) + Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(9, 27) + Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" - Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(123, 72) + Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(184, 108) Me.ucrPnlColumnFactor.TabIndex = 48 ' 'grpSummaries @@ -233,9 +245,11 @@ Partial Class dlgDescribeTwoVariable Me.grpSummaries.Controls.Add(Me.lblSummary) Me.grpSummaries.Controls.Add(Me.lblBy) Me.grpSummaries.Controls.Add(Me.lblSecondType) - Me.grpSummaries.Location = New System.Drawing.Point(3, 219) + Me.grpSummaries.Location = New System.Drawing.Point(17, 328) + Me.grpSummaries.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.grpSummaries.Name = "grpSummaries" - Me.grpSummaries.Size = New System.Drawing.Size(210, 72) + Me.grpSummaries.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpSummaries.Size = New System.Drawing.Size(315, 108) Me.grpSummaries.TabIndex = 39 Me.grpSummaries.TabStop = False ' @@ -243,18 +257,20 @@ Partial Class dlgDescribeTwoVariable ' Me.lblFirstType.AutoSize = True Me.lblFirstType.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstType.Location = New System.Drawing.Point(12, 18) + Me.lblFirstType.Location = New System.Drawing.Point(18, 27) + Me.lblFirstType.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFirstType.Name = "lblFirstType" - Me.lblFirstType.Size = New System.Drawing.Size(0, 13) + Me.lblFirstType.Size = New System.Drawing.Size(0, 20) Me.lblFirstType.TabIndex = 0 ' 'lblSecondBy ' Me.lblSecondBy.AutoSize = True Me.lblSecondBy.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondBy.Location = New System.Drawing.Point(180, 16) + Me.lblSecondBy.Location = New System.Drawing.Point(270, 24) + Me.lblSecondBy.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblSecondBy.Name = "lblSecondBy" - Me.lblSecondBy.Size = New System.Drawing.Size(18, 13) + Me.lblSecondBy.Size = New System.Drawing.Size(25, 20) Me.lblSecondBy.TabIndex = 1 Me.lblSecondBy.Text = "by" ' @@ -262,9 +278,10 @@ Partial Class dlgDescribeTwoVariable ' Me.lblThreeVariableCategorical.AutoSize = True Me.lblThreeVariableCategorical.ForeColor = System.Drawing.SystemColors.Highlight - Me.lblThreeVariableCategorical.Location = New System.Drawing.Point(12, 33) + Me.lblThreeVariableCategorical.Location = New System.Drawing.Point(18, 50) + Me.lblThreeVariableCategorical.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblThreeVariableCategorical.Name = "lblThreeVariableCategorical" - Me.lblThreeVariableCategorical.Size = New System.Drawing.Size(59, 13) + Me.lblThreeVariableCategorical.Size = New System.Drawing.Size(86, 20) Me.lblThreeVariableCategorical.TabIndex = 3 Me.lblThreeVariableCategorical.Text = "categorical" ' @@ -272,18 +289,20 @@ Partial Class dlgDescribeTwoVariable ' Me.lblSummaryName.AutoSize = True Me.lblSummaryName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSummaryName.Location = New System.Drawing.Point(70, 51) + Me.lblSummaryName.Location = New System.Drawing.Point(105, 76) + Me.lblSummaryName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblSummaryName.Name = "lblSummaryName" - Me.lblSummaryName.Size = New System.Drawing.Size(0, 13) + Me.lblSummaryName.Size = New System.Drawing.Size(0, 20) Me.lblSummaryName.TabIndex = 5 ' 'lblSummary ' Me.lblSummary.AutoSize = True Me.lblSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSummary.Location = New System.Drawing.Point(12, 51) + Me.lblSummary.Location = New System.Drawing.Point(18, 76) + Me.lblSummary.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblSummary.Name = "lblSummary" - Me.lblSummary.Size = New System.Drawing.Size(53, 13) + Me.lblSummary.Size = New System.Drawing.Size(80, 20) Me.lblSummary.TabIndex = 4 Me.lblSummary.Text = "Summary:" ' @@ -291,9 +310,10 @@ Partial Class dlgDescribeTwoVariable ' Me.lblBy.AutoSize = True Me.lblBy.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblBy.Location = New System.Drawing.Point(82, 16) + Me.lblBy.Location = New System.Drawing.Point(123, 24) + Me.lblBy.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblBy.Name = "lblBy" - Me.lblBy.Size = New System.Drawing.Size(18, 13) + Me.lblBy.Size = New System.Drawing.Size(25, 20) Me.lblBy.TabIndex = 6 Me.lblBy.Text = "by" ' @@ -301,17 +321,19 @@ Partial Class dlgDescribeTwoVariable ' Me.lblSecondType.AutoSize = True Me.lblSecondType.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondType.Location = New System.Drawing.Point(106, 18) + Me.lblSecondType.Location = New System.Drawing.Point(159, 27) + Me.lblSecondType.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblSecondType.Name = "lblSecondType" - Me.lblSecondType.Size = New System.Drawing.Size(0, 13) + Me.lblSecondType.Size = New System.Drawing.Size(0, 20) Me.lblSecondType.TabIndex = 0 ' 'lblFirstGroupByFactor ' Me.lblFirstGroupByFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstGroupByFactor.Location = New System.Drawing.Point(306, 149) + Me.lblFirstGroupByFactor.Location = New System.Drawing.Point(472, 224) + Me.lblFirstGroupByFactor.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFirstGroupByFactor.Name = "lblFirstGroupByFactor" - Me.lblFirstGroupByFactor.Size = New System.Drawing.Size(100, 15) + Me.lblFirstGroupByFactor.Size = New System.Drawing.Size(150, 22) Me.lblFirstGroupByFactor.TabIndex = 29 Me.lblFirstGroupByFactor.Tag = "" Me.lblFirstGroupByFactor.Text = "Factor (Optional) :" @@ -324,9 +346,10 @@ Partial Class dlgDescribeTwoVariable Me.rdoSkim.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSkim.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSkim.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSkim.Location = New System.Drawing.Point(42, 8) + Me.rdoSkim.Location = New System.Drawing.Point(143, 12) + Me.rdoSkim.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoSkim.Name = "rdoSkim" - Me.rdoSkim.Size = New System.Drawing.Size(100, 28) + Me.rdoSkim.Size = New System.Drawing.Size(150, 42) Me.rdoSkim.TabIndex = 23 Me.rdoSkim.Text = "Skim" Me.rdoSkim.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -335,9 +358,10 @@ Partial Class dlgDescribeTwoVariable 'lblThirdVariable ' Me.lblThirdVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblThirdVariable.Location = New System.Drawing.Point(306, 191) + Me.lblThirdVariable.Location = New System.Drawing.Point(472, 286) + Me.lblThirdVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblThirdVariable.Name = "lblThirdVariable" - Me.lblThirdVariable.Size = New System.Drawing.Size(154, 15) + Me.lblThirdVariable.Size = New System.Drawing.Size(231, 22) Me.lblThirdVariable.TabIndex = 37 Me.lblThirdVariable.Tag = "" Me.lblThirdVariable.Text = "Third Variable :" @@ -345,9 +369,10 @@ Partial Class dlgDescribeTwoVariable 'lblSecondGroupByFactor ' Me.lblSecondGroupByFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondGroupByFactor.Location = New System.Drawing.Point(306, 191) + Me.lblSecondGroupByFactor.Location = New System.Drawing.Point(472, 286) + Me.lblSecondGroupByFactor.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblSecondGroupByFactor.Name = "lblSecondGroupByFactor" - Me.lblSecondGroupByFactor.Size = New System.Drawing.Size(137, 15) + Me.lblSecondGroupByFactor.Size = New System.Drawing.Size(206, 22) Me.lblSecondGroupByFactor.TabIndex = 33 Me.lblSecondGroupByFactor.Tag = "" Me.lblSecondGroupByFactor.Text = "Second Factor (Optional) :" @@ -360,9 +385,10 @@ Partial Class dlgDescribeTwoVariable Me.rdoTwoVariable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTwoVariable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoTwoVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoTwoVariable.Location = New System.Drawing.Point(137, 8) + Me.rdoTwoVariable.Location = New System.Drawing.Point(286, 12) + Me.rdoTwoVariable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoTwoVariable.Name = "rdoTwoVariable" - Me.rdoTwoVariable.Size = New System.Drawing.Size(100, 28) + Me.rdoTwoVariable.Size = New System.Drawing.Size(150, 42) Me.rdoTwoVariable.TabIndex = 24 Me.rdoTwoVariable.Text = "Two Variables" Me.rdoTwoVariable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -371,9 +397,10 @@ Partial Class dlgDescribeTwoVariable 'cmdSummaries ' Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdSummaries.Location = New System.Drawing.Point(301, 229) + Me.cmdSummaries.Location = New System.Drawing.Point(465, 344) + Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(120, 23) + Me.cmdSummaries.Size = New System.Drawing.Size(180, 34) Me.cmdSummaries.TabIndex = 1 Me.cmdSummaries.Tag = "Summaries" Me.cmdSummaries.Text = "Choose Summaries..." @@ -382,9 +409,10 @@ Partial Class dlgDescribeTwoVariable 'lblMarginName ' Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(6, 320) + Me.lblMarginName.Location = New System.Drawing.Point(22, 480) + Me.lblMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblMarginName.Name = "lblMarginName" - Me.lblMarginName.Size = New System.Drawing.Size(93, 15) + Me.lblMarginName.Size = New System.Drawing.Size(140, 22) Me.lblMarginName.TabIndex = 54 Me.lblMarginName.Tag = "" Me.lblMarginName.Text = "Margin Name:" @@ -395,9 +423,11 @@ Partial Class dlgDescribeTwoVariable Me.grpDisplay.Controls.Add(Me.lblFactorAsPercentage) Me.grpDisplay.Controls.Add(Me.ucrReceiverPercentages) Me.grpDisplay.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpDisplay.Location = New System.Drawing.Point(266, 205) + Me.grpDisplay.Location = New System.Drawing.Point(412, 308) + Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Size = New System.Drawing.Size(194, 115) + Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpDisplay.Size = New System.Drawing.Size(291, 172) Me.grpDisplay.TabIndex = 56 Me.grpDisplay.TabStop = False Me.grpDisplay.Text = "Percentages" @@ -406,17 +436,19 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrChkPercentageProportion.AutoSize = True Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(12, 84) + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(18, 126) + Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(143, 23) + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(214, 51) Me.ucrChkPercentageProportion.TabIndex = 57 ' 'lblFactorAsPercentage ' Me.lblFactorAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactorAsPercentage.Location = New System.Drawing.Point(9, 42) + Me.lblFactorAsPercentage.Location = New System.Drawing.Point(14, 63) + Me.lblFactorAsPercentage.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFactorAsPercentage.Name = "lblFactorAsPercentage" - Me.lblFactorAsPercentage.Size = New System.Drawing.Size(154, 15) + Me.lblFactorAsPercentage.Size = New System.Drawing.Size(231, 22) Me.lblFactorAsPercentage.TabIndex = 56 Me.lblFactorAsPercentage.Tag = "" Me.lblFactorAsPercentage.Text = "Factor as Percentage:" @@ -425,11 +457,11 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverPercentages.AutoSize = True Me.ucrReceiverPercentages.frmParent = Me - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(12, 57) + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(18, 86) Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" Me.ucrReceiverPercentages.Selector = Nothing - Me.ucrReceiverPercentages.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverPercentages.Size = New System.Drawing.Size(214, 30) Me.ucrReceiverPercentages.strNcFilePath = "" Me.ucrReceiverPercentages.TabIndex = 55 Me.ucrReceiverPercentages.ucrSelector = Nothing @@ -438,9 +470,10 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrChkDisplayAsPercentage.AutoSize = True Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(12, 17) + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(18, 26) + Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(143, 23) + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(214, 51) Me.ucrChkDisplayAsPercentage.TabIndex = 54 ' 'ucrInputMarginName @@ -449,16 +482,18 @@ Partial Class dlgDescribeTwoVariable Me.ucrInputMarginName.AutoSize = True Me.ucrInputMarginName.IsMultiline = False Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(105, 318) + Me.ucrInputMarginName.Location = New System.Drawing.Point(171, 477) + Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(14, 14, 14, 14) Me.ucrInputMarginName.Name = "ucrInputMarginName" - Me.ucrInputMarginName.Size = New System.Drawing.Size(137, 21) + Me.ucrInputMarginName.Size = New System.Drawing.Size(206, 32) Me.ucrInputMarginName.TabIndex = 55 ' 'ucrReorderSummary ' - Me.ucrReorderSummary.Location = New System.Drawing.Point(266, 258) + Me.ucrReorderSummary.Location = New System.Drawing.Point(412, 387) + Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrReorderSummary.Name = "ucrReorderSummary" - Me.ucrReorderSummary.Size = New System.Drawing.Size(194, 156) + Me.ucrReorderSummary.Size = New System.Drawing.Size(291, 234) Me.ucrReorderSummary.TabIndex = 52 Me.ucrReorderSummary.ucrDataFrameList = Nothing Me.ucrReorderSummary.ucrReceiver = Nothing @@ -467,29 +502,31 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrChkDisplayMargins.AutoSize = True Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(8, 296) + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(25, 444) + Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" - Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(143, 23) + Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(214, 34) Me.ucrChkDisplayMargins.TabIndex = 53 ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(7, 489) + Me.ucrBase.Location = New System.Drawing.Point(23, 734) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(6, 6, 6, 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 = 43 ' 'ucrReceiverThreeVariableThirdVariable ' Me.ucrReceiverThreeVariableThirdVariable.AutoSize = True Me.ucrReceiverThreeVariableThirdVariable.frmParent = Me - Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(301, 204) + Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(465, 306) Me.ucrReceiverThreeVariableThirdVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverThreeVariableThirdVariable.Name = "ucrReceiverThreeVariableThirdVariable" Me.ucrReceiverThreeVariableThirdVariable.Selector = Nothing - Me.ucrReceiverThreeVariableThirdVariable.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverThreeVariableThirdVariable.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverThreeVariableThirdVariable.strNcFilePath = "" Me.ucrReceiverThreeVariableThirdVariable.TabIndex = 38 Me.ucrReceiverThreeVariableThirdVariable.ucrSelector = Nothing @@ -498,11 +535,11 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverSecondSkimrGroupByFactor.AutoSize = True Me.ucrReceiverSecondSkimrGroupByFactor.frmParent = Me - Me.ucrReceiverSecondSkimrGroupByFactor.Location = New System.Drawing.Point(301, 204) + Me.ucrReceiverSecondSkimrGroupByFactor.Location = New System.Drawing.Point(465, 306) Me.ucrReceiverSecondSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSecondSkimrGroupByFactor.Name = "ucrReceiverSecondSkimrGroupByFactor" Me.ucrReceiverSecondSkimrGroupByFactor.Selector = Nothing - Me.ucrReceiverSecondSkimrGroupByFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverSecondSkimrGroupByFactor.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverSecondSkimrGroupByFactor.strNcFilePath = "" Me.ucrReceiverSecondSkimrGroupByFactor.TabIndex = 34 Me.ucrReceiverSecondSkimrGroupByFactor.ucrSelector = Nothing @@ -511,11 +548,11 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverSecondTwoVariableFactor.AutoSize = True Me.ucrReceiverSecondTwoVariableFactor.frmParent = Me - Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(301, 164) + Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(465, 246) Me.ucrReceiverSecondTwoVariableFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSecondTwoVariableFactor.Name = "ucrReceiverSecondTwoVariableFactor" Me.ucrReceiverSecondTwoVariableFactor.Selector = Nothing - Me.ucrReceiverSecondTwoVariableFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverSecondTwoVariableFactor.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverSecondTwoVariableFactor.strNcFilePath = "" Me.ucrReceiverSecondTwoVariableFactor.TabIndex = 25 Me.ucrReceiverSecondTwoVariableFactor.ucrSelector = Nothing @@ -526,21 +563,21 @@ Partial Class dlgDescribeTwoVariable Me.ucrSelectorDescribeTwoVar.bDropUnusedFilterLevels = False Me.ucrSelectorDescribeTwoVar.bShowHiddenColumns = False Me.ucrSelectorDescribeTwoVar.bUseCurrentFilter = True - Me.ucrSelectorDescribeTwoVar.Location = New System.Drawing.Point(3, 36) + Me.ucrSelectorDescribeTwoVar.Location = New System.Drawing.Point(17, 54) Me.ucrSelectorDescribeTwoVar.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorDescribeTwoVar.Name = "ucrSelectorDescribeTwoVar" - Me.ucrSelectorDescribeTwoVar.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorDescribeTwoVar.Size = New System.Drawing.Size(320, 274) Me.ucrSelectorDescribeTwoVar.TabIndex = 28 ' 'ucrReceiverFirstVars ' Me.ucrReceiverFirstVars.AutoSize = True Me.ucrReceiverFirstVars.frmParent = Me - Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(301, 64) + Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(465, 96) Me.ucrReceiverFirstVars.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFirstVars.Name = "ucrReceiverFirstVars" Me.ucrReceiverFirstVars.Selector = Nothing - Me.ucrReceiverFirstVars.Size = New System.Drawing.Size(120, 79) + Me.ucrReceiverFirstVars.Size = New System.Drawing.Size(180, 118) Me.ucrReceiverFirstVars.strNcFilePath = "" Me.ucrReceiverFirstVars.TabIndex = 30 Me.ucrReceiverFirstVars.ucrSelector = Nothing @@ -548,20 +585,21 @@ Partial Class dlgDescribeTwoVariable 'ucrPnlDescribe ' Me.ucrPnlDescribe.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlDescribe.Location = New System.Drawing.Point(39, 3) + Me.ucrPnlDescribe.Location = New System.Drawing.Point(138, 4) + Me.ucrPnlDescribe.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrPnlDescribe.Name = "ucrPnlDescribe" - Me.ucrPnlDescribe.Size = New System.Drawing.Size(317, 34) + Me.ucrPnlDescribe.Size = New System.Drawing.Size(476, 51) Me.ucrPnlDescribe.TabIndex = 22 ' 'ucrReceiverThreeVariableSecondFactor ' Me.ucrReceiverThreeVariableSecondFactor.AutoSize = True Me.ucrReceiverThreeVariableSecondFactor.frmParent = Me - Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(301, 164) + Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(465, 246) Me.ucrReceiverThreeVariableSecondFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverThreeVariableSecondFactor.Name = "ucrReceiverThreeVariableSecondFactor" Me.ucrReceiverThreeVariableSecondFactor.Selector = Nothing - Me.ucrReceiverThreeVariableSecondFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverThreeVariableSecondFactor.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverThreeVariableSecondFactor.strNcFilePath = "" Me.ucrReceiverThreeVariableSecondFactor.TabIndex = 36 Me.ucrReceiverThreeVariableSecondFactor.ucrSelector = Nothing @@ -570,11 +608,11 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrReceiverSkimrGroupByFactor.AutoSize = True Me.ucrReceiverSkimrGroupByFactor.frmParent = Me - Me.ucrReceiverSkimrGroupByFactor.Location = New System.Drawing.Point(301, 164) + Me.ucrReceiverSkimrGroupByFactor.Location = New System.Drawing.Point(465, 246) Me.ucrReceiverSkimrGroupByFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSkimrGroupByFactor.Name = "ucrReceiverSkimrGroupByFactor" Me.ucrReceiverSkimrGroupByFactor.Selector = Nothing - Me.ucrReceiverSkimrGroupByFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverSkimrGroupByFactor.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverSkimrGroupByFactor.strNcFilePath = "" Me.ucrReceiverSkimrGroupByFactor.TabIndex = 32 Me.ucrReceiverSkimrGroupByFactor.ucrSelector = Nothing @@ -583,26 +621,27 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrChkOmitMissing.AutoSize = True Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(8, 296) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(25, 444) + Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(143, 23) + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(214, 34) Me.ucrChkOmitMissing.TabIndex = 0 ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(7, 457) - Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveTable.Location = New System.Drawing.Point(23, 686) + Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(399, 24) + Me.ucrSaveTable.Size = New System.Drawing.Size(598, 36) Me.ucrSaveTable.TabIndex = 57 ' 'dlgDescribeTwoVariable ' - 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.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ClientSize = New System.Drawing.Size(482, 548) + Me.ClientSize = New System.Drawing.Size(723, 822) Me.Controls.Add(Me.ucrSaveTable) Me.Controls.Add(Me.grpDisplay) Me.Controls.Add(Me.ucrInputMarginName) @@ -634,6 +673,7 @@ Partial Class dlgDescribeTwoVariable Me.Controls.Add(Me.lblThreeVariableSecondFactor) Me.Controls.Add(Me.ucrChkOmitMissing) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgDescribeTwoVariable" From ccfe12c60e08eefe26721dbd7c78cdc3d9a3469b Mon Sep 17 00:00:00 2001 From: n-thony Date: Thu, 10 Aug 2023 11:26:52 +0300 Subject: [PATCH 20/21] Minor bug fix with save control --- instat/dlgDescribeTwoVariable.Designer.vb | 50 +++++++++++------------ instat/dlgDescribeTwoVariable.vb | 31 +++++++++----- 2 files changed, 46 insertions(+), 35 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index 51a8ff99b8b..7f4d038e0ef 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -98,7 +98,7 @@ Partial Class dlgDescribeTwoVariable Me.rdoThreeVariable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoThreeVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoThreeVariable.Location = New System.Drawing.Point(432, 12) - Me.rdoThreeVariable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoThreeVariable.Margin = New System.Windows.Forms.Padding(4) Me.rdoThreeVariable.Name = "rdoThreeVariable" Me.rdoThreeVariable.Size = New System.Drawing.Size(150, 42) Me.rdoThreeVariable.TabIndex = 26 @@ -110,7 +110,7 @@ Partial Class dlgDescribeTwoVariable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.cmdFormatTable.Location = New System.Drawing.Point(489, 634) - Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4) Me.cmdFormatTable.Name = "cmdFormatTable" Me.cmdFormatTable.Size = New System.Drawing.Size(156, 34) Me.cmdFormatTable.TabIndex = 44 @@ -132,7 +132,7 @@ Partial Class dlgDescribeTwoVariable ' Me.cmdMissingOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.cmdMissingOptions.Location = New System.Drawing.Point(250, 444) - Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4) Me.cmdMissingOptions.Name = "cmdMissingOptions" Me.cmdMissingOptions.Size = New System.Drawing.Size(158, 34) Me.cmdMissingOptions.TabIndex = 46 @@ -170,9 +170,9 @@ Partial Class dlgDescribeTwoVariable Me.grpColumnFactor.Controls.Add(Me.rdoNoColumnFactor) Me.grpColumnFactor.Controls.Add(Me.ucrPnlColumnFactor) Me.grpColumnFactor.Location = New System.Drawing.Point(21, 504) - Me.grpColumnFactor.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpColumnFactor.Margin = New System.Windows.Forms.Padding(4) Me.grpColumnFactor.Name = "grpColumnFactor" - Me.grpColumnFactor.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpColumnFactor.Padding = New System.Windows.Forms.Padding(4) Me.grpColumnFactor.Size = New System.Drawing.Size(382, 146) Me.grpColumnFactor.TabIndex = 51 Me.grpColumnFactor.TabStop = False @@ -195,7 +195,7 @@ Partial Class dlgDescribeTwoVariable ' Me.rdoVariableFactor.AutoSize = True Me.rdoVariableFactor.Location = New System.Drawing.Point(22, 68) - Me.rdoVariableFactor.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoVariableFactor.Margin = New System.Windows.Forms.Padding(4) Me.rdoVariableFactor.Name = "rdoVariableFactor" Me.rdoVariableFactor.Size = New System.Drawing.Size(142, 24) Me.rdoVariableFactor.TabIndex = 51 @@ -207,7 +207,7 @@ Partial Class dlgDescribeTwoVariable ' Me.rdoSummaryVariable.AutoSize = True Me.rdoSummaryVariable.Location = New System.Drawing.Point(22, 34) - Me.rdoSummaryVariable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoSummaryVariable.Margin = New System.Windows.Forms.Padding(4) Me.rdoSummaryVariable.Name = "rdoSummaryVariable" Me.rdoSummaryVariable.Size = New System.Drawing.Size(163, 24) Me.rdoSummaryVariable.TabIndex = 47 @@ -219,7 +219,7 @@ Partial Class dlgDescribeTwoVariable ' Me.rdoNoColumnFactor.AutoSize = True Me.rdoNoColumnFactor.Location = New System.Drawing.Point(22, 99) - Me.rdoNoColumnFactor.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoNoColumnFactor.Margin = New System.Windows.Forms.Padding(4) Me.rdoNoColumnFactor.Name = "rdoNoColumnFactor" Me.rdoNoColumnFactor.Size = New System.Drawing.Size(162, 24) Me.rdoNoColumnFactor.TabIndex = 50 @@ -231,7 +231,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(9, 27) - Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(9) Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(184, 108) Me.ucrPnlColumnFactor.TabIndex = 48 @@ -246,9 +246,9 @@ Partial Class dlgDescribeTwoVariable Me.grpSummaries.Controls.Add(Me.lblBy) Me.grpSummaries.Controls.Add(Me.lblSecondType) Me.grpSummaries.Location = New System.Drawing.Point(17, 328) - Me.grpSummaries.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpSummaries.Margin = New System.Windows.Forms.Padding(4) Me.grpSummaries.Name = "grpSummaries" - Me.grpSummaries.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpSummaries.Padding = New System.Windows.Forms.Padding(4) Me.grpSummaries.Size = New System.Drawing.Size(315, 108) Me.grpSummaries.TabIndex = 39 Me.grpSummaries.TabStop = False @@ -347,7 +347,7 @@ Partial Class dlgDescribeTwoVariable Me.rdoSkim.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSkim.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoSkim.Location = New System.Drawing.Point(143, 12) - Me.rdoSkim.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoSkim.Margin = New System.Windows.Forms.Padding(4) Me.rdoSkim.Name = "rdoSkim" Me.rdoSkim.Size = New System.Drawing.Size(150, 42) Me.rdoSkim.TabIndex = 23 @@ -386,7 +386,7 @@ Partial Class dlgDescribeTwoVariable Me.rdoTwoVariable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoTwoVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoTwoVariable.Location = New System.Drawing.Point(286, 12) - Me.rdoTwoVariable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoTwoVariable.Margin = New System.Windows.Forms.Padding(4) Me.rdoTwoVariable.Name = "rdoTwoVariable" Me.rdoTwoVariable.Size = New System.Drawing.Size(150, 42) Me.rdoTwoVariable.TabIndex = 24 @@ -398,7 +398,7 @@ Partial Class dlgDescribeTwoVariable ' Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.cmdSummaries.Location = New System.Drawing.Point(465, 344) - Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4) Me.cmdSummaries.Name = "cmdSummaries" Me.cmdSummaries.Size = New System.Drawing.Size(180, 34) Me.cmdSummaries.TabIndex = 1 @@ -424,9 +424,9 @@ Partial Class dlgDescribeTwoVariable Me.grpDisplay.Controls.Add(Me.ucrReceiverPercentages) Me.grpDisplay.Controls.Add(Me.ucrChkDisplayAsPercentage) Me.grpDisplay.Location = New System.Drawing.Point(412, 308) - Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4) Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4) Me.grpDisplay.Size = New System.Drawing.Size(291, 172) Me.grpDisplay.TabIndex = 56 Me.grpDisplay.TabStop = False @@ -437,7 +437,7 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkPercentageProportion.AutoSize = True Me.ucrChkPercentageProportion.Checked = False Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(18, 126) - Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(214, 51) Me.ucrChkPercentageProportion.TabIndex = 57 @@ -471,7 +471,7 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkDisplayAsPercentage.AutoSize = True Me.ucrChkDisplayAsPercentage.Checked = False Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(18, 26) - Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(214, 51) Me.ucrChkDisplayAsPercentage.TabIndex = 54 @@ -483,7 +483,7 @@ Partial Class dlgDescribeTwoVariable Me.ucrInputMarginName.IsMultiline = False Me.ucrInputMarginName.IsReadOnly = False Me.ucrInputMarginName.Location = New System.Drawing.Point(171, 477) - Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(14, 14, 14, 14) + Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(14) Me.ucrInputMarginName.Name = "ucrInputMarginName" Me.ucrInputMarginName.Size = New System.Drawing.Size(206, 32) Me.ucrInputMarginName.TabIndex = 55 @@ -491,7 +491,7 @@ Partial Class dlgDescribeTwoVariable 'ucrReorderSummary ' Me.ucrReorderSummary.Location = New System.Drawing.Point(412, 387) - Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(9) Me.ucrReorderSummary.Name = "ucrReorderSummary" Me.ucrReorderSummary.Size = New System.Drawing.Size(291, 234) Me.ucrReorderSummary.TabIndex = 52 @@ -503,7 +503,7 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkDisplayMargins.AutoSize = True Me.ucrChkDisplayMargins.Checked = False Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(25, 444) - Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(214, 34) Me.ucrChkDisplayMargins.TabIndex = 53 @@ -513,7 +513,7 @@ Partial Class dlgDescribeTwoVariable Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrBase.Location = New System.Drawing.Point(23, 734) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(6) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(611, 77) Me.ucrBase.TabIndex = 43 @@ -586,7 +586,7 @@ Partial Class dlgDescribeTwoVariable ' Me.ucrPnlDescribe.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrPnlDescribe.Location = New System.Drawing.Point(138, 4) - Me.ucrPnlDescribe.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrPnlDescribe.Margin = New System.Windows.Forms.Padding(9) Me.ucrPnlDescribe.Name = "ucrPnlDescribe" Me.ucrPnlDescribe.Size = New System.Drawing.Size(476, 51) Me.ucrPnlDescribe.TabIndex = 22 @@ -622,7 +622,7 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkOmitMissing.AutoSize = True Me.ucrChkOmitMissing.Checked = False Me.ucrChkOmitMissing.Location = New System.Drawing.Point(25, 444) - Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" Me.ucrChkOmitMissing.Size = New System.Drawing.Size(214, 34) Me.ucrChkOmitMissing.TabIndex = 0 @@ -673,7 +673,7 @@ Partial Class dlgDescribeTwoVariable Me.Controls.Add(Me.lblThreeVariableSecondFactor) Me.Controls.Add(Me.ucrChkOmitMissing) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgDescribeTwoVariable" diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index e69f9299662..fcf36e3f9a3 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -167,7 +167,7 @@ Public Class dlgDescribeTwoVariable ucrReceiverColumnFactor.Selector = ucrSelectorDescribeTwoVar ucrReceiverColumnFactor.SetDataType("factor") - ucrSaveTable.SetPrefix("summary_table") + 'ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetDataFrameSelector(ucrSelectorDescribeTwoVar.ucrAvailableDataFrames) ucrSaveTable.SetIsTextBox() @@ -348,6 +348,7 @@ Public Class dlgDescribeTwoVariable clsThreeVariableCombineFrequencyParametersFunction.SetRCommand("c") + ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) bResetSubdialog = True End Sub @@ -363,7 +364,7 @@ Public Class dlgDescribeTwoVariable ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1) ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) - ucrSaveTable.AddAdditionalRCode(clsGroupByPipeOperator, iAdditionalPairNo:=1) + ucrSaveTable.AddAdditionalRCode(clsJoiningPipeOperator, iAdditionalPairNo:=1) ucrChkOmitMissing.SetRCode(clsSummaryTableFunction, bReset) ucrReceiverFirstVars.SetRCode(clsSummaryTableFunction, bReset) @@ -379,7 +380,7 @@ Public Class dlgDescribeTwoVariable ucrReceiverThreeVariableThirdVariable.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrPnlColumnFactor.SetRCode(clsDummyFunction, bReset) ucrChkDisplayMargins.SetRCode(clsCombineFrequencyParametersFunction, bReset) - ucrSaveTable.SetRCode(clsJoiningPipeOperator, bReset) + ucrSaveTable.SetRCode(clsGroupByPipeOperator, bReset) bRcodeSet = True FillListView() @@ -465,16 +466,16 @@ Public Class dlgDescribeTwoVariable clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) ucrSaveTable.Visible = True - 'ucrSaveTable.SetPrefix("summary_table") + ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetSaveType(RObjectTypeLabel.Summary, strRObjectFormat:=RObjectFormat.Text) ucrSaveTable.SetAssignToIfUncheckedValue("last_summary") ucrSaveTable.SetCheckBoxText("Save Summary") ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) - 'clsGroupByPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary", - ' strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary, - ' strRObjectFormatToAssignTo:=RObjectFormat.Text, - ' strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, - ' strObjectName:="last_summary") + clsGroupByPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary, + strRObjectFormatToAssignTo:=RObjectFormat.Text, + strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + strObjectName:="last_summary") ElseIf rdoTwoVariable.Checked Then clsDummyFunction.AddParameter("checked", "customize", iPosition:=0) @@ -492,6 +493,11 @@ Public Class dlgDescribeTwoVariable ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") + clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Text, + strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + strObjectName:="last_table") ElseIf IsFactorByFactor() Then ucrSaveTable.Visible = True clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=1) @@ -500,6 +506,11 @@ Public Class dlgDescribeTwoVariable ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrSaveTable.SetCheckBoxText("Save Table") + clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Text, + strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + strObjectName:="last_table") End If ElseIf rdoThreeVariable.Checked Then clsDummyFunction.AddParameter("checked", "three_variable", iPosition:=0) @@ -581,7 +592,7 @@ Public Class dlgDescribeTwoVariable lblSecondType.Location = New Point(12, 33) lblSecondBy.Visible = True Else - ucrSaveTable.Location = New Point(10, 457) + ucrSaveTable.Location = New Point(23, 686) ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) lblThreeVariableCategorical.Visible = False lblThreeVariableCategorical.Location = New Point(12, 33) From 2f3bd658c4984d03307dbaff1553c709965e9953 Mon Sep 17 00:00:00 2001 From: n-thony Date: Thu, 10 Aug 2023 14:06:13 +0300 Subject: [PATCH 21/21] minor change --- instat/dlgDescribeTwoVariable.Designer.vb | 98 +++++++++++------------ instat/dlgDescribeTwoVariable.vb | 4 +- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index 7f4d038e0ef..7c5ce7f72bb 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -45,11 +45,9 @@ Partial Class dlgDescribeTwoVariable Me.lbSecondVariable = New System.Windows.Forms.Label() Me.lblFirstVariable = New System.Windows.Forms.Label() Me.grpColumnFactor = New System.Windows.Forms.GroupBox() - Me.ucrReceiverColumnFactor = New instat.ucrReceiverSingle() Me.rdoVariableFactor = New System.Windows.Forms.RadioButton() Me.rdoSummaryVariable = New System.Windows.Forms.RadioButton() Me.rdoNoColumnFactor = New System.Windows.Forms.RadioButton() - Me.ucrPnlColumnFactor = New instat.UcrPanel() Me.grpSummaries = New System.Windows.Forms.GroupBox() Me.lblFirstType = New System.Windows.Forms.Label() Me.lblSecondBy = New System.Windows.Forms.Label() @@ -66,13 +64,16 @@ Partial Class dlgDescribeTwoVariable Me.cmdSummaries = New System.Windows.Forms.Button() Me.lblMarginName = New System.Windows.Forms.Label() Me.grpDisplay = New System.Windows.Forms.GroupBox() - Me.ucrChkPercentageProportion = New instat.ucrCheck() Me.lblFactorAsPercentage = New System.Windows.Forms.Label() + Me.ucrSaveTable = New instat.ucrSave() + Me.ucrChkPercentageProportion = New instat.ucrCheck() Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() Me.ucrInputMarginName = New instat.ucrInputTextBox() Me.ucrReorderSummary = New instat.ucrReorder() Me.ucrChkDisplayMargins = New instat.ucrCheck() + Me.ucrReceiverColumnFactor = New instat.ucrReceiverSingle() + Me.ucrPnlColumnFactor = New instat.UcrPanel() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverThreeVariableThirdVariable = New instat.ucrReceiverSingle() Me.ucrReceiverSecondSkimrGroupByFactor = New instat.ucrReceiverSingle() @@ -83,7 +84,6 @@ Partial Class dlgDescribeTwoVariable Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() Me.ucrReceiverSkimrGroupByFactor = New instat.ucrReceiverSingle() Me.ucrChkOmitMissing = New instat.ucrCheck() - Me.ucrSaveTable = New instat.ucrSave() Me.grpColumnFactor.SuspendLayout() Me.grpSummaries.SuspendLayout() Me.grpDisplay.SuspendLayout() @@ -142,7 +142,7 @@ Partial Class dlgDescribeTwoVariable 'lbSecondVariable ' Me.lbSecondVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lbSecondVariable.Location = New System.Drawing.Point(472, 225) + Me.lbSecondVariable.Location = New System.Drawing.Point(465, 225) Me.lbSecondVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lbSecondVariable.Name = "lbSecondVariable" Me.lbSecondVariable.Size = New System.Drawing.Size(150, 22) @@ -154,7 +154,7 @@ Partial Class dlgDescribeTwoVariable ' Me.lblFirstVariable.AutoSize = True Me.lblFirstVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstVariable.Location = New System.Drawing.Point(472, 74) + Me.lblFirstVariable.Location = New System.Drawing.Point(465, 74) Me.lblFirstVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFirstVariable.Name = "lblFirstVariable" Me.lblFirstVariable.Size = New System.Drawing.Size(114, 20) @@ -178,19 +178,6 @@ Partial Class dlgDescribeTwoVariable Me.grpColumnFactor.TabStop = False Me.grpColumnFactor.Text = "Columns" ' - 'ucrReceiverColumnFactor - ' - Me.ucrReceiverColumnFactor.AutoSize = True - Me.ucrReceiverColumnFactor.frmParent = Me - Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(198, 64) - Me.ucrReceiverColumnFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverColumnFactor.Name = "ucrReceiverColumnFactor" - Me.ucrReceiverColumnFactor.Selector = Nothing - Me.ucrReceiverColumnFactor.Size = New System.Drawing.Size(178, 30) - Me.ucrReceiverColumnFactor.strNcFilePath = "" - Me.ucrReceiverColumnFactor.TabIndex = 52 - Me.ucrReceiverColumnFactor.ucrSelector = Nothing - ' 'rdoVariableFactor ' Me.rdoVariableFactor.AutoSize = True @@ -227,15 +214,6 @@ Partial Class dlgDescribeTwoVariable 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(9, 27) - Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(9) - Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" - Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(184, 108) - Me.ucrPnlColumnFactor.TabIndex = 48 - ' 'grpSummaries ' Me.grpSummaries.Controls.Add(Me.lblFirstType) @@ -358,7 +336,7 @@ Partial Class dlgDescribeTwoVariable 'lblThirdVariable ' Me.lblThirdVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblThirdVariable.Location = New System.Drawing.Point(472, 286) + Me.lblThirdVariable.Location = New System.Drawing.Point(465, 286) Me.lblThirdVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblThirdVariable.Name = "lblThirdVariable" Me.lblThirdVariable.Size = New System.Drawing.Size(231, 22) @@ -432,16 +410,6 @@ Partial Class dlgDescribeTwoVariable Me.grpDisplay.TabStop = False Me.grpDisplay.Text = "Percentages" ' - 'ucrChkPercentageProportion - ' - Me.ucrChkPercentageProportion.AutoSize = True - Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(18, 126) - Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9) - Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(214, 51) - Me.ucrChkPercentageProportion.TabIndex = 57 - ' 'lblFactorAsPercentage ' Me.lblFactorAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl @@ -453,10 +421,29 @@ Partial Class dlgDescribeTwoVariable Me.lblFactorAsPercentage.Tag = "" Me.lblFactorAsPercentage.Text = "Factor as Percentage:" ' + 'ucrSaveTable + ' + Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveTable.Location = New System.Drawing.Point(23, 676) + Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrSaveTable.Name = "ucrSaveTable" + Me.ucrSaveTable.Size = New System.Drawing.Size(598, 36) + Me.ucrSaveTable.TabIndex = 57 + ' + 'ucrChkPercentageProportion + ' + Me.ucrChkPercentageProportion.AutoSize = True + Me.ucrChkPercentageProportion.Checked = False + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(18, 126) + Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(214, 51) + Me.ucrChkPercentageProportion.TabIndex = 57 + ' 'ucrReceiverPercentages ' Me.ucrReceiverPercentages.AutoSize = True - Me.ucrReceiverPercentages.frmParent = Me + Me.ucrReceiverPercentages.frmParent = Nothing Me.ucrReceiverPercentages.Location = New System.Drawing.Point(18, 86) Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" @@ -508,6 +495,28 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(214, 34) Me.ucrChkDisplayMargins.TabIndex = 53 ' + 'ucrReceiverColumnFactor + ' + Me.ucrReceiverColumnFactor.AutoSize = True + Me.ucrReceiverColumnFactor.frmParent = Nothing + Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(198, 64) + Me.ucrReceiverColumnFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverColumnFactor.Name = "ucrReceiverColumnFactor" + Me.ucrReceiverColumnFactor.Selector = Nothing + Me.ucrReceiverColumnFactor.Size = New System.Drawing.Size(178, 30) + Me.ucrReceiverColumnFactor.strNcFilePath = "" + Me.ucrReceiverColumnFactor.TabIndex = 52 + Me.ucrReceiverColumnFactor.ucrSelector = Nothing + ' + 'ucrPnlColumnFactor + ' + Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(9, 27) + Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(9) + Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" + Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(184, 108) + Me.ucrPnlColumnFactor.TabIndex = 48 + ' 'ucrBase ' Me.ucrBase.AutoSize = True @@ -627,15 +636,6 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkOmitMissing.Size = New System.Drawing.Size(214, 34) Me.ucrChkOmitMissing.TabIndex = 0 ' - 'ucrSaveTable - ' - Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(23, 686) - Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(598, 36) - Me.ucrSaveTable.TabIndex = 57 - ' 'dlgDescribeTwoVariable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index fcf36e3f9a3..32eb429a32a 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -584,7 +584,7 @@ Public Class dlgDescribeTwoVariable If rdoSkim.Checked Then ucrReceiverFirstVars.SetSingleTypeStatus(False) - ucrSaveTable.Location = New Point(10, 286) + ucrSaveTable.Location = New Point(23, 286) ElseIf rdoThreeVariable.Checked Then ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) lblThreeVariableCategorical.Visible = True @@ -592,7 +592,7 @@ Public Class dlgDescribeTwoVariable lblSecondType.Location = New Point(12, 33) lblSecondBy.Visible = True Else - ucrSaveTable.Location = New Point(23, 686) + ucrSaveTable.Location = New Point(23, 450) ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) lblThreeVariableCategorical.Visible = False lblThreeVariableCategorical.Location = New Point(12, 33)