Skip to content

Commit

Permalink
Merge pull request #101 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
Update main branch
  • Loading branch information
stevekogo authored Jul 3, 2016
2 parents a0e461d + 933fdbd commit edf4552
Show file tree
Hide file tree
Showing 9 changed files with 425 additions and 426 deletions.
2 changes: 2 additions & 0 deletions instat/dlgBoxPlot.vb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Public Class dlgBoxplot
ucrSecondFactorReceiver.SetIncludedDataTypes({"factor"})

sdgLayerOptions.SetRSyntax(ucrBase.clsRsyntax)
sdgPlots.SetRSyntax(ucrBase.clsRsyntax)

ucrVariablesAsFactorForBoxplot.SetFactorReceiver(ucrByFactorsReceiver)
ucrVariablesAsFactorForBoxplot.SetSelector(ucrSelectorBoxPlot)
Expand All @@ -91,6 +92,7 @@ Public Class dlgBoxplot
ucrBase.OKEnabled(True)
End If
End Sub

Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click
sdgPlots.ShowDialog()
End Sub
Expand Down
1 change: 1 addition & 0 deletions instat/dlgMetadata.vb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Public Class dlgMetadata
End Sub

Private Sub chkRevertBack_CheckStateChanged(sender As Object, e As EventArgs) Handles chkRevertBack.CheckStateChanged
'this doesn't look right to me DAS
If chkRevertBack.Checked Then
ucrInputViewDataBy.txtReceiverSingle.Text = "Name"
ucrInputViewDataBy.Enabled = False
Expand Down
43 changes: 27 additions & 16 deletions instat/dlgRownamesOrNumbers.Designer.vb

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

43 changes: 14 additions & 29 deletions instat/dlgRownamesOrNumbers.vb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Public Class dlgRowNamesOrNumbers

ucrReceiverSingleRownamesOrNumbers.Selector = ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers
ucrReceiverSingleRownamesOrNumbers.SetMeAsReceiver()
ucrNewColumnNameforRownamesOrNumbers.Visible = False
txtNewColumnforRowNameOrNumber.Visible = False

End Sub

Expand All @@ -46,8 +46,9 @@ Public Class dlgRowNamesOrNumbers
rdoCopytoFirstColumn.Enabled = True
rdoResetintoPositiveIntegers.Enabled = True
chkDecreasingforRownamesOrNumbers.Visible = False
ucrNewColumnNameforRownamesOrNumbers.Visible = False
txtNewColumnforRowNameOrNumber.Visible = False
chkDecreasingforRownamesOrNumbers.Checked = False

End Sub

Private Sub ucrBaseRownamesOrNumbers_clickReset(sender As Object, e As EventArgs) Handles ucrBaseRownamesorNumbers.ClickReset
Expand All @@ -58,12 +59,9 @@ Public Class dlgRowNamesOrNumbers

Private Sub rdoCopytoFirstColumn_CheckedChanged(sender As Object, e As EventArgs) Handles rdoCopytoFirstColumn.CheckedChanged, rdoCopyfromColumn.CheckedChanged, rdoResetintoPositiveIntegers.CheckedChanged, rdoSortbyRowNamesorNumbers.CheckedChanged

If rdoCopyfromColumn.Checked Then ' done

ucrBaseRownamesorNumbers.clsRsyntax.SetAssignTo("")
ucrBaseRownamesorNumbers.clsRsyntax.ClearParameters()

If rdoCopyfromColumn.Checked Then
ucrNewColumnNameforRownamesOrNumbers.Visible = False
txtNewColumnforRowNameOrNumber.Visible = False
ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers.Enabled = True
ucrReceiverSingleRownamesOrNumbers.Enabled = True
ucrBaseRownamesorNumbers.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$set_row_names")
Expand All @@ -73,30 +71,27 @@ Public Class dlgRowNamesOrNumbers

ElseIf rdoCopytoFirstColumn.Checked Then

