Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially Fixes Duplicates Dialogue #7305

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 48 additions & 48 deletions instat/dlgDuplicates.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions instat/dlgDuplicates.vb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Public Class dlgDuplicates
ucrPnlDuplicates.AddRadioButton(rdoDuplicatesOnly)
ucrPnlDuplicates.AddRadioButton(rdoIndexNumberOfDuplicates)

ucrPnlDuplicates.AddToLinkedControls(ucrInputComboType, {rdoIndexNumberOfDuplicates}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlDuplicates.AddToLinkedControls(ucrInputComboType, {rdoIndexNumberOfDuplicates}, bNewLinkedHideIfParameterMissing:=True)
ucrInputComboType.SetLinkedDisplayControl(lblType)

ucrPnlDuplicates.AddFunctionNamesCondition(rdoAllDuplicateCases, "duplicated2")
Expand Down Expand Up @@ -114,9 +114,8 @@ Public Class dlgDuplicates
ucrInputConditions.SetDropDownStyleAsNonEditable()

ucrInputComboType.SetParameter(New RParameter("type"))
dctType.Add("Count", Chr(34) & "count" & Chr(34))
dctType.Add("Index", Chr(34) & "index" & Chr(34))
ucrInputComboType.SetRDefault(Chr(34) & "count" & Chr(34))
dctType.Add("Count", Chr(34) & "count" & Chr(34))
ucrInputComboType.SetDropDownStyleAsNonEditable()
ucrInputComboType.SetItems(dctType)

Expand Down Expand Up @@ -156,6 +155,7 @@ Public Class dlgDuplicates
clsStreakFunction.AddParameter("ignore", "NULL")

clsDupCountIndex.SetRCommand("duplicated_count_index")
clsDupCountIndex.AddParameter("type", Chr(34) & "index" & Chr(34))

clsGetColumnsFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data")

Expand All @@ -166,7 +166,7 @@ Public Class dlgDuplicates
clsSubsetCol.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data")
ucrBase.clsRsyntax.ClearCodes()
ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrNewColumnName.GetText, strTempDataframe:=ucrSelectorDuplicateswithVariables.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrNewColumnName.GetText)
ucrBase.clsRsyntax.SetBaseRFunction(clsDuplicated2)
ucrBase.clsRsyntax.SetBaseRFunction(clsDuplicated)
ucrBase.clsRsyntax.AddToAfterCodes(clsSummaryFunction, iPosition:=0)
End Sub

Expand Down Expand Up @@ -251,17 +251,17 @@ Public Class dlgDuplicates
End Sub

Private Sub SetDataFrameOrColumns()
If rdoDataFrame.Checked Then
If rdoSelectedVariables.Checked Then
ucrReceiverForSelectedVariables.SetMeAsReceiver()
ucrReceiverForSelectedVariables.SetParameterIsRFunction()
ucrSelectorDuplicateswithVariables.SetVariablesVisible(True)
ElseIf rdoDataFrame.Checked Then
ucrSelectorDuplicateswithVariables.SetVariablesVisible(False)
ucrSelectorDuplicateswithVariables.SetParameterIsrfunction()
' note that we have to run this here because the parameter x is used for both functions and all four radio buttons
clsDuplicated.AddParameter("x", clsRFunctionParameter:=ucrSelectorDuplicateswithVariables.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
clsDuplicated2.AddParameter("x", clsRFunctionParameter:=ucrSelectorDuplicateswithVariables.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
clsDupCountIndex.AddParameter("x", clsRFunctionParameter:=ucrSelectorDuplicateswithVariables.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
ElseIf rdoSelectedVariables.Checked Then
ucrReceiverForSelectedVariables.SetMeAsReceiver()
ucrReceiverForSelectedVariables.SetParameterIsRFunction()
ucrSelectorDuplicateswithVariables.SetVariablesVisible(True)
ElseIf rdoSuccessiveValues.Checked Then
ucrReceiverForSuccessiveValues.SetMeAsReceiver()
ucrSelectorDuplicateswithVariables.SetParameterIsString()
Expand Down