Skip to content

Commit

Permalink
Merge pull request #48 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
Updating from Master
  • Loading branch information
EstherNjeriLiberatta authored May 6, 2022
2 parents d55bca2 + af5f43c commit 2ded6c2
Show file tree
Hide file tree
Showing 55 changed files with 1,385 additions and 638 deletions.
34 changes: 20 additions & 14 deletions instat/Model/Output/clsOutputElement.vb
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,27 @@ Public Class clsOutputElement
''' </summary>
''' <param name="strScript"></param>
Public Sub AddScript(strScript As String)
Dim rScript As New clsRScript(strScript)
Dim lstTokens As List(Of clsRToken) = rScript.GetLstTokens(rScript.GetLstLexemes(strScript)) 'rScript.lstTokens
Try
Dim rScript As New clsRScript(strScript)
Dim lstTokens As List(Of clsRToken) = rScript.GetLstTokens(rScript.GetLstLexemes(strScript)) 'rScript.lstTokens

If lstTokens Is Nothing Then
Exit Sub
End If

For Each rToken In lstTokens
_formattedRScript.Add(New clsRScriptElement With
{
.Text = rToken.strTxt,
.Type = rToken.enuToken
})
Next
_outputType = OutputType.Script
If lstTokens IsNot Nothing Then
For Each rToken In lstTokens
_formattedRScript.Add(New clsRScriptElement With
{
.Text = rToken.strTxt,
.Type = rToken.enuToken
})
Next
_outputType = OutputType.Script
End If
Catch ex As Exception
MessageBox.Show("Unable to parse the following R Script: '" & strScript & "'." &
Environment.NewLine & ex.Message,
"Developer Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
End Sub

''' <summary>
Expand Down
2 changes: 1 addition & 1 deletion instat/dlgAddComment.vb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Public Class dlgAddComment
Private strSelectedColumn As String = ""
Public bFirstLoad As Boolean = True
Private bReset As Boolean = True
Private clsAddComment As RFunction
Private clsAddComment As New RFunction

Private Sub dlgAddComment_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
Expand Down
2 changes: 1 addition & 1 deletion instat/dlgAddLink.vb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Imports RDotNet
Public Class dlgAddLink
Private bFirstLoad As Boolean = True
Private bReset As Boolean = True
Private clsAddLink As RFunction
Private clsAddLink As New RFunction

Private Sub dlgAddLink_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
Expand Down
6 changes: 3 additions & 3 deletions instat/dlgCircularDensityPlot.vb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Imports instat.Translations
Public Class dlgCircularDensityPlot
Private bFirstLoad As Boolean = True
Private bReset As Boolean = True
Private clsDensityFunction As RFunction
Private clsRecordGraphFunction As RFunction
Private clsDensityPlotFunction, clsRosePlotFunction, clsScatterPlotFunction As RFunction
Private clsDensityFunction As New RFunction
Private clsRecordGraphFunction As New RFunction
Private clsDensityPlotFunction, clsRosePlotFunction, clsScatterPlotFunction As New RFunction
Private Sub dlgCircularDensityPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
InitialiseDialog()
Expand Down
11 changes: 6 additions & 5 deletions instat/dlgClimaticStationMaps.vb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Imports RDotNet
Public Class dlgClimaticStationMaps
Private bFirstLoad As Boolean = True
Private bReset As Boolean = True
Private clsGgplotFunction, clsGeomSfFunction, clsGeomPointFunction, clsSfAesFunction, clsGeomPointAesFunction, clsScaleShapeFunction, clsLabelRepelFunction As RFunction
Private clsGgplotFunction, clsGeomSfFunction, clsGeomPointFunction, clsSfAesFunction, clsGeomPointAesFunction, clsScaleShapeFunction, clsLabelRepelFunction As New RFunction
Private clsGGplotOperator, clsFacetOp As New ROperator

Private clsLabsFunction As New RFunction
Expand All @@ -36,14 +36,14 @@ Public Class dlgClimaticStationMaps
Private bResetSubdialog As Boolean = True
Private bResetSFLayerSubdialog As Boolean = True
Private clsLabelRepelAesFunction As New RFunction
Private clsCoordPolarFunction As RFunction
Private clsCoordPolarStartOperator As ROperator
Private clsCoordPolarFunction As New RFunction
Private clsCoordPolarStartOperator As New ROperator
Private clsXScaleDateFunction As New RFunction
Private clsYScaleDateFunction As New RFunction
Private clsScaleFillViridisFunction As New RFunction
Private clsScaleColourViridisFunction As New RFunction
Private clsAnnotateFunction As New RFunction
Private clsGetDataFrame As RFunction
Private clsGetDataFrame As New RFunction
Private clsRemoveFunc As New RFunction
Private clsParamOperator As New ROperator

Expand Down Expand Up @@ -224,7 +224,8 @@ Public Class dlgClimaticStationMaps
clsScaleColourViridisFunction = GgplotDefaults.clsScaleColorViridisFunction
clsAnnotateFunction = GgplotDefaults.clsAnnotateFunction

clsRFacetFunction.AddParameter("facet", clsROperatorParameter:=clsFacetOp, bIncludeArgumentName:=False)
clsRFacetFunction.RemoveParameterByName("facets")
clsRFacetFunction.AddParameter("facets", clsROperatorParameter:=clsFacetOp)

clsXlimFunction.SetRCommand("xlim")
clsYlimFunction.SetRCommand("ylim")
Expand Down
2 changes: 1 addition & 1 deletion instat/dlgClimsoftWizard.vb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Public Class dlgClimsoftWizard

'used as the R command by the 2 wizard steps. import stations and import elements data
'this is also be used as the base function
Private clsRImportFromClimsoft As RFunction
Private clsRImportFromClimsoft As New RFunction

'holds all the wizard steps objects, used in going from step to step
Private lstWizardSteps As New List(Of IWizStep)
Expand Down
4 changes: 2 additions & 2 deletions instat/dlgDefineOptionsByContext.vb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Imports instat.Translations
Public Class dlgDefineOptionsByContext
Private bFirstLoad As Boolean = True
Private bReset As Boolean = True
Private clsDefineOptionsByContext As RFunction
Private clsTypes As RFunction
Private clsDefineOptionsByContext As New RFunction
Private clsTypes As New RFunction
Private bDefaultsSet As Boolean = True

Private Sub dlgDefineOptionsByContext_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Expand Down
Loading

0 comments on commit 2ded6c2

Please sign in to comment.