ucrNewColumnNameforRownamesOrNumbers.Visible = False
ucrBaseRownamesorNumbers.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$set_row_names")
'ucrBaseRownamesorNumbers.clsRsyntax.SetAssignTo("rownamesfromtextbox_temp", ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers.strCurrentDataFrame, "rownamesfromtextbox")
ucrBaseRownamesorNumbers.clsRsyntax.AddParameter("row_names", clsRFunctionParameter:=ucrReceiverSingleRownamesOrNumbers.GetVariables())
ucrBaseRownamesorNumbers.clsRsyntax.ClearParameters()
txtNewColumnforRowNameOrNumber.Visible = True
ucrBaseRownamesorNumbers.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$get_row_names")
ucrBaseRownamesorNumbers.clsRsyntax.AddParameter("data_name", Chr(34) & ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers.strCurrentDataFrame & Chr(34))

'set prefix parameter

ElseIf rdoCopytoColumnsforRownamesOrNumbers.Checked Then

ucrNewColumnNameforRownamesOrNumbers.Visible = True
ucrBaseRownamesorNumbers.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$set_row_names")
ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers.Enabled = False
txtNewColumnforRowNameOrNumber.Visible = True
ucrBaseRownamesorNumbers.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$get_row_names")
ucrBaseRownamesorNumbers.clsRsyntax.AddParameter("data_name", Chr(34) & ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers.strCurrentDataFrame & Chr(34))
ucrBaseRownamesorNumbers.clsRsyntax.SetAssignTo("rownamesfromtextbox_temp", ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers.strCurrentDataFrame, "rownamesfromtextbox")
ucrBaseRownamesorNumbers.clsRsyntax.SetAssignTo(strAssignToName:=ucrNewColumnNameforRownamesOrNumbers.strCurrNewColumnText, strTempDataframe:=ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers.strCurrentDataFrame, strTempColumn:=ucrNewColumnNameforRownamesOrNumbers.strCurrNewColumnText)
ucrBaseRownamesorNumbers.clsRsyntax.AddParameter("row_names", clsRFunctionParameter:=ucrReceiverSingleRownamesOrNumbers.GetVariables())

ElseIf rdoResetintoPositiveIntegers.Checked Then
ElseIf rdoResetintoPositiveIntegers.Checked Then ' done
ucrBaseRownamesorNumbers.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$set_row_names")
ucrBaseRownamesorNumbers.clsRsyntax.AddParameter("data_name", Chr(34) & ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers.strCurrentDataFrame & Chr(34))
'set parameters

ElseIf rdoSortbyRowNamesorNumbers.Checked Then

ucrNewColumnNameforRownamesOrNumbers.Visible = False
txtNewColumnforRowNameOrNumber.Visible = False
ucrBaseRownamesorNumbers.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$set_row_names")
ucrBaseRownamesorNumbers.clsRsyntax.AddParameter(frmMain.clsRLink.strInstatDataObject & "$sort_dataframe")
chkDecreasingforRownamesOrNumbers.Visible = True
Expand All @@ -105,25 +100,15 @@ Public Class dlgRowNamesOrNumbers

ucrReceiverSingleRownamesOrNumbers.Enabled = False
ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers.Enabled = False


End If


End Sub

Private Sub chkDecreasingforRownamesOrNumbers_CheckedChanged(sender As Object, e As EventArgs) Handles chkDecreasingforRownamesOrNumbers.CheckedChanged

If chkDecreasingforRownamesOrNumbers.Checked Then
ucrBaseRownamesorNumbers.clsRsyntax.AddParameter("decreasing", "TRUE")
Else
ucrBaseRownamesorNumbers.clsRsyntax.AddParameter("decreasing", "FALSE")
End If

End Sub

Private Sub ucrReceiverSingleRownamesOrNumbers_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverSingleRownamesOrNumbers.SelectionChanged
ucrBaseRownamesorNumbers.clsRsyntax.AddParameter("row_names", clsRFunctionParameter:=ucrReceiverSingleRownamesOrNumbers.GetVariables())

End Sub
End Class
Loading

0 comments on commit edf4552

Please sign in to comment.