Skip to content

Commit

Permalink
Merge pull request #9 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
Update master
  • Loading branch information
MeSophie authored Sep 6, 2022
2 parents e86d6d8 + 6edacd1 commit cb5a3c4
Show file tree
Hide file tree
Showing 9 changed files with 182 additions and 161 deletions.
1 change: 0 additions & 1 deletion instat/dlgClimaticCheckDataTemperature.vb
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,6 @@ Public Class dlgClimaticCheckDataTemperature
If ucrReceiverElement1.IsEmpty OrElse ucrReceiverElement2.IsEmpty Then
ucrChkDifference.Enabled = False
ucrNudDifference.Enabled = False
ucrChkDifference.Checked = False
Else
ucrChkDifference.Enabled = True
ucrNudDifference.Enabled = True
Expand Down
26 changes: 13 additions & 13 deletions instat/dlgLinePlot.vb
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,12 @@ Public Class dlgLinePlot
ucrChkSlopeLegend.AddParameterPresentCondition(True, "slopetheme")
ucrChkSlopeLegend.AddParameterPresentCondition(False, "slopetheme", False)

ucrPnlOptions.AddToLinkedControls({ucrReceiverGroup}, {rdoLine, rdoSmoothing}, bNewLinkedHideIfParameterMissing:=True)
ucrPnlOptions.AddToLinkedControls({ucrChkPathOrStep, ucrChkPeak, ucrChkValley, ucrChkWithSE, ucrChkLineofBestFit}, {rdoLine}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlOptions.AddToLinkedControls({ucrChkAddLine, ucrInputMethod, ucrInputFormula}, {rdoSmoothing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlOptions.AddToLinkedControls({ucrChkAddSE, ucrChkFormula, ucrChkSpan}, {rdoSmoothing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="FALSE")
ucrPnlOptions.AddToLinkedControls({ucrReceiverXEnd, ucrChkDumbbellColour, ucrChkDumbbellSize}, {rdoDumbbell}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlOptions.AddToLinkedControls({ucrReceiverGroup, ucrChkAddPoints}, {rdoLine, rdoSmoothing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlOptions.AddToLinkedControls({ucrChkAddPoints}, {rdoLine, rdoSmoothing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlOptions.AddToLinkedControls({ucrFactorOptionalReceiver}, {rdoLine, rdoSmoothing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlOptions.AddToLinkedControls({ucrReceiverSlopeY}, {rdoDumbbell, rdoSlope}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlOptions.AddToLinkedControls({ucrReceiverX}, {rdoLine, rdoDumbbell, rdoSmoothing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
Expand Down Expand Up @@ -435,7 +436,7 @@ Public Class dlgLinePlot
clsRaesFunction = New RFunction
clsBaseOperator = New ROperator
clsListFunction = New RFunction
clsggSlopeFunction = New RFunction
clsGgSlopeFunction = New RFunction
clsSlopeThemeFunction = New RFunction
clsDumbbellFunction = New RFunction

Expand Down Expand Up @@ -470,8 +471,8 @@ Public Class dlgLinePlot
clsDumbbellFunction.SetPackageName("ggalt")
clsDumbbellFunction.SetRCommand("geom_dumbbell")

clsggSlopeFunction.SetRCommand("slopegraph")
clsggSlopeFunction.AddParameter("data", clsRFunctionParameter:=ucrLinePlotSelector.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
clsGgSlopeFunction.SetRCommand("slopegraph")
clsGgSlopeFunction.AddParameter("data", clsRFunctionParameter:=ucrLinePlotSelector.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)

clsSlopeThemeFunction.SetRCommand("slopegraph_theme")

Expand Down Expand Up @@ -503,18 +504,17 @@ Public Class dlgLinePlot
End Sub

Public Sub SetRCodeForControls(bReset As Boolean)
ucrFactorOptionalReceiver.AddAdditionalCodeParameterPair(clsggSlopeFunction, New RParameter("colour", iNewPosition:=3), iAdditionalPairNo:=1)
ucrFactorOptionalReceiver.AddAdditionalCodeParameterPair(clsGgSlopeFunction, New RParameter("colour", iNewPosition:=3), iAdditionalPairNo:=1)
ucrReceiverSlopeY.AddAdditionalCodeParameterPair(clsRaesFunction, New RParameter("y", iNewPosition:=1), iAdditionalPairNo:=1)

ucrLinePlotSelector.SetRCode(clsRggplotFunction, bReset)
ucrReceiverX.SetRCode(clsRaesFunction, bReset)
ucrReceiverSlopeY.SetRCode(clsggSlopeFunction, bReset)
ucrReceiverSlopeX.SetRCode(clsggSlopeFunction, bReset)
ucrReceiverSlopeColour.SetRCode(clsggSlopeFunction, bReset)
ucrReceiverSlopeY.SetRCode(clsGgSlopeFunction, bReset)
ucrReceiverSlopeX.SetRCode(clsGgSlopeFunction, bReset)
ucrReceiverSlopeColour.SetRCode(clsGgSlopeFunction, bReset)
ucrReceiverXEnd.SetRCode(clsRaesFunction, bReset)
ucrVariablesAsFactorForLinePlot.SetRCode(clsRaesFunction, bReset)
ucrFactorOptionalReceiver.SetRCode(clsRaesFunction, bReset)
ucrReceiverGroup.SetRCode(clsRaesFunction, bReset)
ucrSave.SetRCode(clsBaseOperator, bReset)
ucrChkLineofBestFit.SetRCode(clsBaseOperator, bReset)
ucrChkAddPoints.SetRCode(clsBaseOperator, bReset)
Expand All @@ -531,9 +531,9 @@ Public Class dlgLinePlot
ucrChkFormula.SetRCode(clsBaseOperator, bReset)
ucrChkDumbbellColour.SetRCode(clsDumbbellFunction, bReset)
ucrChkDumbbellSize.SetRCode(clsDumbbellFunction, bReset)
ucrChkSlopeLabelOptions.SetRCode(clsggSlopeFunction, bReset)
ucrChkSlopeTextOptions.SetRCode(clsggSlopeFunction, bReset)
ucrChkSlopeLineOptions.SetRCode(clsggSlopeFunction, bReset)
ucrChkSlopeLabelOptions.SetRCode(clsGgSlopeFunction, bReset)
ucrChkSlopeTextOptions.SetRCode(clsGgSlopeFunction, bReset)
ucrChkSlopeLineOptions.SetRCode(clsGgSlopeFunction, bReset)
End Sub

Private Sub TestOkEnabled()
Expand Down Expand Up @@ -679,7 +679,7 @@ Public Class dlgLinePlot
ucrSave.SetPrefix("slope")
clsBaseOperator.RemoveParameterByName("ggplot")
clsBaseOperator.RemoveParameterByName(strFirstParameterName)
clsBaseOperator.AddParameter("slopeplot", clsRFunctionParameter:=clsggSlopeFunction, iPosition:=0)
clsBaseOperator.AddParameter("slopeplot", clsRFunctionParameter:=clsGgSlopeFunction, iPosition:=0)
If ucrChkSlopeLegend.Checked Then
clsBaseOperator.RemoveParameterByName("slopetheme")
Else
Expand Down
8 changes: 5 additions & 3 deletions instat/dlgOneVariableSummarise.vb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Public Class dlgOneVariableSummarise
Private bResetSubdialog As Boolean = False
Public strDefaultDataFrame As String = ""
Public strDefaultColumns() As String = Nothing
Private Const iMaxSum = 12

Private Sub dlgOneVariableSummarise_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
Expand Down Expand Up @@ -60,7 +61,7 @@ Public Class dlgOneVariableSummarise
ucrReceiverOneVarSummarise.SetMeAsReceiver()

ucrNudMaxSum.SetParameter(New RParameter("maxsum", 2))
ucrNudMaxSum.SetRDefault("7")
ucrNudMaxSum.SetMinMax(iMaxSum, Integer.MaxValue)
ucrNudMaxSum.SetLinkedDisplayControl(lblMaxSum)

ucrPnlSummaries.AddRadioButton(rdoDefault)
Expand All @@ -69,7 +70,8 @@ Public Class dlgOneVariableSummarise
ucrPnlSummaries.AddParameterValuesCondition(rdoCustomised, "checked_radio", "customised")
ucrPnlSummaries.AddParameterValuesCondition(rdoDefault, "checked_radio", "defaults")
ucrPnlSummaries.AddParameterValuesCondition(rdoSkim, "checked_radio", "skim")
ucrPnlSummaries.AddToLinkedControls(ucrNudMaxSum, {rdoDefault}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlSummaries.AddToLinkedControls(ucrNudMaxSum, {rdoDefault}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True,
bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=iMaxSum)
ucrPnlSummaries.AddToLinkedControls({ucrChkOmitMissing, ucrChkDisplaySummariesAsRows, ucrChkDisplayVariablesAsRows, ucrChkDisplayMargins},
{rdoCustomised}, bNewLinkedHideIfParameterMissing:=True)

Expand Down Expand Up @@ -158,7 +160,7 @@ Public Class dlgOneVariableSummarise
clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False)

clsSummaryFunction.SetRCommand("summary")
clsSummaryFunction.AddParameter("maxsum", 7)
clsSummaryFunction.AddParameter("maxsum", iMaxSum)
clsSummaryFunction.AddParameter("na.rm", "FALSE", iPosition:=3)

clsSummaryTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table")
Expand Down
Loading

0 comments on commit cb5a3c4

Please sign in to comment.