diff --git a/instat/clsRLink.vb b/instat/clsRLink.vb
index 91b7e41a18d..b5bae7a3a64 100644
--- a/instat/clsRLink.vb
+++ b/instat/clsRLink.vb
@@ -749,8 +749,24 @@ Public Class RLink
bShowWaitDialogOverride:=Nothing)
End If
- clsOutputLogger.AddOutput(clsRStatement.Text, strOutput, bAsFile:=True,
- bDisplayOutputInExternalViewer:=clsRStatement.TextNoFormatting.StartsWith("view_object_data"))
+ ' Split the strOutput into an array of lines, removing empty entries
+ Dim arrFilesPaths() As String = strOutput.Split({Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
+
+ ' Check if arrFilesPaths has at least one element before iterating
+ If arrFilesPaths.Length > 0 Then
+ ' Iterate through each file path
+ For Each _path In arrFilesPaths
+ ' Add output to logger
+ clsOutputLogger.AddOutput(clsRStatement.Text, _path, bAsFile:=True,
+ bDisplayOutputInExternalViewer:=clsRStatement.TextNoFormatting.StartsWith("view_object_data"))
+ Next
+ Else
+ ' Add output to logger
+ clsOutputLogger.AddOutput(clsRStatement.Text, strOutput, bAsFile:=True,
+ bDisplayOutputInExternalViewer:=clsRStatement.TextNoFormatting.StartsWith("view_object_data"))
+ End If
+
+ ' Log the script
LogScript(clsRStatement.Text.TrimEnd(vbCr, vbLf))
Catch e As Exception
@@ -996,9 +1012,23 @@ Public Class RLink
End If
End If
+ If bAsFile Then
+ ' Split the strOutput into an array of lines, removing empty entries
+ Dim arrFilesPaths() As String = strOutput.Split({Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
+ ' Iterate through each HTML files
+ For Each _path In arrFilesPaths
+ ' Add each HTML file as an output to clsOutputLogger
+ ' strScriptWithComment: the script with associated comments
+ ' _path: the path to the HTML file
+ ' bAsFile: a boolean indicating whether the output should be treated as a file
+ ' bDisplayOutputInExternalViewer: a boolean indicating whether to display the output in an external viewer
+ clsOutputLogger.AddOutput(strScriptWithComment, _path, bAsFile, bDisplayOutputInExternalViewer)
+ Next
+ Else
+ ' If strOutput is empty or does not contain valid HTML files, add strOutput itself as an output
+ clsOutputLogger.AddOutput(strScriptWithComment, strOutput, bAsFile, bDisplayOutputInExternalViewer)
+ End If
- 'log script and output
- clsOutputLogger.AddOutput(strScriptWithComment, strOutput, bAsFile, bDisplayOutputInExternalViewer)
Catch e As Exception
MsgBox(e.Message & Environment.NewLine & "The error occurred in attempting to run the following R command(s):" & Environment.NewLine & strScript, MsgBoxStyle.Critical, "Error running R command(s)")
@@ -1020,7 +1050,7 @@ Public Class RLink
'''
''' file path name if file is avaialble and has contents else empty string
Private Function GetFileOutput(strScript As String, bSilent As Boolean, bSeparateThread As Boolean, bShowWaitDialogOverride As Nullable(Of Boolean)) As String
- Dim strFilePath As String = ""
+ Dim strFilesPath As String = ""
Dim strTempAssignTo As String = ".temp_val"
Dim expTemp As RDotNet.SymbolicExpression
Dim strNewAssignedToScript As String = ConstructAssignTo(strTempAssignTo, strScript)
@@ -1029,14 +1059,17 @@ Public Class RLink
expTemp = GetSymbol(strTempAssignTo, bSilent:=True)
Evaluate("rm(" & strTempAssignTo & ")", bSilent:=True)
If expTemp IsNot Nothing Then
- 'get the file path name, check if it exists and whether it has contents
- 'if not, just return empty file path
- strFilePath = String.Join(Environment.NewLine, expTemp.AsCharacter())
- If Not File.Exists(strFilePath) OrElse New FileInfo(strFilePath).Length = 0 Then
- strFilePath = ""
- End If
+ ' Convert CharacterVector to String() array
+ Dim arrFilesPath As String() = expTemp.AsCharacter().Select(Function(x) x.ToString()).ToArray()
+
+ ' Filter out invalid file paths
+ arrFilesPath = arrFilesPath.Where(Function(path) File.Exists(path) AndAlso New FileInfo(path).Length > 0).ToArray()
+
+ ' Join the valid file paths with newline characters
+ strFilesPath = String.Join(Environment.NewLine, arrFilesPath)
End If
- Return strFilePath
+
+ Return strFilesPath
End Function
'''--------------------------------------------------------------------------------------------
diff --git a/instat/clsRSyntax.vb b/instat/clsRSyntax.vb
index 90b4913385d..c73283a7497 100644
--- a/instat/clsRSyntax.vb
+++ b/instat/clsRSyntax.vb
@@ -42,7 +42,15 @@
'''
'''--------------------------------------------------------------------------------------------
Public Class RSyntax
- 'TODO Legacy - Adapt RSyntax to new style...
+ ''' If true then don't include the output part in the script (i.e. the part of the
+ ''' script to the left of the assignment operator '<-').
+ Public bExcludeAssignedFunctionOutput As Boolean = True
+
+ ''' If true then run the R script in a separate thread.
+ Public bSeparateThread As Boolean = True
+
+ ''' TODO SJL 07/04/20 Is only ever Nothing (or in one rare case False). Remove?
+ Public bShowWaitDialogOverride As Nullable(Of Boolean) = Nothing
' An object of this class is associated with a base R code. This R code must be (only one of):
' - An R function,
@@ -53,26 +61,6 @@ Public Class RSyntax
' 'TODO SJL It's not valid for an object of this class to be more than one of the 3 types above.
' However the booleans potentially allow this. Replace with an enumeration?
- ''' An R function of the form 'RCommand(param1=param1Val, param2=param2Val, ...)'.
- Public clsBaseFunction As New RFunction
-
- ''' An R operation of the form 'leftSide Operator rightSide' (e.g. "x+y").
- Public clsBaseOperator As New ROperator
-
- ''' An R command (of any type).
- Public clsBaseCommandString As New RCodeStructure 'TODO SJL 17/04/20 What's the connection between this and 'bUeseCommandString' and 'strCommandString'?
-
-
- ''' The R command in the form of a string.
- Public strCommandString As String = ""
-
- ''' The R functions/operators/commands that should be run before the base R code.
- Public lstBeforeCodes As New List(Of RCodeStructure)
-
- ''' The R functions/operators/commands that should be run after the base R code.
- Public lstAfterCodes As New List(Of RCodeStructure)
-
-
''' If true then use 'clsBaseFunction' as this object's base R code.
Public bUseBaseFunction As Boolean = False
@@ -83,6 +71,15 @@ Public Class RSyntax
Public bUseCommandString As Boolean = False
+ ''' An R command (of any type).
+ Public clsBaseCommandString As New RCodeStructure 'TODO SJL 17/04/20 What's the connection between this and 'bUseCommandString' and 'strCommandString'?
+
+ ''' An R function of the form 'RCommand(param1=param1Val, param2=param2Val, ...)'.
+ Public clsBaseFunction As New RFunction
+
+ ''' An R operation of the form 'leftSide Operator rightSide' (e.g. "x+y").
+ Public clsBaseOperator As New ROperator
+
''' Defines how to display the R output.
'''
''' - 0 Ignore the result.
@@ -94,147 +91,16 @@ Public Class RSyntax
'''
Public iCallType As Integer = 0 'TODO SJL 07/04/20 Use enumeration?
+ ''' The R command in the form of a string.
+ Public strCommandString As String = ""
- ''' The script associated with the base R code.
- Public strScript As String 'TODO SJL This is only used in the RSyntax.GetScript function. Also cleared once in ucrButtons. Refactor?
-
- ''' TODO SJL 07/04/20 Not used. Remove?
- Public i As Integer
-
- ''' If true then don't include the output part in the script (i.e. the part of the
- ''' script to the left of the assignment operator '<-').
- Public bExcludeAssignedFunctionOutput As Boolean = True
-
- ''' If true then run the R script in a separate thread.
- Public bSeparateThread As Boolean = True
-
- ''' TODO SJL 07/04/20 Is only ever Nothing (or in one rare case False). Remove?
- Public bShowWaitDialogOverride As Nullable(Of Boolean) = Nothing
-
- '''--------------------------------------------------------------------------------------------
- ''' Sets the function's name (e.g. "facet_grid") and flags that the R script
- ''' associated with this object is no longer correctly assigned.
- '''
- ''' Name of the R command.
- '''--------------------------------------------------------------------------------------------
- Public Sub SetFunction(strFunctionName As String)
- 'TODO legacy - confusing name
- clsBaseFunction.SetRCommand(strFunctionName)
- bUseBaseFunction = True
- bUseBaseOperator = False
- bUseCommandString = False
- End Sub
-
- '''--------------------------------------------------------------------------------------------
- ''' TODO SJL 04/04/20 This function is not used, remove?
- '''
- ''' The name.
- '''--------------------------------------------------------------------------------------------
- Public Sub SetPackageName(strName As String)
- If clsBaseFunction Is Nothing Then
- MsgBox("Developer error: base function must be set before package name is set.")
- Else
- clsBaseFunction.SetPackageName(strName)
- bUseBaseFunction = True
- bUseBaseOperator = False
- bUseCommandString = False
- End If
- End Sub
-
- '''--------------------------------------------------------------------------------------------
- ''' Sets this object to be R function .
- '''
- ''' The R function to associate with this object.
- '''--------------------------------------------------------------------------------------------
- Public Sub SetBaseRFunction(clsFunction As RFunction)
- clsBaseFunction = clsFunction
- bUseBaseFunction = True
- bUseBaseOperator = False
- bUseCommandString = False
- End Sub
-
- '''--------------------------------------------------------------------------------------------
- ''' Sets this object to be R operator .
- '''
- ''' The R operator to associate with this object.
- '''--------------------------------------------------------------------------------------------
- Public Sub SetBaseROperator(clsOperator As ROperator)
- clsBaseOperator = clsOperator
- bUseBaseFunction = False
- bUseBaseOperator = True
- bUseCommandString = False
- End Sub
-
- '''--------------------------------------------------------------------------------------------
- ''' Sets the operation's symbol to (e.g. "+") and if
- ''' is true then includes the first operation
- ''' parameter in brackets.
- '''
- ''' The operation symbol (e.g. "+").
- ''' (Optional) If true then enclose first parameter in brackets.
- '''
- '''--------------------------------------------------------------------------------------------
- Public Sub SetOperation(strOp As String, Optional bBracketTemp As Boolean = True)
- clsBaseOperator.SetOperation(strOp, bBracketTemp)
- bUseBaseFunction = False
- bUseBaseOperator = True
- bUseCommandString = False
- End Sub
- '''--------------------------------------------------------------------------------------------
- ''' Sets this object's R command to . This object's
- ''' R command is then just a string (rather than a function or operation object)
- '''
- '''
- ''' The R command string.
- '''--------------------------------------------------------------------------------------------
- Public Sub SetCommandString(strCommand As String)
- strCommandString = strCommand
- bUseBaseFunction = False
- bUseBaseOperator = False
- bUseCommandString = True
- End Sub
+ ''' The R functions/operators/commands that should be run before the base R code.
+ Private lstBeforeCodes As New List(Of RCodeStructure)
- '''--------------------------------------------------------------------------------------------
- ''' Sets the 'assignTo' variables for this object's associated R function, R
- ''' operation or R command string.
- '''
- ''' The new value for the assignment string.
- ''' (Optional) The new value for the dataframe.
- ''' (Optional) The new value for the column.
- ''' (Optional) The new value for the model.
- ''' (Optional) The new value for the graph.
- ''' (Optional) The new value for bAssignToIsPrefix.
- ''' (Optional) The new value for bAssignToColumnWithoutNames.
- ''' (Optional) The new value for bInsertColumnBefore.
- ''' (Optional) The new value for bRequireCorrectLength.
- '''--------------------------------------------------------------------------------------------
- Public Sub SetAssignTo(strAssignToName As String, Optional strTempDataframe As String = "", Optional strTempColumn As String = "", Optional strTempModel As String = "", Optional strTempGraph As String = "", Optional bAssignToIsPrefix As Boolean = False, Optional bAssignToColumnWithoutNames As Boolean = False, Optional bInsertColumnBefore As Boolean = False, Optional bRequireCorrectLength As Boolean = True, Optional strAdjacentColumn As String = "")
- If bUseBaseOperator Then
- clsBaseOperator.SetAssignTo(strTemp:=strAssignToName, strTempDataframe:=strTempDataframe, strTempColumn:=strTempColumn, strTempModel:=strTempModel, strTempGraph:=strTempGraph, bAssignToIsPrefix:=bAssignToIsPrefix, bAssignToColumnWithoutNames:=bAssignToColumnWithoutNames, bInsertColumnBefore:=bInsertColumnBefore, bRequireCorrectLength:=bRequireCorrectLength, strAdjacentColumn:=strAdjacentColumn)
- ElseIf bUseBaseFunction Then
- clsBaseFunction.SetAssignTo(strAssignToName, strTempDataframe:=strTempDataframe, strTempColumn:=strTempColumn, strTempModel:=strTempModel, strTempGraph:=strTempGraph, bAssignToIsPrefix:=bAssignToIsPrefix, bAssignToColumnWithoutNames:=bAssignToColumnWithoutNames, bInsertColumnBefore:=bInsertColumnBefore, bRequireCorrectLength:=bRequireCorrectLength, strAdjacentColumn:=strAdjacentColumn)
- ElseIf bUseCommandString Then
- clsBaseCommandString.SetAssignTo(strAssignToName, strTempDataframe:=strTempDataframe, strTempColumn:=strTempColumn, strTempModel:=strTempModel, strTempGraph:=strTempGraph, bAssignToIsPrefix:=bAssignToIsPrefix, bAssignToColumnWithoutNames:=bAssignToColumnWithoutNames, bInsertColumnBefore:=bInsertColumnBefore, bRequireCorrectLength:=bRequireCorrectLength, strAdjacentColumn:=strAdjacentColumn)
- End If
- End Sub
+ ''' The R functions/operators/commands that should be run after the base R code.
+ Private lstAfterCodes As New List(Of RCodeStructure)
- '''--------------------------------------------------------------------------------------------
- ''' Resets all the 'AssignTo' variables.
- ''' String variables are set to "".
- ''' Booleans are set to false.
- '''
- '''--------------------------------------------------------------------------------------------
- Public Sub RemoveAssignTo()
- If bUseBaseOperator Then
- clsBaseOperator.RemoveAssignTo()
- End If
- If bUseBaseFunction Then 'TODO SJL 04/04/20 should this be ElseIf?
- clsBaseFunction.RemoveAssignTo()
- ElseIf bUseCommandString Then
- clsBaseCommandString.RemoveAssignTo()
- End If
- End Sub
'''--------------------------------------------------------------------------------------------
'''
@@ -257,141 +123,165 @@ Public Class RSyntax
'''--------------------------------------------------------------------------------------------
Public Sub AddParameter(strParameterName As String, Optional strParameterValue As String = "", Optional clsRFunctionParameter As RFunction = Nothing, Optional clsROperatorParameter As ROperator = Nothing, Optional clsRCodeStructureParameter As RCodeStructure = Nothing, Optional bIncludeArgumentName As Boolean = True, Optional iPosition As Integer = -1)
'TODO SJL 17/04/20 This function should only be used if this class encapsulates a function. But it doesn't check the booleans for this.
- ' Also, 'clsBaseFunction' is public so 'AddParameter' can be called directly. Remove this function?
clsBaseFunction.AddParameter(strParameterName, strParameterValue, clsRFunctionParameter, clsROperatorParameter, clsRCodeStructureParameter, bIncludeArgumentName, iPosition)
End Sub
'''--------------------------------------------------------------------------------------------
- ''' TODO SJL 04/04/20 This function is not used, remove?
+ ''' Adds R function/operation/command to the
+ ''' 'after' list.
'''
- ''' The new parameter to add.
+ ''' The R function/operation/command to add.
+ ''' (Optional) The relative position of the parameter in this
+ ''' object's 'after' list.
'''--------------------------------------------------------------------------------------------
- Public Sub AddParameter(clsRParam As RParameter)
- 'TODO SJL 04/04/20 if we keep this function, should it also handle adding parameters to operations or string R commands?
- clsBaseFunction.AddParameter(clsRParam)
+ Public Sub AddToAfterCodes(clsNewRCode As RCodeStructure, Optional iPosition As Integer = -1)
+ If Not lstAfterCodes.Contains(clsNewRCode) Then
+ lstAfterCodes.Add(clsNewRCode)
+ clsNewRCode.iPosition = iPosition 'TODO SJL 06/04/20 remove this line and the 'Else' (see AddToBeforeCodes)?
+ Else
+ lstAfterCodes.Find(Function(x) x.Equals(clsNewRCode)).iPosition = iPosition
+ End If
End Sub
'''--------------------------------------------------------------------------------------------
- ''' TODO SJL 04/04/20 This function is not used, remove?
- '''
- ''' The name.
+ ''' Adds R function/operation/command to the
+ ''' 'before' list.
'''
- ''' The parameter.
+ ''' The R function/operation/command to add.
+ ''' (Optional) The relative position of the parameter in this
+ ''' object's 'before' list.
'''--------------------------------------------------------------------------------------------
- Public Function GetParameter(strName As String) As RParameter
- If bUseBaseFunction Then
- Return clsBaseFunction.GetParameter(strName)
- ElseIf bUseBaseOperator Then
- Return clsBaseOperator.GetParameter(strName)
+ Public Sub AddToBeforeCodes(clsNewRCode As RCodeStructure, Optional iPosition As Integer = -1)
+ If Not lstBeforeCodes.Contains(clsNewRCode) Then
+ lstBeforeCodes.Add(clsNewRCode)
End If
- Return Nothing
- End Function
+ lstBeforeCodes.Find(Function(x) x.Equals(clsNewRCode)).iPosition = iPosition
+ End Sub
'''--------------------------------------------------------------------------------------------
- ''' TODO SJL 04/04/20 This function is superceded by the 'SetOperatorParameter'
- ''' function below, remove?
- '''
- ''' True to position.
- ''' (Optional) Name of the parameter.
- ''' (Optional) The value.
- ''' (Optional) The cls r function.
- ''' (Optional) The cls operation.
- ''' (Optional) The cls create struct.
- ''' (Optional) True to include, false to exclude the argument
- ''' name.
- '''--------------------------------------------------------------------------------------------
- Public Sub SetOperatorParameter(iPos As Boolean, Optional strParameterName As String = "", Optional strValue As String = "", Optional clsRFunc As RFunction = Nothing, Optional clsOp As ROperator = Nothing, Optional clsCs As RCodeStructure = Nothing, Optional bIncludeArgumentName As Boolean = True)
- 'TODO legacy comment: This is temporary, just don't want to change all the files in one pull request...
- ' Will have to change the first argument to an integer...
- Dim iPosition As Integer
- If iPos Then
- iPosition = 0
- Else
- iPosition = -1
- End If
- clsBaseOperator.AddParameter(strParameterName, strValue, clsRFunc, clsOp, clsCs, bIncludeArgumentName, iPosition)
+ ''' Resets all the data members to default values.
+ '''--------------------------------------------------------------------------------------------
+ Public Sub ClearCodes()
+ lstBeforeCodes = New List(Of RCodeStructure)
+ lstAfterCodes = New List(Of RCodeStructure)
+ clsBaseFunction = New RFunction
+ clsBaseOperator = New ROperator
+ clsBaseCommandString = New RCodeStructure
+ strCommandString = ""
+ bUseBaseFunction = False
+ bUseBaseOperator = False
+ bUseCommandString = False
+ 'TODO SJL 19/03/24 also reset iCallType?
+ 'iCallType = 0
End Sub
'''--------------------------------------------------------------------------------------------
- ''' Creates and adds a parameter to the R operator associated with this object.
- ''' Sets the parameter's name to .
- ''' Sets the parameter's argument to one of ,
- ''' , ,
- ''' or .
- ''' Sets the parameter's position and include/exclude argument name flag to
- ''' and
- ''' respectively.
+ ''' Returns true if the R function/operator/command is
+ ''' the R function/operator/command associated with this object. Also returns true
+ ''' if is in this object's 'before' or 'after' lists.
+ ''' Else returns false.
'''
'''
- ''' (Optional) Name of the parameter.
- ''' (Optional) The parameter value.
- ''' (Optional) The R function parameter.
- ''' (Optional) The R operator parameter.
- ''' (Optional) The R code structure parameter.
- ''' (Optional) True to include, false to exclude the
- ''' argument name.
- ''' (Optional) The relative position of the
- ''' parameter in this object's parameter list.
- '''--------------------------------------------------------------------------------------------
- Public Sub SetOperatorParameter(iPosition As Integer, Optional strParameterName As String = "", Optional strValue As String = "", Optional clsRFunc As RFunction = Nothing, Optional clsOp As ROperator = Nothing, Optional clsCs As RCodeStructure = Nothing, Optional bIncludeArgumentName As Boolean = True)
- 'TODO SJL 17/04/20 This function should only be used if this class encapsulates an operator. But it doesn't check the booleans for this.
- ' Also, 'clsBaseOperator' is public so 'AddParameter' can be called directly. Remove this function?
- clsBaseOperator.AddParameter(strParameterName, strValue, clsRFunc, clsOp, clsCs, bIncludeArgumentName, iPosition)
- End Sub
-
- '''--------------------------------------------------------------------------------------------
- ''' Adds an operator parameter.
+ ''' The R function/operator/command to search for.
'''
- ''' Name of the parameter.
- ''' (Optional) The parameter value.
- ''' (Optional) The cls r function.
- ''' (Optional) The cls operation.
- ''' (Optional) The cls create struct.
- ''' (Optional) True to include, false to exclude the argument
- ''' name.
- '''--------------------------------------------------------------------------------------------
- Public Sub AddOperatorParameter(strParameterName As String, Optional strParameterValue As String = "", Optional clsRFunc As RFunction = Nothing, Optional clsOp As ROperator = Nothing, Optional clsCs As RCodeStructure = Nothing, Optional bIncludeArgumentName As Boolean = True)
- 'TDDO SJL 17/04/20 What's the difference between this function and the one above? Remove this function?
- clsBaseOperator.AddParameter(strParameterName, strParameterValue, clsRFunc, clsOp, clsCs, bIncludeArgumentName)
- End Sub
+ ''' True if the R function/operator/command is
+ ''' the R function/operator/command associated with this object. Also returns true
+ ''' if is in this object's 'before' or 'after' lists.
+ ''' Else returns false.
+ '''--------------------------------------------------------------------------------------------
+ Public Function ContainsCode(clsRCode As RCodeStructure) As Boolean
+ Return (clsBaseFunction IsNot Nothing AndAlso clsBaseFunction.Equals(clsRCode)) _
+ OrElse (clsBaseOperator IsNot Nothing _
+ AndAlso clsBaseOperator.Equals(clsRCode) _
+ AndAlso clsBaseOperator.Equals(clsRCode)) _
+ OrElse lstBeforeCodes.Contains(clsRCode) _
+ OrElse lstAfterCodes.Contains(clsRCode)
+ End Function
'''--------------------------------------------------------------------------------------------
- ''' Removes the parameter named .
+ ''' Returns the list of 'after' R functions/operators/commands (i.e. the ones that
+ ''' run after the base R code).
'''
- ''' Name of the parameter.
- ''' [in,out] (Optional) The function to add the parameter to.
- ''' If not specified then adds the parameter to 'clsBaseFunction'.
+ ''' The list of 'after' R functions/operators/commands (i.e. the ones that run
+ ''' after the base R code).
'''--------------------------------------------------------------------------------------------
- Public Sub RemoveParameter(strParameterName As String, Optional ByRef clsFunction As RFunction = Nothing)
- 'TODO SJL 17/04/20 This function should only be used if this class encapsulates a function. But it doesn't check the booleans for this.
- ' Also, 'clsBaseFunction' is public so 'RemoveParameterByName' can be called directly. Remove this function?
- If clsFunction Is Nothing Then
- clsFunction = clsBaseFunction
- End If
- clsFunction.RemoveParameterByName(strParameterName)
- End Sub
+ Public Function GetAfterCodes() As List(Of RCodeStructure)
+ lstAfterCodes.Sort(AddressOf CompareCodePositions)
+ Return lstAfterCodes
+ End Function
'''--------------------------------------------------------------------------------------------
- ''' TODO SJL 04/04/20 This function is not used, remove?
+ ''' Adds this object and its associated assign script to
+ ''' and respectively.
+ ''' If this object's parameters also contain functions or operators then also
+ ''' recursively adds their respective RCodeStructure objects and associated assign
+ ''' scripts to the respective lists.
+ ''' If this object has lists of 'before' or 'after' functions/operators/commands,
+ ''' then also adds these objects and their associated assign scripts to the
+ ''' respective lists.
+ '''
'''
- ''' Name of the parameter.
+ ''' The list of RCodeStructure objects.
+ ''' The list of assign scripts .
'''--------------------------------------------------------------------------------------------
- Public Sub RemoveOperatorParameter(strParameterName As String)
- clsBaseOperator.RemoveParameterByName(strParameterName)
+ Public Sub GetAllAssignTo(lstCodes As List(Of RCodeStructure), lstValues As List(Of String))
+ If bUseBaseFunction Then
+ clsBaseFunction.GetAllAssignTo(lstCodes, lstValues)
+ ElseIf bUseBaseOperator Then
+ clsBaseOperator.GetAllAssignTo(lstCodes, lstValues)
+ ElseIf bUseCommandString Then
+ clsBaseCommandString.GetAllAssignTo(lstCodes, lstValues)
+ End If
+ lstBeforeCodes.Sort(AddressOf CompareCodePositions)
+ For Each clsTempCode As RCodeStructure In lstBeforeCodes
+ clsTempCode.GetAllAssignTo(lstCodes, lstValues)
+ Next
+ lstAfterCodes.Sort(AddressOf CompareCodePositions)
+ For Each clsTempCode As RCodeStructure In lstAfterCodes
+ clsTempCode.GetAllAssignTo(lstCodes, lstValues)
+ Next
End Sub
'''--------------------------------------------------------------------------------------------
- ''' TODO SJL 04/04/20 This function is not used, remove?
+ ''' Returns the list of 'before' R functions/operators/commands (i.e. the ones that
+ ''' run before the base R code).
'''
- ''' [in,out] (Optional) The cls function.
+ ''' The list of 'before' R functions/operators/commands (i.e. the ones that run
+ ''' before the base R code).
'''--------------------------------------------------------------------------------------------
- Public Sub ClearParameters(Optional ByRef clsFunction As RFunction = Nothing)
- If clsFunction Is Nothing Then
- clsFunction = clsBaseFunction
- End If
+ Public Function GetBeforeCodes() As List(Of RCodeStructure)
+ lstBeforeCodes.Sort(AddressOf CompareCodePositions)
+ Return lstBeforeCodes
+ End Function
- clsFunction.ClearParameters()
- End Sub
+ '''--------------------------------------------------------------------------------------------
+ ''' Returns all the function names in the 'before' and 'after' lists. If this object
+ ''' is an R function then also return the name of this function.
+ '''
+ ''' All the function names in the 'before' and 'after' lists. If this object
+ ''' is an R function then also return the name of this function.
+ '''--------------------------------------------------------------------------------------------
+ Public Function GetFunctionNames() As List(Of String)
+ Dim lstNames As New List(Of String)
+ Dim clsTempFunc As RFunction
+
+ If clsBaseFunction IsNot Nothing Then
+ lstNames.Add(clsBaseFunction.strRCommand)
+ End If
+ For Each clsRCode As RCodeStructure In lstBeforeCodes
+ clsTempFunc = TryCast(clsRCode, RFunction)
+ If clsTempFunc IsNot Nothing Then
+ lstNames.Add(clsTempFunc.strRCommand)
+ End If
+ Next
+ For Each clsRCode As RCodeStructure In lstAfterCodes
+ clsTempFunc = TryCast(clsRCode, RFunction)
+ If clsTempFunc IsNot Nothing Then
+ lstNames.Add(clsTempFunc.strRCommand)
+ End If
+ Next
+ Return lstNames
+ End Function
'''--------------------------------------------------------------------------------------------
''' Returns the script associated with this object's R function, R operator or
@@ -405,6 +295,7 @@ Public Class RSyntax
'''--------------------------------------------------------------------------------------------
Public Function GetScript() As String
Dim strTemp As String = ""
+ Dim strScript As String = ""
If bUseBaseFunction Then
strTemp = clsBaseFunction.ToScript(strScript)
@@ -438,114 +329,149 @@ Public Class RSyntax
''' list of scripts associated with the
''' list of R functions/operators/commands.
'''--------------------------------------------------------------------------------------------
- Private Function GetScriptsFromCodeList(lstCodes As List(Of RCodeStructure)) As List(Of String)
- Dim strScript As String = "" 'TODO SJL 06/04/20 redundant assignments
- Dim strTemp As String = ""
+ Public Function GetScriptsFromCodeList(lstCodes As List(Of RCodeStructure)) As List(Of String)
+ Dim strItemScript As String
+ Dim strTemp As String
Dim lstScripts As New List(Of String)
For Each clsTempCode In lstCodes
- strScript = ""
- strTemp = clsTempCode.ToScript(strScript)
+ strItemScript = ""
+ strTemp = clsTempCode.ToScript(strItemScript)
'Sometimes the output of the R-command we deal with should not be part of the script...
If clsTempCode.bExcludeAssignedFunctionOutput AndAlso Not String.IsNullOrEmpty(clsTempCode.GetRObjectToAssignTo) Then
- lstScripts.Add(strScript)
+ lstScripts.Add(strItemScript)
Else
- lstScripts.Add(strScript & strTemp)
+ lstScripts.Add(strItemScript & strTemp)
End If
Next
Return lstScripts
End Function
'''--------------------------------------------------------------------------------------------
- ''' Returns the list of scripts associated with the list of 'before' R
- ''' functions/operators/commands (i.e. the ones that run before the base R code).
- ''' If a list object is flagged to exclude the script's output, and the output has
- ''' already been assigned, then the list object's script does not include the output
- ''' part.
- '''
- ''' The list of scripts associated with the list of 'before' R
- ''' functions/operators/commands.
+ ''' Resets all the 'AssignTo' variables.
+ ''' String variables are set to "".
+ ''' Booleans are set to false.
+ '''
'''--------------------------------------------------------------------------------------------
- Public Function GetBeforeCodesScripts() As List(Of String)
- lstBeforeCodes.Sort(AddressOf CompareCodePositions)
- Return GetScriptsFromCodeList(lstBeforeCodes)
- End Function
+ Public Sub RemoveAssignTo()
+ If bUseBaseOperator Then
+ clsBaseOperator.RemoveAssignTo()
+ End If
+ If bUseBaseFunction Then 'TODO SJL 04/04/20 should this be ElseIf?
+ clsBaseFunction.RemoveAssignTo()
+ ElseIf bUseCommandString Then
+ clsBaseCommandString.RemoveAssignTo()
+ End If
+ End Sub
'''--------------------------------------------------------------------------------------------
- ''' Returns the list of 'before' R functions/operators/commands (i.e. the ones that
- ''' run before the base R code).
+ ''' Removes from the statements executed after the
+ ''' base statement.
'''
- ''' The list of 'before' R functions/operators/commands (i.e. the ones that run
- ''' before the base R code).
+ ''' The R statement to remove.
'''--------------------------------------------------------------------------------------------
- Public Function GetBeforeCodes() As List(Of RCodeStructure)
- lstBeforeCodes.Sort(AddressOf CompareCodePositions)
- Return lstBeforeCodes
- End Function
+ Public Sub RemoveFromAfterCodes(clsNewRCode As RCodeStructure)
+ lstAfterCodes.Remove(clsNewRCode)
+ End Sub
'''--------------------------------------------------------------------------------------------
- ''' Returns the list of scripts associated with the list of 'after' R
- ''' functions/operators/commands (i.e. the ones that run after the base R code).
- ''' If a list object is flagged to exclude the script's output, and the output has
- ''' already been assigned, then the list object's script does not include the output
- ''' part.
+ ''' Removes from the statements executed before the
+ ''' base statement.
'''
- ''' The list of scripts associated with the list of 'after' R
- ''' functions/operators/commands.
+ ''' The R statement to remove.
'''--------------------------------------------------------------------------------------------
- Public Function GetAfterCodesScripts() As List(Of String)
- lstAfterCodes.Sort(AddressOf CompareCodePositions)
- Return GetScriptsFromCodeList(lstAfterCodes)
- End Function
+ Public Sub RemoveFromBeforeCodes(clsNewRCode As RCodeStructure)
+ lstBeforeCodes.Remove(clsNewRCode)
+ End Sub
'''--------------------------------------------------------------------------------------------
- ''' Returns the list of 'after' R functions/operators/commands (i.e. the ones that
- ''' run after the base R code).
+ ''' Removes the parameter named .
'''
- ''' The list of 'after' R functions/operators/commands (i.e. the ones that run
- ''' after the base R code).
+ ''' Name of the parameter.
+ ''' [in,out] (Optional) The function to add the parameter to.
+ ''' If not specified then adds the parameter to 'clsBaseFunction'.
'''--------------------------------------------------------------------------------------------
- Public Function GetAfterCodes() As List(Of RCodeStructure)
- lstAfterCodes.Sort(AddressOf CompareCodePositions)
- Return lstAfterCodes
- End Function
+ Public Sub RemoveParameter(strParameterName As String, Optional ByRef clsFunction As RFunction = Nothing)
+ 'TODO SJL 17/04/20 This function should only be used if this class encapsulates a function. But it doesn't check the booleans for this.
+ If clsFunction Is Nothing Then
+ clsFunction = clsBaseFunction
+ End If
+ clsFunction.RemoveParameterByName(strParameterName)
+ End Sub
'''--------------------------------------------------------------------------------------------
- ''' Adds this object and its associated assign script to
- ''' and respectively.
- ''' If this object's parameters also contain functions or operators then also
- ''' recursively adds their respective RCodeStructure objects and associated assign
- ''' scripts to the respective lists.
- ''' If this object has lists of 'before' or 'after' functions/operators/commands,
- ''' then also adds these objects and their associated assign scripts to the
- ''' respective lists.
- '''
+ ''' Sets the 'assignTo' variables for this object's associated R function, R
+ ''' operation or R command string.
'''
- ''' The list of RCodeStructure objects.
- ''' The list of assign scripts .
+ ''' The new value for the assignment string.
+ ''' (Optional) The new value for the dataframe.
+ ''' (Optional) The new value for the column.
+ ''' (Optional) The new value for the model.
+ ''' (Optional) The new value for the graph.
+ ''' (Optional) The new value for bAssignToIsPrefix.
+ ''' (Optional) The new value for bAssignToColumnWithoutNames.
+ ''' (Optional) The new value for bInsertColumnBefore.
+ ''' (Optional) The new value for bRequireCorrectLength.
'''--------------------------------------------------------------------------------------------
- Public Sub GetAllAssignTo(lstCodes As List(Of RCodeStructure), lstValues As List(Of String))
- If bUseBaseFunction Then
- clsBaseFunction.GetAllAssignTo(lstCodes, lstValues)
- ElseIf bUseBaseOperator Then
- clsBaseOperator.GetAllAssignTo(lstCodes, lstValues)
+ Public Sub SetAssignTo(strAssignToName As String, Optional strTempDataframe As String = "", Optional strTempColumn As String = "", Optional strTempModel As String = "", Optional strTempGraph As String = "", Optional bAssignToIsPrefix As Boolean = False, Optional bAssignToColumnWithoutNames As Boolean = False, Optional bInsertColumnBefore As Boolean = False, Optional bRequireCorrectLength As Boolean = True, Optional strAdjacentColumn As String = "")
+ If bUseBaseOperator Then
+ clsBaseOperator.SetAssignTo(strTemp:=strAssignToName, strTempDataframe:=strTempDataframe, strTempColumn:=strTempColumn, strTempModel:=strTempModel, strTempGraph:=strTempGraph, bAssignToIsPrefix:=bAssignToIsPrefix, bAssignToColumnWithoutNames:=bAssignToColumnWithoutNames, bInsertColumnBefore:=bInsertColumnBefore, bRequireCorrectLength:=bRequireCorrectLength, strAdjacentColumn:=strAdjacentColumn)
+ ElseIf bUseBaseFunction Then
+ clsBaseFunction.SetAssignTo(strAssignToName, strTempDataframe:=strTempDataframe, strTempColumn:=strTempColumn, strTempModel:=strTempModel, strTempGraph:=strTempGraph, bAssignToIsPrefix:=bAssignToIsPrefix, bAssignToColumnWithoutNames:=bAssignToColumnWithoutNames, bInsertColumnBefore:=bInsertColumnBefore, bRequireCorrectLength:=bRequireCorrectLength, strAdjacentColumn:=strAdjacentColumn)
ElseIf bUseCommandString Then
- clsBaseCommandString.GetAllAssignTo(lstCodes, lstValues)
+ clsBaseCommandString.SetAssignTo(strAssignToName, strTempDataframe:=strTempDataframe, strTempColumn:=strTempColumn, strTempModel:=strTempModel, strTempGraph:=strTempGraph, bAssignToIsPrefix:=bAssignToIsPrefix, bAssignToColumnWithoutNames:=bAssignToColumnWithoutNames, bInsertColumnBefore:=bInsertColumnBefore, bRequireCorrectLength:=bRequireCorrectLength, strAdjacentColumn:=strAdjacentColumn)
End If
- lstBeforeCodes.Sort(AddressOf CompareCodePositions)
- For Each clsTempCode As RCodeStructure In lstBeforeCodes
- clsTempCode.GetAllAssignTo(lstCodes, lstValues)
- Next
- lstAfterCodes.Sort(AddressOf CompareCodePositions)
- For Each clsTempCode As RCodeStructure In lstAfterCodes
- clsTempCode.GetAllAssignTo(lstCodes, lstValues)
- Next
End Sub
- ''' TODO SJL 04/04/20 This function is not used, remove?
- Public Sub SortParameters()
- 'This sub is used to reorder the parameters according to their Position property.
- 'It will be called only in places where it is necessary ie before ToScript or RemoveAdditionalParameters in ROperator.
+ '''--------------------------------------------------------------------------------------------
+ ''' Sets this object to be R function .
+ '''
+ ''' The R function to associate with this object.
+ '''--------------------------------------------------------------------------------------------
+ Public Sub SetBaseRFunction(clsFunction As RFunction)
+ clsBaseFunction = clsFunction
+ bUseBaseFunction = True
+ bUseBaseOperator = False
+ bUseCommandString = False
+ End Sub
+
+ '''--------------------------------------------------------------------------------------------
+ ''' Sets this object to be R operator .
+ '''
+ ''' The R operator to associate with this object.
+ '''--------------------------------------------------------------------------------------------
+ Public Sub SetBaseROperator(clsOperator As ROperator)
+ clsBaseOperator = clsOperator
+ bUseBaseFunction = False
+ bUseBaseOperator = True
+ bUseCommandString = False
+ End Sub
+
+ '''--------------------------------------------------------------------------------------------
+ ''' Sets this object's R command to . This object's
+ ''' R command is then just a string (rather than a function or operation object)
+ '''
+ '''
+ ''' The R command string.
+ '''--------------------------------------------------------------------------------------------
+ Public Sub SetCommandString(strCommand As String)
+ strCommandString = strCommand
+ bUseBaseFunction = False
+ bUseBaseOperator = False
+ bUseCommandString = True
+ End Sub
+
+ '''--------------------------------------------------------------------------------------------
+ ''' Sets the function's name (e.g. "facet_grid") and flags that the R script
+ ''' associated with this object is no longer correctly assigned.
+ '''
+ ''' Name of the R command.
+ '''--------------------------------------------------------------------------------------------
+ Public Sub SetFunction(strFunctionName As String)
+ clsBaseFunction.SetRCommand(strFunctionName)
+ bUseBaseFunction = True
+ bUseBaseOperator = False
+ bUseCommandString = False
End Sub
'''--------------------------------------------------------------------------------------------
@@ -577,235 +503,4 @@ Public Class RSyntax
End If
End Function
- '''--------------------------------------------------------------------------------------------
- ''' If the output from the R command needs to be assigned, then returns
- ''' the part of the script to the left of the assignment operator ('<-').
- ''' If the output from the R command doesn't to be assigned, then returns an empty
- ''' string.
- '''
- ''' If the output from the R command needs to be assigned, then returns
- ''' the part of the script to the left of the assignment operator ('<-').
- ''' If the output from the R command doesn't to be assigned, then returns an empty
- ''' string.
- '''--------------------------------------------------------------------------------------------
- Public Function GetstrAssignTo() As String
- If bUseBaseFunction Then
- Return clsBaseFunction.GetRObjectToAssignTo()
- ElseIf bUseBaseOperator Then
- Return clsBaseOperator.GetRObjectToAssignTo()
- ElseIf bUseCommandString Then
- Return clsBaseCommandString.GetRObjectToAssignTo()
- Else
- Return ""
- End If
- End Function
-
- '''--------------------------------------------------------------------------------------------
- ''' Returns true if is in the list of 'before' R
- ''' functions/operators/commands (i.e. the ones that run before the base R code),
- ''' else returns false.
- '''
- ''' The object to search for in the list of 'before' R
- ''' functions/operators/commands.
- '''
- ''' True if is in the list of 'before' R
- ''' functions/operators/commands (i.e. the ones that run before the base R code),
- ''' else returns false.
- '''--------------------------------------------------------------------------------------------
- Public Function BeforeCodesContain(clsNewRCode As RCodeStructure) As Boolean
- 'TODO SJL 04/04/20 This function is only called from within this class. Make private? Or remove and inline the code?
- Return lstBeforeCodes.Contains(clsNewRCode)
- End Function
-
- '''--------------------------------------------------------------------------------------------
- ''' Returns true if is in the list of 'after' R
- ''' functions/operators/commands (i.e. the ones that run after the base R code),
- ''' else returns false.
- '''
- ''' The object to search for in the list of 'after' R
- ''' functions/operators/commands.
- '''
- ''' True if is in the list of 'after' R
- ''' functions/operators/commands (i.e. the ones that run after the base R code),
- ''' else returns false.
- '''--------------------------------------------------------------------------------------------
- Public Function AfterCodesContain(clsNewRCode As RCodeStructure) As Boolean
- 'TODO SJL 04/04/20 This function is only called from within this class. Make private? Or remove and inline the code?
- Return lstAfterCodes.Contains(clsNewRCode)
- End Function
-
- '''--------------------------------------------------------------------------------------------
- ''' Returns true if a function named is in the
- ''' list of 'before' R functions/operators/commands (i.e. the ones that run before
- ''' the base R code), else returns false.
- '''
- ''' The function to search for in the list of 'before' R
- ''' functions/operators/commands.
- '''
- ''' True if a function named is in the
- ''' list of 'before' R functions/operators/commands (i.e. the ones that run before
- ''' the base R code), else returns false.
- '''--------------------------------------------------------------------------------------------
- Public Function BeforeCodesContain(strFunctionName As String) As Boolean
- 'TODO SJL 04/04/20 This function is only called from within this class. Inline or make private?
- Dim clsTempFunc As RFunction
- For Each clsRCode As RCodeStructure In lstBeforeCodes
- clsTempFunc = TryCast(clsRCode, RFunction)
- If clsTempFunc IsNot Nothing AndAlso clsTempFunc.strRCommand = strFunctionName Then
- Return True
- End If
- Next
- Return False
- End Function
-
- '''--------------------------------------------------------------------------------------------
- ''' Returns true if a function named is in the
- ''' list of 'after' R functions/operators/commands (i.e. the ones that run after
- ''' the base R code), else returns false.
- '''
- ''' The function to search for in the list of 'after' R
- ''' functions/operators/commands.
- '''
- ''' True if function is in the list of 'after' R
- ''' functions/operators/commands (i.e. the ones that run after the base R code),
- ''' else returns false.
- '''--------------------------------------------------------------------------------------------
- Public Function AfterCodesContain(strFunctionName As String) As Boolean
- 'TODO SJL 04/04/20 This function is only called from within this class. Make private?
- 'TODO SJL 06/04/20I think this function is identical to the function above!
- ' There's a bug in the list name below. Even after this is corrected, both functions could be
- ' combined into one (or they could call a shared private function).
- Dim clsTempFunc As RFunction
- For Each clsRCode As RCodeStructure In lstBeforeCodes 'TODO SJL 06/04/20 Should this be 'lstAfterCodes'?
- clsTempFunc = TryCast(clsRCode, RFunction)
- If clsTempFunc IsNot Nothing AndAlso clsTempFunc.strRCommand = strFunctionName Then
- Return True
- End If
- Next
- Return False
- End Function
-
- '''--------------------------------------------------------------------------------------------
- ''' Returns true if the R function/operator/command is
- ''' the R function/operator/command associated with this object. Also returns true
- ''' if is in this object's 'before' or 'after' lists.
- ''' Else returns false.
- '''
- '''
- ''' The R function/operator/command to search for.
- '''
- ''' True if the R function/operator/command is
- ''' the R function/operator/command associated with this object. Also returns true
- ''' if is in this object's 'before' or 'after' lists.
- ''' Else returns false.
- '''--------------------------------------------------------------------------------------------
- Public Function ContainsCode(clsRCode As RCodeStructure) As Boolean
- Return (clsBaseFunction IsNot Nothing AndAlso clsBaseFunction.Equals(clsRCode)) OrElse (clsBaseOperator IsNot Nothing AndAlso clsBaseOperator.Equals(clsRCode) AndAlso clsBaseOperator.Equals(clsRCode)) OrElse BeforeCodesContain(clsRCode) OrElse AfterCodesContain(clsRCode)
- End Function
-
- '''--------------------------------------------------------------------------------------------
- ''' TODO SJL 04/04/20 This function is not used, remove?
- '''
- ''' Name of the function.
- '''
- ''' True if it succeeds, false if it fails.
- '''--------------------------------------------------------------------------------------------
- Public Function ContainsFunctionName(strFunctionName As String) As Boolean
- Return (clsBaseFunction IsNot Nothing AndAlso clsBaseFunction.strRCommand = strFunctionName) OrElse BeforeCodesContain(strFunctionName) OrElse AfterCodesContain(strFunctionName)
- End Function
-
- '''--------------------------------------------------------------------------------------------
- ''' Returns all the function names in the 'before' and 'after' lists. If this object
- ''' is an R function then also return the name of this function.
- '''
- ''' All the function names in the 'before' and 'after' lists. If this object
- ''' is an R function then also return the name of this function.
- '''--------------------------------------------------------------------------------------------
- Public Function GetFunctionNames() As List(Of String)
- Dim lstNames As New List(Of String)
- Dim clsTempFunc As RFunction
-
- If clsBaseFunction IsNot Nothing Then
- lstNames.Add(clsBaseFunction.strRCommand)
- End If
- For Each clsRCode As RCodeStructure In lstBeforeCodes
- clsTempFunc = TryCast(clsRCode, RFunction)
- If clsTempFunc IsNot Nothing Then
- lstNames.Add(clsTempFunc.strRCommand)
- End If
- Next
- For Each clsRCode As RCodeStructure In lstAfterCodes
- clsTempFunc = TryCast(clsRCode, RFunction)
- If clsTempFunc IsNot Nothing Then
- lstNames.Add(clsTempFunc.strRCommand)
- End If
- Next
- Return lstNames
- End Function
-
- '''--------------------------------------------------------------------------------------------
- ''' Adds R function/operation/command to the
- ''' 'before' list.
- '''
- ''' The R function/operation/command to add.
- ''' (Optional) The relative position of the parameter in this
- ''' object's 'before' list.
- '''--------------------------------------------------------------------------------------------
- Public Sub AddToBeforeCodes(clsNewRCode As RCodeStructure, Optional iPosition As Integer = -1)
- If Not BeforeCodesContain(clsNewRCode) Then
- lstBeforeCodes.Add(clsNewRCode)
- End If
- lstBeforeCodes.Find(Function(x) x.Equals(clsNewRCode)).iPosition = iPosition
- End Sub
-
- '''--------------------------------------------------------------------------------------------
- ''' Adds R function/operation/command to the
- ''' 'after' list.
- '''
- ''' The R function/operation/command to add.
- ''' (Optional) The relative position of the parameter in this
- ''' object's 'after' list.
- '''--------------------------------------------------------------------------------------------
- Public Sub AddToAfterCodes(clsNewRCode As RCodeStructure, Optional iPosition As Integer = -1)
- If Not AfterCodesContain(clsNewRCode) Then
- lstAfterCodes.Add(clsNewRCode)
- clsNewRCode.iPosition = iPosition 'TODO SJL 06/04/20 remove this line and the 'Else' (same as function above)?
- Else
- lstAfterCodes.Find(Function(x) x.Equals(clsNewRCode)).iPosition = iPosition
- End If
- End Sub
-
- '''--------------------------------------------------------------------------------------------
- ''' TODO SJL 06/04/20 This is a single line function on a public data member.
- ''' I'm not sure what it adds. Remove?
- '''
- ''' The cls new r code.
- '''--------------------------------------------------------------------------------------------
- Public Sub RemoveFromBeforeCodes(clsNewRCode As RCodeStructure)
- lstBeforeCodes.Remove(clsNewRCode)
- End Sub
-
- '''--------------------------------------------------------------------------------------------
- ''' TODO SJL 06/04/20 This is a single line function on a public data member.
- ''' I'm not sure what it adds. Remove?.
- '''
- ''' The cls new r code.
- '''--------------------------------------------------------------------------------------------
- Public Sub RemoveFromAfterCodes(clsNewRCode As RCodeStructure)
- lstAfterCodes.Remove(clsNewRCode)
- End Sub
-
- ''' Resets all the data members to default values.
- Public Sub ClearCodes()
- 'TODO SJL Some data members are not reset by this function. Add them?
- lstBeforeCodes = New List(Of RCodeStructure)
- lstAfterCodes = New List(Of RCodeStructure)
- clsBaseFunction = New RFunction
- clsBaseOperator = New ROperator
- clsBaseCommandString = New RCodeStructure
- strCommandString = ""
- bUseBaseFunction = False
- bUseBaseOperator = False
- bUseCommandString = False
- End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgCalculationsSummary.vb b/instat/dlgCalculationsSummary.vb
index be355c79b09..7ed156dd6ed 100644
--- a/instat/dlgCalculationsSummary.vb
+++ b/instat/dlgCalculationsSummary.vb
@@ -96,7 +96,7 @@ Public Class dlgCalculationsSummary
For Each lviTemp As ListViewItem In lstCalculations.SelectedItems
iIndex = lstCalculations.Items.IndexOf(lviTemp)
lstCalculations.Items.Remove(lviTemp)
- ucrBase.clsRsyntax.RemoveFromBeforeCodes(ucrBase.clsRsyntax.lstBeforeCodes.Find(Function(x) x.Tag = lviTemp.Text))
+ ucrBase.clsRsyntax.RemoveFromBeforeCodes(ucrBase.clsRsyntax.GetBeforeCodes().Find(Function(x) x.Tag = lviTemp.Text))
dctCalculations.Remove(lviTemp.Text)
Next
End Sub
@@ -139,7 +139,7 @@ Public Class dlgCalculationsSummary
strCalcName = lstCalculations.SelectedItems(0).Text
End If
lstCalculations.SelectedItems(0).Text = strCalcName
- clsApplyCalculation = ucrBase.clsRsyntax.lstBeforeCodes.Find(Function(x) x.Tag = strCalcName)
+ clsApplyCalculation = ucrBase.clsRsyntax.GetBeforeCodes().Find(Function(x) x.Tag = strCalcName)
If clsSelectedCalculationFunction.clsParameters.FindIndex(Function(x) x.strArgumentName = "save") <> -1 AndAlso clsSelectedCalculationFunction.GetParameter("save").strArgumentValue = "2" Then
clsApplyCalculation.iCallType = 0
clsApplyCalculation.AddParameter("display", "FALSE")
diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb
index b544e8d7b90..941ad851aa3 100644
--- a/instat/dlgCalculator.vb
+++ b/instat/dlgCalculator.vb
@@ -132,7 +132,7 @@ Public Class dlgCalculator
Else
ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRemoveLabelsFunction)
ucrBase.clsRsyntax.RemoveAssignTo()
- ucrBase.clsRsyntax.iCallType = 1
+ ucrBase.clsRsyntax.iCallType = 5
ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False
End If
diff --git a/instat/dlgClimograph.Designer.vb b/instat/dlgClimograph.Designer.vb
index cff96c37a9b..241a4a22a6c 100644
--- a/instat/dlgClimograph.Designer.vb
+++ b/instat/dlgClimograph.Designer.vb
@@ -22,13 +22,273 @@ Partial Class dlgClimograph
'Ne la modifiez pas à l'aide de l'éditeur de code.
_
Private Sub InitializeComponent()
+ Me.ucrReceiverAbsolute = New instat.ucrReceiverSingle()
+ Me.lblAbsolute = New System.Windows.Forms.Label()
+ Me.ucrInputStation = New instat.ucrInputComboBox()
+ Me.ucr1stFactorReceiver = New instat.ucrReceiverSingle()
+ Me.lblFacetBy = New System.Windows.Forms.Label()
+ Me.ucrReceiverRain = New instat.ucrReceiverSingle()
+ Me.lblRain = New System.Windows.Forms.Label()
+ Me.ucrReceiverMaxtem = New instat.ucrReceiverSingle()
+ Me.lblMaxtem = New System.Windows.Forms.Label()
+ Me.ucrReceiverMintemp = New instat.ucrReceiverSingle()
+ Me.lblMintem = New System.Windows.Forms.Label()
+ Me.rdoClimograph = New System.Windows.Forms.RadioButton()
+ Me.rdoWalterLieth = New System.Windows.Forms.RadioButton()
+ Me.ucrPnlClimograph = New instat.UcrPanel()
+ Me.ucrBase = New instat.ucrButtons()
+ Me.ucrSave = New instat.ucrSave()
+ Me.ucrReceiverMonth = New instat.ucrReceiverSingle()
+ Me.lblMonth = New System.Windows.Forms.Label()
+ Me.ucrSelectorClimograph = New instat.ucrSelectorByDataFrameAddRemove()
Me.SuspendLayout()
'
+ 'ucrReceiverAbsolute
+ '
+ Me.ucrReceiverAbsolute.AutoSize = True
+ Me.ucrReceiverAbsolute.frmParent = Me
+ Me.ucrReceiverAbsolute.Location = New System.Drawing.Point(267, 280)
+ Me.ucrReceiverAbsolute.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrReceiverAbsolute.Name = "ucrReceiverAbsolute"
+ Me.ucrReceiverAbsolute.Selector = Nothing
+ Me.ucrReceiverAbsolute.Size = New System.Drawing.Size(120, 20)
+ Me.ucrReceiverAbsolute.strNcFilePath = ""
+ Me.ucrReceiverAbsolute.TabIndex = 77
+ Me.ucrReceiverAbsolute.ucrSelector = Nothing
+ '
+ 'lblAbsolute
+ '
+ Me.lblAbsolute.AutoSize = True
+ Me.lblAbsolute.Location = New System.Drawing.Point(267, 264)
+ Me.lblAbsolute.Name = "lblAbsolute"
+ Me.lblAbsolute.Size = New System.Drawing.Size(111, 13)
+ Me.lblAbsolute.TabIndex = 76
+ Me.lblAbsolute.Text = "Temperature min, min:"
+ '
+ 'ucrInputStation
+ '
+ Me.ucrInputStation.AddQuotesIfUnrecognised = True
+ Me.ucrInputStation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrInputStation.GetSetSelectedIndex = -1
+ Me.ucrInputStation.IsReadOnly = False
+ Me.ucrInputStation.Location = New System.Drawing.Point(379, 68)
+ Me.ucrInputStation.Name = "ucrInputStation"
+ Me.ucrInputStation.Size = New System.Drawing.Size(86, 21)
+ Me.ucrInputStation.TabIndex = 65
+ '
+ 'ucr1stFactorReceiver
+ '
+ Me.ucr1stFactorReceiver.AutoSize = True
+ Me.ucr1stFactorReceiver.frmParent = Me
+ Me.ucr1stFactorReceiver.Location = New System.Drawing.Point(267, 68)
+ Me.ucr1stFactorReceiver.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucr1stFactorReceiver.Name = "ucr1stFactorReceiver"
+ Me.ucr1stFactorReceiver.Selector = Nothing
+ Me.ucr1stFactorReceiver.Size = New System.Drawing.Size(109, 26)
+ Me.ucr1stFactorReceiver.strNcFilePath = ""
+ Me.ucr1stFactorReceiver.TabIndex = 64
+ Me.ucr1stFactorReceiver.ucrSelector = Nothing
+ '
+ 'lblFacetBy
+ '
+ Me.lblFacetBy.AutoSize = True
+ Me.lblFacetBy.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblFacetBy.Location = New System.Drawing.Point(267, 53)
+ Me.lblFacetBy.Name = "lblFacetBy"
+ Me.lblFacetBy.Size = New System.Drawing.Size(43, 13)
+ Me.lblFacetBy.TabIndex = 63
+ Me.lblFacetBy.Tag = ""
+ Me.lblFacetBy.Text = "Station:"
+ '
+ 'ucrReceiverRain
+ '
+ Me.ucrReceiverRain.AutoSize = True
+ Me.ucrReceiverRain.frmParent = Me
+ Me.ucrReceiverRain.Location = New System.Drawing.Point(267, 150)
+ Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrReceiverRain.Name = "ucrReceiverRain"
+ Me.ucrReceiverRain.Selector = Nothing
+ Me.ucrReceiverRain.Size = New System.Drawing.Size(120, 20)
+ Me.ucrReceiverRain.strNcFilePath = ""
+ Me.ucrReceiverRain.TabIndex = 69
+ Me.ucrReceiverRain.ucrSelector = Nothing
+ '
+ 'lblRain
+ '
+ Me.lblRain.AutoSize = True
+ Me.lblRain.Location = New System.Drawing.Point(267, 134)
+ Me.lblRain.Name = "lblRain"
+ Me.lblRain.Size = New System.Drawing.Size(48, 13)
+ Me.lblRain.TabIndex = 68
+ Me.lblRain.Text = "RainFall:"
+ '
+ 'ucrReceiverMaxtem
+ '
+ Me.ucrReceiverMaxtem.AutoSize = True
+ Me.ucrReceiverMaxtem.frmParent = Me
+ Me.ucrReceiverMaxtem.Location = New System.Drawing.Point(267, 193)
+ Me.ucrReceiverMaxtem.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrReceiverMaxtem.Name = "ucrReceiverMaxtem"
+ Me.ucrReceiverMaxtem.Selector = Nothing
+ Me.ucrReceiverMaxtem.Size = New System.Drawing.Size(120, 20)
+ Me.ucrReceiverMaxtem.strNcFilePath = ""
+ Me.ucrReceiverMaxtem.TabIndex = 71
+ Me.ucrReceiverMaxtem.ucrSelector = Nothing
+ '
+ 'lblMaxtem
+ '
+ Me.lblMaxtem.AutoSize = True
+ Me.lblMaxtem.Location = New System.Drawing.Point(267, 177)
+ Me.lblMaxtem.Name = "lblMaxtem"
+ Me.lblMaxtem.Size = New System.Drawing.Size(93, 13)
+ Me.lblMaxtem.TabIndex = 70
+ Me.lblMaxtem.Text = "Temperature Max:"
+ '
+ 'ucrReceiverMintemp
+ '
+ Me.ucrReceiverMintemp.AutoSize = True
+ Me.ucrReceiverMintemp.frmParent = Me
+ Me.ucrReceiverMintemp.Location = New System.Drawing.Point(267, 234)
+ Me.ucrReceiverMintemp.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrReceiverMintemp.Name = "ucrReceiverMintemp"
+ Me.ucrReceiverMintemp.Selector = Nothing
+ Me.ucrReceiverMintemp.Size = New System.Drawing.Size(120, 20)
+ Me.ucrReceiverMintemp.strNcFilePath = ""
+ Me.ucrReceiverMintemp.TabIndex = 73
+ Me.ucrReceiverMintemp.ucrSelector = Nothing
+ '
+ 'lblMintem
+ '
+ Me.lblMintem.AutoSize = True
+ Me.lblMintem.Location = New System.Drawing.Point(267, 218)
+ Me.lblMintem.Name = "lblMintem"
+ Me.lblMintem.Size = New System.Drawing.Size(90, 13)
+ Me.lblMintem.TabIndex = 72
+ Me.lblMintem.Text = "Temperature Min:"
+ '
+ 'rdoClimograph
+ '
+ Me.rdoClimograph.Appearance = System.Windows.Forms.Appearance.Button
+ Me.rdoClimograph.BackColor = System.Drawing.SystemColors.Control
+ Me.rdoClimograph.Enabled = False
+ Me.rdoClimograph.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoClimograph.FlatAppearance.BorderSize = 2
+ Me.rdoClimograph.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoClimograph.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.rdoClimograph.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoClimograph.Location = New System.Drawing.Point(195, 13)
+ Me.rdoClimograph.Name = "rdoClimograph"
+ Me.rdoClimograph.Size = New System.Drawing.Size(119, 28)
+ Me.rdoClimograph.TabIndex = 62
+ Me.rdoClimograph.TabStop = True
+ Me.rdoClimograph.Tag = ""
+ Me.rdoClimograph.Text = "Ordinary Climograph"
+ Me.rdoClimograph.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
+ Me.rdoClimograph.UseVisualStyleBackColor = False
+ '
+ 'rdoWalterLieth
+ '
+ Me.rdoWalterLieth.Appearance = System.Windows.Forms.Appearance.Button
+ Me.rdoWalterLieth.BackColor = System.Drawing.SystemColors.Control
+ Me.rdoWalterLieth.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoWalterLieth.FlatAppearance.BorderSize = 2
+ Me.rdoWalterLieth.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoWalterLieth.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.rdoWalterLieth.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoWalterLieth.Location = New System.Drawing.Point(117, 13)
+ Me.rdoWalterLieth.Name = "rdoWalterLieth"
+ Me.rdoWalterLieth.Size = New System.Drawing.Size(80, 28)
+ Me.rdoWalterLieth.TabIndex = 61
+ Me.rdoWalterLieth.TabStop = True
+ Me.rdoWalterLieth.Tag = ""
+ Me.rdoWalterLieth.Text = "Walter Lieth"
+ Me.rdoWalterLieth.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
+ Me.rdoWalterLieth.UseVisualStyleBackColor = False
+ '
+ 'ucrPnlClimograph
+ '
+ Me.ucrPnlClimograph.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrPnlClimograph.Location = New System.Drawing.Point(107, 5)
+ Me.ucrPnlClimograph.Name = "ucrPnlClimograph"
+ Me.ucrPnlClimograph.Size = New System.Drawing.Size(236, 41)
+ Me.ucrPnlClimograph.TabIndex = 60
+ '
+ 'ucrBase
+ '
+ Me.ucrBase.AutoSize = True
+ Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrBase.Location = New System.Drawing.Point(12, 332)
+ Me.ucrBase.Name = "ucrBase"
+ Me.ucrBase.Size = New System.Drawing.Size(408, 52)
+ Me.ucrBase.TabIndex = 75
+ '
+ 'ucrSave
+ '
+ Me.ucrSave.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrSave.Location = New System.Drawing.Point(12, 305)
+ Me.ucrSave.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
+ Me.ucrSave.Name = "ucrSave"
+ Me.ucrSave.Size = New System.Drawing.Size(282, 24)
+ Me.ucrSave.TabIndex = 74
+ '
+ 'ucrReceiverMonth
+ '
+ Me.ucrReceiverMonth.AutoSize = True
+ Me.ucrReceiverMonth.frmParent = Me
+ Me.ucrReceiverMonth.Location = New System.Drawing.Point(267, 109)
+ Me.ucrReceiverMonth.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrReceiverMonth.Name = "ucrReceiverMonth"
+ Me.ucrReceiverMonth.Selector = Nothing
+ Me.ucrReceiverMonth.Size = New System.Drawing.Size(120, 20)
+ Me.ucrReceiverMonth.strNcFilePath = ""
+ Me.ucrReceiverMonth.TabIndex = 67
+ Me.ucrReceiverMonth.ucrSelector = Nothing
+ '
+ 'lblMonth
+ '
+ Me.lblMonth.AutoSize = True
+ Me.lblMonth.Location = New System.Drawing.Point(267, 93)
+ Me.lblMonth.Name = "lblMonth"
+ Me.lblMonth.Size = New System.Drawing.Size(40, 13)
+ Me.lblMonth.TabIndex = 66
+ Me.lblMonth.Text = "Month:"
+ '
+ 'ucrSelectorClimograph
+ '
+ Me.ucrSelectorClimograph.AutoSize = True
+ Me.ucrSelectorClimograph.bDropUnusedFilterLevels = False
+ Me.ucrSelectorClimograph.bShowHiddenColumns = False
+ Me.ucrSelectorClimograph.bUseCurrentFilter = True
+ Me.ucrSelectorClimograph.Location = New System.Drawing.Point(11, 48)
+ Me.ucrSelectorClimograph.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrSelectorClimograph.Name = "ucrSelectorClimograph"
+ Me.ucrSelectorClimograph.Size = New System.Drawing.Size(213, 183)
+ Me.ucrSelectorClimograph.TabIndex = 59
+ '
'dlgClimograph
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(428, 450)
+ Me.ClientSize = New System.Drawing.Size(477, 388)
+ Me.Controls.Add(Me.ucrReceiverAbsolute)
+ Me.Controls.Add(Me.lblAbsolute)
+ Me.Controls.Add(Me.ucrInputStation)
+ Me.Controls.Add(Me.ucr1stFactorReceiver)
+ Me.Controls.Add(Me.lblFacetBy)
+ Me.Controls.Add(Me.ucrReceiverRain)
+ Me.Controls.Add(Me.lblRain)
+ Me.Controls.Add(Me.ucrReceiverMaxtem)
+ Me.Controls.Add(Me.lblMaxtem)
+ Me.Controls.Add(Me.ucrReceiverMintemp)
+ Me.Controls.Add(Me.lblMintem)
+ Me.Controls.Add(Me.rdoClimograph)
+ Me.Controls.Add(Me.rdoWalterLieth)
+ Me.Controls.Add(Me.ucrPnlClimograph)
+ Me.Controls.Add(Me.ucrBase)
+ Me.Controls.Add(Me.ucrSave)
+ Me.Controls.Add(Me.ucrReceiverMonth)
+ Me.Controls.Add(Me.lblMonth)
+ Me.Controls.Add(Me.ucrSelectorClimograph)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.MaximizeBox = False
Me.MinimizeBox = False
@@ -36,6 +296,27 @@ Partial Class dlgClimograph
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Climograph"
Me.ResumeLayout(False)
+ Me.PerformLayout()
End Sub
+
+ Friend WithEvents ucrReceiverAbsolute As ucrReceiverSingle
+ Friend WithEvents lblAbsolute As Label
+ Friend WithEvents ucrInputStation As ucrInputComboBox
+ Friend WithEvents ucr1stFactorReceiver As ucrReceiverSingle
+ Friend WithEvents lblFacetBy As Label
+ Friend WithEvents ucrReceiverRain As ucrReceiverSingle
+ Friend WithEvents lblRain As Label
+ Friend WithEvents ucrReceiverMaxtem As ucrReceiverSingle
+ Friend WithEvents lblMaxtem As Label
+ Friend WithEvents ucrReceiverMintemp As ucrReceiverSingle
+ Friend WithEvents lblMintem As Label
+ Friend WithEvents rdoClimograph As RadioButton
+ Friend WithEvents rdoWalterLieth As RadioButton
+ Friend WithEvents ucrPnlClimograph As UcrPanel
+ Friend WithEvents ucrBase As ucrButtons
+ Friend WithEvents ucrSave As ucrSave
+ Friend WithEvents ucrReceiverMonth As ucrReceiverSingle
+ Friend WithEvents lblMonth As Label
+ Friend WithEvents ucrSelectorClimograph As ucrSelectorByDataFrameAddRemove
End Class
diff --git a/instat/dlgClimograph.vb b/instat/dlgClimograph.vb
index 26752c99347..5852c08272f 100644
--- a/instat/dlgClimograph.vb
+++ b/instat/dlgClimograph.vb
@@ -1,3 +1,358 @@
-Public Class dlgClimograph
+' R- Instat
+' Copyright (C) 2015-2017
+'
+' This program is free software: you can redistribute it and/or modify
+' it under the terms of the GNU General Public License as published by
+' the Free Software Foundation, either version 3 of the License, or
+' (at your option) any later version.
+'
+' This program is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU General Public License for more details.
+'
+' You should have received a copy of the GNU General Public License
+' along with this program. If not, see .
+Imports instat.Translations
+
+Public Class dlgClimograph
+ Private bFirstload As Boolean = True
+ Private bReset As Boolean = True
+ Private clsGgwalterliethFunction, clsDummyFunction As RFunction
+ Private clsBaseOperator As New ROperator
+ Private ReadOnly strFacetWrap As String = "Facet Wrap"
+ Private ReadOnly strFacetRow As String = "Facet Row"
+ Private ReadOnly strFacetCol As String = "Facet Column"
+ Private ReadOnly strNone As String = "None"
+ Private clsFacetFunction As New RFunction
+ Private clsGroupByFunction As New RFunction
+ Private clsFacetOperator As New ROperator
+ Private clsFacetRowOp As New ROperator
+ Private clsFacetColOp As New ROperator
+ Private clsPipeOperator As New ROperator
+ Private bUpdateComboOptions As Boolean = True
+ Private bUpdatingParameters As Boolean = False
+
+ Private Sub dlgClimograph_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ If bFirstload Then
+ InitialiseDialog()
+ bFirstload = False
+ End If
+ If bReset Then
+ SetDefaults()
+ End If
+ SetRCodeForControls(bReset)
+ bReset = False
+ TestOKEnabled()
+ autoTranslate(Me)
+ End Sub
+
+ Private Sub InitialiseDialog()
+ ucrBase.iHelpTopicID = 432
+
+ ucrSelectorClimograph.SetParameter(New RParameter("data", 0))
+ ucrSelectorClimograph.SetParameterIsrfunction()
+
+ ucrPnlClimograph.AddRadioButton(rdoClimograph)
+ ucrPnlClimograph.AddRadioButton(rdoWalterLieth)
+ ucrPnlClimograph.AddParameterValuesCondition(rdoWalterLieth, "checked", "WalterLieth")
+ ucrPnlClimograph.AddParameterValuesCondition(rdoClimograph, "checked", "Climograph")
+
+ ucrReceiverMonth.SetParameter(New RParameter("month", 1))
+ ucrReceiverMonth.SetParameterIsString()
+ ucrReceiverMonth.Selector = ucrSelectorClimograph
+ ucrReceiverMonth.SetClimaticType("month")
+ ucrReceiverMonth.bAutoFill = True
+ ucrReceiverMonth.strSelectorHeading = "Month Variables"
+ ucrReceiverMonth.SetLinkedDisplayControl(lblMonth)
+
+ ucrReceiverRain.SetParameter(New RParameter("p_mes", 3))
+ ucrReceiverRain.SetParameterIsString()
+ ucrReceiverRain.Selector = ucrSelectorClimograph
+ ucrReceiverRain.SetClimaticType("rain")
+ ucrReceiverRain.bAutoFill = True
+ ucrReceiverRain.strSelectorHeading = "Rain Variables"
+ ucrReceiverRain.SetLinkedDisplayControl(lblRain)
+
+ ucrReceiverMaxtem.SetParameter(New RParameter("tm_max", 4))
+ ucrReceiverMaxtem.SetParameterIsString()
+ ucrReceiverMaxtem.Selector = ucrSelectorClimograph
+ ucrReceiverMaxtem.SetClimaticType("temp_max")
+ ucrReceiverMaxtem.bAutoFill = True
+ ucrReceiverMaxtem.strSelectorHeading = "Variables"
+ ucrReceiverMaxtem.SetLinkedDisplayControl(lblMaxtem)
+
+ ucrReceiverMintemp.SetParameter(New RParameter("tm_min", 5))
+ ucrReceiverMintemp.SetParameterIsString()
+ ucrReceiverMintemp.Selector = ucrSelectorClimograph
+ ucrReceiverMintemp.SetClimaticType("temp_min")
+ ucrReceiverMintemp.bAutoFill = True
+ ucrReceiverMintemp.strSelectorHeading = "Variables"
+ ucrReceiverMintemp.SetLinkedDisplayControl(lblMintem)
+
+ ucr1stFactorReceiver.SetParameter(New RParameter("station"))
+ ucr1stFactorReceiver.Selector = ucrSelectorClimograph
+ ucr1stFactorReceiver.SetIncludedDataTypes({"factor"})
+ ucr1stFactorReceiver.strSelectorHeading = "Factors"
+ ucr1stFactorReceiver.bWithQuotes = False
+ ucr1stFactorReceiver.SetParameterIsString()
+ ucr1stFactorReceiver.SetValuesToIgnore({"."})
+
+ ucrInputStation.SetItems({strFacetWrap, strFacetRow, strFacetCol, strNone})
+ ucrInputStation.SetDropDownStyleAsNonEditable()
+
+ ucrReceiverAbsolute.SetParameter(New RParameter("ta_min", 6))
+ ucrReceiverAbsolute.SetParameterIsString()
+ ucrReceiverAbsolute.Selector = ucrSelectorClimograph
+ ucrReceiverAbsolute.strSelectorHeading = "Variables"
+ ucrReceiverAbsolute.SetLinkedDisplayControl(lblAbsolute)
+
+ ucrSave.SetPrefix("wl_graph")
+ ucrSave.SetIsComboBox()
+ ucrSave.SetSaveTypeAsGraph()
+ ucrSave.SetCheckBoxText("Save")
+ ucrSave.SetDataFrameSelector(ucrSelectorClimograph.ucrAvailableDataFrames)
+ ucrSave.SetAssignToIfUncheckedValue("last_graph")
+ End Sub
+
+ Private Sub SetDefaults()
+ clsGgwalterliethFunction = New RFunction
+ clsBaseOperator = New ROperator
+ clsDummyFunction = New RFunction
+ clsGroupByFunction = New RFunction
+ clsPipeOperator = New ROperator
+
+ clsFacetFunction = New RFunction
+ clsFacetOperator = New ROperator
+ clsFacetRowOp = New ROperator
+ clsFacetColOp = New ROperator
+
+ ucrSelectorClimograph.Reset()
+ ucrSave.Reset()
+
+ ucrInputStation.SetName(strFacetWrap)
+ ucrInputStation.bUpdateRCodeFromControl = True
+
+ ucrReceiverMonth.SetMeAsReceiver()
+
+ clsDummyFunction.AddParameter("checked", "WalterLieth", iPosition:=0)
+
+ clsPipeOperator.SetOperation("%>%")
+ SetPipeAssignTo()
+
+ clsGgwalterliethFunction.SetRCommand("ggwalter_lieth")
+
+ clsFacetFunction.SetPackageName("ggplot2")
+ clsFacetRowOp.SetOperation("+")
+ clsFacetRowOp.bBrackets = False
+ clsFacetColOp.SetOperation("+")
+ clsFacetColOp.bBrackets = False
+ clsFacetOperator.SetOperation("~")
+ clsFacetOperator.bForceIncludeOperation = True
+ clsFacetOperator.bBrackets = False
+ clsFacetFunction.AddParameter("facets", clsROperatorParameter:=clsFacetOperator, iPosition:=0)
+
+ clsGroupByFunction.SetPackageName("dplyr")
+ clsGroupByFunction.SetRCommand("group_by")
+
+ clsBaseOperator.SetOperation("+")
+ clsBaseOperator.AddParameter("ggwalter_lieth", clsRFunctionParameter:=clsGgwalterliethFunction, iPosition:=0)
+
+ ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator)
+ End Sub
+
+ Private Sub SetRCodeForControls(bReset)
+ ucrSelectorClimograph.SetRCode(clsGgwalterliethFunction, bReset)
+ ucrPnlClimograph.SetRCode(clsDummyFunction, bReset)
+ ucrReceiverMonth.SetRCode(clsGgwalterliethFunction, bReset)
+ ucrReceiverRain.SetRCode(clsGgwalterliethFunction, bReset)
+ ucrReceiverMintemp.SetRCode(clsGgwalterliethFunction, bReset)
+ ucrReceiverMaxtem.SetRCode(clsGgwalterliethFunction, bReset)
+ ucrReceiverAbsolute.SetRCode(clsGgwalterliethFunction, bReset)
+ ucrSave.SetRCode(clsBaseOperator, bReset)
+ If bReset Then
+ AutoFacetStation()
+ End If
+ End Sub
+
+ Private Sub TestOKEnabled()
+ If rdoWalterLieth.Checked AndAlso ((Not ucrReceiverAbsolute.IsEmpty AndAlso Not ucrReceiverMaxtem.IsEmpty AndAlso Not ucrReceiverMintemp.IsEmpty AndAlso Not ucrReceiverMonth.IsEmpty AndAlso Not ucrReceiverRain.IsEmpty) OrElse Not ucrSave.IsComplete) Then
+ ucrBase.OKEnabled(True)
+ Else
+ ucrBase.OKEnabled(False)
+ End If
+ End Sub
+
+ Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset
+ SetDefaults()
+ SetRCodeForControls(True)
+ UpdateParameters()
+ TestOKEnabled()
+ End Sub
+
+ Private Sub ucrInput_ControlValueChanged(ucrChangedControl As ucrInputComboBox) Handles ucrInputStation.ControlValueChanged
+ If Not bUpdateComboOptions Then
+ Exit Sub
+ End If
+ Dim strChangedText As String = ucrChangedControl.GetText()
+ If strChangedText <> strNone Then
+ If Not strChangedText = strFacetCol AndAlso Not strChangedText = strFacetRow AndAlso
+ Not ucrInputStation.Equals(ucrChangedControl) AndAlso ucrInputStation.GetText() = strChangedText Then
+ bUpdateComboOptions = False
+ ucrInputStation.SetName(strNone)
+ bUpdateComboOptions = True
+ End If
+ If (strChangedText = strFacetWrap AndAlso ucrInputStation.GetText = strFacetRow) OrElse (strChangedText = strFacetRow AndAlso
+ ucrInputStation.GetText = strFacetWrap) OrElse (strChangedText = strFacetWrap AndAlso
+ ucrInputStation.GetText = strFacetCol) OrElse (strChangedText = strFacetCol AndAlso ucrInputStation.GetText = strFacetWrap) Then
+ ucrInputStation.SetName(strNone)
+ End If
+ End If
+ UpdateParameters()
+ AddRemoveFacets()
+ AddRemoveGroupBy()
+ End Sub
+
+ Private Sub UpdateParameters()
+ clsFacetOperator.RemoveParameterByName("wrap" & ucrInputStation.Name)
+ clsFacetColOp.RemoveParameterByName("col" & ucrInputStation.Name)
+ clsFacetRowOp.RemoveParameterByName("row" & ucrInputStation.Name)
+
+ clsBaseOperator.RemoveParameterByName("facets")
+ bUpdatingParameters = True
+ ucr1stFactorReceiver.SetRCode(Nothing)
+ Select Case ucrInputStation.GetText()
+ Case strFacetWrap
+ ucr1stFactorReceiver.ChangeParameterName("wrap" & ucrInputStation.Name)
+ ucr1stFactorReceiver.SetRCode(clsFacetOperator)
+ Case strFacetCol
+ ucr1stFactorReceiver.ChangeParameterName("col" & ucrInputStation.Name)
+ ucr1stFactorReceiver.SetRCode(clsFacetColOp)
+ Case strFacetRow
+ ucr1stFactorReceiver.ChangeParameterName("row" & ucrInputStation.Name)
+ ucr1stFactorReceiver.SetRCode(clsFacetRowOp)
+ End Select
+ bUpdatingParameters = False
+ End Sub
+
+ Private Sub AddRemoveFacets()
+ Dim bWrap As Boolean = False
+ Dim bCol As Boolean = False
+ Dim bRow As Boolean = False
+
+ If bUpdatingParameters Then
+ Exit Sub
+ End If
+
+ clsBaseOperator.RemoveParameterByName("facets")
+ If Not ucr1stFactorReceiver.IsEmpty Then
+ Select Case ucrInputStation.GetText()
+ Case strFacetWrap
+ bWrap = True
+ Case strFacetCol
+ bCol = True
+ Case strFacetRow
+ bRow = True
+ End Select
+ End If
+
+ If bWrap OrElse bRow OrElse bCol Then
+ clsBaseOperator.AddParameter("facets", clsRFunctionParameter:=clsFacetFunction)
+ End If
+ If bWrap Then
+ clsFacetFunction.SetRCommand("facet_wrap")
+ End If
+ If bRow OrElse bCol Then
+ clsFacetFunction.SetRCommand("facet_grid")
+ End If
+ If bRow Then
+ clsFacetOperator.AddParameter("left", clsROperatorParameter:=clsFacetRowOp, iPosition:=0)
+ ElseIf bCol AndAlso Not bWrap Then
+ clsFacetOperator.AddParameter("left", ".", iPosition:=0)
+ Else
+ clsFacetOperator.RemoveParameterByName("left")
+ End If
+ If bCol Then
+ clsFacetOperator.AddParameter("right", clsROperatorParameter:=clsFacetColOp, iPosition:=1)
+ ElseIf bRow AndAlso Not bWrap Then
+ clsFacetOperator.AddParameter("right", ".", iPosition:=1)
+ Else
+ clsFacetOperator.RemoveParameterByName("right")
+ End If
+ End Sub
+
+ Private Sub ucr1stFactorReceiver_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucr1stFactorReceiver.ControlValueChanged
+ If Not ucr1stFactorReceiver.IsEmpty Then
+ clsGgwalterliethFunction.AddParameter("station", ucr1stFactorReceiver.GetVariableNames(), iPosition:=1)
+ Else
+ clsGgwalterliethFunction.RemoveParameterByName("station")
+ End If
+ AddRemoveFacets()
+ AddRemoveGroupBy()
+ End Sub
+
+ Private Sub AutoFacetStation()
+ Dim ucrCurrentReceiver As ucrReceiver = ucrSelectorClimograph.CurrentReceiver
+
+ If ucrCurrentReceiver IsNot Nothing Then
+ ucr1stFactorReceiver.AddItemsWithMetadataProperty(ucrSelectorClimograph.ucrAvailableDataFrames.cboAvailableDataFrames.Text, "Climatic_Type", {"station_label"})
+ ucrCurrentReceiver.SetMeAsReceiver()
+ AddRemoveGroupBy()
+ End If
+ End Sub
+
+ Private Sub ucrSelectorClimograph_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorClimograph.ControlValueChanged
+ AutoFacetStation()
+ SetPipeAssignTo()
+ End Sub
+
+ Private Sub GetParameterValue(clsOperator As ROperator)
+ Dim i As Integer = 0
+ For Each clsTempParam As RParameter In clsOperator.clsParameters
+ If clsTempParam.strArgumentValue <> "" AndAlso clsTempParam.strArgumentValue <> "." Then
+ clsGroupByFunction.AddParameter(i, clsTempParam.strArgumentValue, bIncludeArgumentName:=False, iPosition:=i)
+ i = i + 1
+ End If
+ Next
+ End Sub
+
+ Private Sub AddRemoveGroupBy()
+
+ If clsPipeOperator.ContainsParameter("mutate") Then
+ clsGroupByFunction.ClearParameters()
+ If clsBaseOperator.ContainsParameter("facets") Then
+ Select Case ucrInputStation.GetText()
+ Case strFacetWrap
+ GetParameterValue(clsFacetOperator)
+ Case strFacetCol
+ GetParameterValue(clsFacetColOp)
+ Case strFacetRow
+ GetParameterValue(clsFacetRowOp)
+ End Select
+ End If
+
+ If clsGroupByFunction.iParameterCount > 0 Then
+ clsPipeOperator.AddParameter("group_by", clsRFunctionParameter:=clsGroupByFunction, iPosition:=1)
+ Else
+ clsPipeOperator.RemoveParameterByName("group_by")
+ End If
+ Else
+ clsPipeOperator.RemoveParameterByName("group_by")
+ End If
+
+ SetPipeAssignTo()
+ End Sub
+
+ Private Sub SetPipeAssignTo()
+ If ucrSelectorClimograph.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" AndAlso clsPipeOperator.clsParameters.Count > 1 Then
+ clsPipeOperator.SetAssignTo(ucrSelectorClimograph.ucrAvailableDataFrames.cboAvailableDataFrames.Text)
+ Else
+ clsPipeOperator.RemoveAssignTo()
+ End If
+ End Sub
+
+ Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlClimograph.ControlContentsChanged, ucrReceiverRain.ControlContentsChanged, ucrReceiverAbsolute.ControlContentsChanged, ucrReceiverMonth.ControlContentsChanged, ucrReceiverMaxtem.ControlContentsChanged, ucrReceiverMintemp.ControlContentsChanged, ucrSave.ControlContentsChanged
+ TestOKEnabled()
+ End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb
index 30e4f41a1c4..f3c9791ff6d 100644
--- a/instat/dlgDescribeTwoVariable.vb
+++ b/instat/dlgDescribeTwoVariable.vb
@@ -38,10 +38,9 @@ Public Class dlgDescribeTwoVariable
clsTabStyleCellTextFunction, clsTabStyleCellTitleFunction, clsTabStyleFunction,
clsTabStylePxFunction, clsgtExtrasThemesFuction As New RFunction
- Private clsGroupByPipeOperator, clsSummaryOperator As New ROperator
+ Private clsGroupByPipeOperator, clsSummaryOperator, clsTildOperator, clsMapOperator, clsPivotOperator As New ROperator
- Private clsFrequencyTablesFunction, clsgtFunction, clsCombineFrequencyFactorParameterFunction,
- clsSelectFunction, clsRenameCombineFunction As New RFunction
+ Private clsgtFunction, clsMapSummaryFunction, clsMapGtFunction As New RFunction
'Frequency Parameters
Private lstFrequencyParameters As New List(Of String)({"percentage_type", "margin_name",
"perc_total_factors", "perc_decimal",
@@ -198,9 +197,14 @@ Public Class dlgDescribeTwoVariable
clsTabFootnoteOperator = New ROperator
clsgtFunction = New RFunction
clsSummaryOperator = New ROperator
+ clsMapOperator = New ROperator
clsPivotWiderFunction = New RFunction
clsgtExtrasThemesFuction = New RFunction
clsMutableOperator = New ROperator
+ clsTildOperator = New ROperator
+ clsMapSummaryFunction = New RFunction
+ clsMapGtFunction = New RFunction
+ clsPivotOperator = New ROperator
ucrSelectorDescribeTwoVar.Reset()
ucrReceiverFirstVars.SetMeAsReceiver()
@@ -218,7 +222,7 @@ Public Class dlgDescribeTwoVariable
clsDummyFunction.AddParameter("row_sum", "False", iPosition:=3)
clsPivotWiderFunction.SetRCommand("pivot_wider")
- clsPivotWiderFunction.AddParameter("values_from", "value", iPosition:=1)
+ clsPivotWiderFunction.AddParameter("values_from", "value", iPosition:=2)
clsFootnoteCellBodyFunction.SetPackageName("gt")
clsFootnoteCellBodyFunction.SetRCommand("cells_body")
@@ -277,14 +281,41 @@ Public Class dlgDescribeTwoVariable
clsSummaryTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table")
clsSummaryTableFunction.AddParameter("treat_columns_as_factor", "FALSE", iPosition:=3)
- clsSummaryTableFunction.SetAssignTo("summary_table")
+ 'clsSummaryTableFunction.SetAssignTo("summary_table")
+
+ clsTildOperator.SetOperation("~")
+ clsTildOperator.AddParameter("right", clsRFunctionParameter:=clsSummaryTableFunction)
+ clsTildOperator.bBrackets = False
+ clsTildOperator.bForceIncludeOperation = True
+ clsTildOperator.bSpaceAroundOperation = False
+
+ clsMapSummaryFunction.SetPackageName("purrr")
+ clsMapSummaryFunction.SetRCommand("map")
+ clsMapSummaryFunction.AddParameter(".f", clsROperatorParameter:=clsMapOperator, iPosition:=1)
+
+ clsMapGtFunction.SetPackageName("purrr")
+ clsMapGtFunction.SetRCommand("map")
+ clsMapGtFunction.AddParameter("gttbl", clsRFunctionParameter:=clsgtFunction, bIncludeArgumentName:=False)
clsgtFunction.SetPackageName("gt")
clsgtFunction.SetRCommand("gt")
clsSummaryOperator.SetOperation("%>%")
- clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsSummaryTableFunction, iPosition:=0)
- clsSummaryOperator.AddParameter("gttbl", clsRFunctionParameter:=clsgtFunction, iPosition:=1)
+ clsSummaryOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
+ clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsMapSummaryFunction, iPosition:=1)
+ 'clsSummaryOperator.AddParameter("gttbl", clsRFunctionParameter:=clsgtFunction, iPosition:=1)
+
+ clsPivotOperator.SetOperation("%>%")
+ clsPivotOperator.AddParameter("left", clsRFunctionParameter:=clsPivotWiderFunction)
+ clsPivotOperator.AddParameter("right", clsRFunctionParameter:=clsgtFunction)
+ clsPivotOperator.bBrackets = False
+
+ clsMapOperator.SetOperation("%>%")
+ clsMapOperator.AddParameter("left", clsROperatorParameter:=clsTildOperator)
+ 'clsMapOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
+ 'clsMapOperator.AddParameter("tableFun", clsRFunctionParameter:=clsMapSummaryFunction, iPosition:=1)
+ clsMapOperator.AddParameter("right", clsROperatorParameter:=clsPivotOperator)
+ clsMapOperator.bBrackets = False
clsJoiningPipeOperator.SetOperation("%>%")
clsJoiningPipeOperator.AddParameter("gtable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0)
@@ -340,14 +371,15 @@ Public Class dlgDescribeTwoVariable
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)
+ ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsMapSummaryFunction, New RParameter(".x", 1), iAdditionalPairNo:=4)
ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1)
ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2)
ucrSaveTable.AddAdditionalRCode(clsJoiningPipeOperator, iAdditionalPairNo:=1)
ucrChkOmitMissing.SetRCode(clsSummaryTableFunction, bReset)
- ucrReceiverFirstVars.SetRCode(clsSummaryTableFunction, bReset)
- ucrReceiverSecondTwoVariableFactor.SetRCode(clsSummaryTableFunction, bReset)
+ ucrReceiverFirstVars.SetRCode(clsDummyFunction, bReset)
+ ucrReceiverSecondTwoVariableFactor.SetRCode(clsDummyFunction, bReset)
ucrSelectorDescribeTwoVar.SetRCode(clsRCorrelationFunction, bReset)
ucrReceiverSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset)
ucrReceiverSecondSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset)
@@ -613,13 +645,13 @@ Public Class dlgDescribeTwoVariable
Private Sub FactorColumns()
If rdoTwoVariable.Checked Then
- clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1)
If IsFactorByFactor() Then
- clsSummaryTableFunction.AddParameter("factors", "c(" & Chr(34) & ucrReceiverFirstVars.lstSelectedVariables.Items(0).Text & Chr(34) & "," & ucrReceiverSecondTwoVariableFactor.GetVariableNames & ")")
- clsSummaryTableFunction.AddParameter("columns_to_summarise", Chr(34) & ucrReceiverFirstVars.lstSelectedVariables.Items(0).Text & Chr(34))
- clsPivotWiderFunction.AddParameter("names_from", ucrReceiverFirstVars.lstSelectedVariables.Items(0).Text, iPosition:=0)
+ clsSummaryTableFunction.AddParameter("factors", "c(" & ucrReceiverSecondTwoVariableFactor.GetVariableNames & "," & ".x" & ")")
+ clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x")
+ clsPivotWiderFunction.AddParameter("names_from", "{{ .x }}", iPosition:=1)
Else
- clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0)
+ clsSummaryTableFunction.AddParameter("factors", ucrReceiverSecondTwoVariableFactor.GetVariableNames)
+ clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=1)
clsSummaryTableFunction.AddParameter("columns_to_summarise", ucrReceiverFirstVars.GetVariableNames)
SummariesInRowsOrCols()
End If
@@ -769,10 +801,10 @@ Public Class dlgDescribeTwoVariable
Private Sub SummariesInRowsOrCols()
If ucrChkSummariesRowCol.Checked Then
- clsPivotWiderFunction.AddParameter("names_from", ucrReceiverSecondTwoVariableFactor.GetVariableNames(False), iPosition:=0)
+ clsPivotWiderFunction.AddParameter("names_from", ucrReceiverSecondTwoVariableFactor.GetVariableNames(False), iPosition:=1)
clsDummyFunction.AddParameter("row_sum", "True", iPosition:=3)
Else
- clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0)
+ clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=1)
clsDummyFunction.AddParameter("row_sum", "False", iPosition:=3)
End If
ManageControlsVisibility()
diff --git a/instat/dlgDuplicateColumns.vb b/instat/dlgDuplicateColumns.vb
index b69e0e7aded..449efa4c616 100644
--- a/instat/dlgDuplicateColumns.vb
+++ b/instat/dlgDuplicateColumns.vb
@@ -125,7 +125,7 @@ Public Class dlgDuplicateColumns
Private Sub SetDefaults()
clsDuplicateFunction = New RFunction
clsConvertFunction = New RFunction
- ucrBase.clsRsyntax.lstAfterCodes.Clear()
+ ucrBase.clsRsyntax.GetAfterCodes.Clear()
ucrSelectorForDuplicateColumn.Reset()
ucrSaveColumn.Reset()
diff --git a/instat/dlgEvapotranspiration.vb b/instat/dlgEvapotranspiration.vb
index 13e70ffc238..45452879aa7 100644
--- a/instat/dlgEvapotranspiration.vb
+++ b/instat/dlgEvapotranspiration.vb
@@ -226,8 +226,6 @@ Public Class dlgEvapotranspiration
clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPMFunction, iPosition:=0)
clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPMFunction, iPosition:=1)
clsReadInputsFunction.AddParameter("missing_method", Chr(34) & "monthly average" & Chr(34), iPosition:=8)
- clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPTFunction, iPosition:=10)
- clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPTFunction, iPosition:=11)
clsReadInputsFunction.SetAssignTo("temp_data")
clsVarnamesVectorPTFunction.SetRCommand("c")
@@ -295,6 +293,8 @@ Public Class dlgEvapotranspiration
ucrBase.clsRsyntax.ClearCodes()
ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator)
ucrBase.clsRsyntax.AddToBeforeCodes(clsListFunction, iPosition:=1)
+
+ Constants()
End Sub
Private Sub SetRCodeForControls(bReset As Boolean)
@@ -316,7 +316,6 @@ Public Class dlgEvapotranspiration
ucrReceiverTmin.SetRCode(clsDataFunctionPMFunction, bReset)
ucrReceiverHumidityMax.SetRCode(clsDataFunctionPMFunction, bReset)
ucrReceiverHumidityMin.SetRCode(clsDataFunctionPMFunction, bReset)
- ucrReceiverWindSpeed.SetRCode(clsDataFunctionPMFunction, bReset)
ucrInputTimeStep.SetRCode(clsETPenmanMonteithFunction, bReset)
ucrInputCrop.SetRCode(clsETPenmanMonteithFunction, bReset)
ucrChkWind.SetRCode(clsETPenmanMonteithFunction, bReset)
@@ -324,6 +323,7 @@ Public Class dlgEvapotranspiration
ucrPnlMethod.SetRCode(clsBaseOperator, bReset)
ucrNudAlpha.SetRCode(clsETPriestleyTaylorFunction, bReset)
If bReset Then
+ ucrReceiverWindSpeed.SetRCode(clsDataFunctionPMFunction, bReset)
ucrInputSolar.SetRCode(clsETPenmanMonteithFunction, bReset)
End If
End Sub
@@ -488,9 +488,9 @@ Public Class dlgEvapotranspiration
Private Sub ucrReceiverWindSpeed_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverWindSpeed.ControlValueChanged, ucrChkWind.ControlValueChanged
If ucrChkWind.Checked AndAlso Not ucrReceiverWindSpeed.IsEmpty Then
- clsVarnamesVectorPMFunction.AddParameter("u2", Chr(34) & "u2" & Chr(34), bIncludeArgumentName:=False)
+ clsVarnamesVectorPMFunction.AddParameter("x", Chr(34) & "u2" & Chr(34), bIncludeArgumentName:=False)
Else
- clsVarnamesVectorPMFunction.RemoveParameterByName("u2")
+ clsVarnamesVectorPMFunction.RemoveParameterByName("x")
ucrReceiverHumidityMax.SetMeAsReceiver()
End If
End Sub
@@ -610,7 +610,7 @@ Public Class dlgEvapotranspiration
Solar()
End Sub
- Private Sub ucrPnlMethod_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlMethod.ControlContentsChanged, ucrNewColName.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverTmax.ControlContentsChanged, ucrReceiverTmin.ControlContentsChanged, ucrReceiverHumidityMax.ControlContentsChanged, ucrReceiverHumidityMin.ControlContentsChanged, ucrReceiverRadiation.ControlContentsChanged, ucrReceiverWindSpeed.ControlContentsChanged, ucrInputTimeStep.ControlContentsChanged, ucrChkWind.ControlContentsChanged, ucrChkWind.ControlContentsChanged
+ Private Sub ucrPnlMethod_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlMethod.ControlContentsChanged, ucrNewColName.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverTmax.ControlContentsChanged, ucrReceiverTmin.ControlContentsChanged, ucrReceiverHumidityMax.ControlContentsChanged, ucrReceiverHumidityMin.ControlContentsChanged, ucrReceiverRadiation.ControlContentsChanged, ucrReceiverWindSpeed.ControlContentsChanged, ucrInputTimeStep.ControlContentsChanged, ucrChkWind.ControlContentsChanged
TestOKEnabled()
End Sub
End Class
diff --git a/instat/dlgExportToClimsoft.vb b/instat/dlgExportToClimsoft.vb
index 72c2faa3d8a..91876cd7eaf 100644
--- a/instat/dlgExportToClimsoft.vb
+++ b/instat/dlgExportToClimsoft.vb
@@ -171,7 +171,7 @@ Public Class dlgExportToClimsoft
End Sub
Private Sub ucrReceiverElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElements.ControlValueChanged
- ucrBase.clsRsyntax.lstBeforeCodes.Clear()
+ ucrBase.clsRsyntax.GetBeforeCodes().Clear()
clsCurrentNewColumnFunction = ucrReceiverElements.GetVariables(True).Clone
clsCurrentNewColumnFunction.SetAssignTo("columns")
ucrBase.clsRsyntax.AddToBeforeCodes(clsCurrentNewColumnFunction)
@@ -212,14 +212,14 @@ Public Class dlgExportToClimsoft
cmdBrowse.Visible = True
ElseIf ucrChkNewDataFrame.Checked AndAlso Not ucrChkExportDataFrame.Checked Then
ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator)
- ucrBase.clsRsyntax.lstAfterCodes.Clear()
+ ucrBase.clsRsyntax.GetAfterCodes().Clear()
cmdBrowse.Visible = False
ElseIf ucrChkExportDataFrame.Checked AndAlso Not ucrChkNewDataFrame.Checked Then
- ucrBase.clsRsyntax.lstBeforeCodes.Clear()
+ ucrBase.clsRsyntax.GetBeforeCodes().Clear()
ucrBase.clsRsyntax.AddToBeforeCodes(clsCurrentNewColumnFunction)
ucrBase.clsRsyntax.SetBaseRFunction(clsExportClimsoftFunction)
- ucrBase.clsRsyntax.lstAfterCodes.Clear()
+ ucrBase.clsRsyntax.GetAfterCodes().Clear()
cmdBrowse.Visible = True
End If
End Sub
diff --git a/instat/dlgHistogram.designer.vb b/instat/dlgHistogram.designer.vb
index 734dab62ee1..cd3e8c675ef 100644
--- a/instat/dlgHistogram.designer.vb
+++ b/instat/dlgHistogram.designer.vb
@@ -51,6 +51,18 @@ Partial Class dlgHistogram
Me.toolStripMenuItemDensityOptions = New System.Windows.Forms.ToolStripMenuItem()
Me.toolStripMenuItemDensityRidgesOptions = New System.Windows.Forms.ToolStripMenuItem()
Me.toolStripMenuItemFrequencyPolygonOptions = New System.Windows.Forms.ToolStripMenuItem()
+ Me.lblReorder = New System.Windows.Forms.Label()
+ Me.lblFacetBy = New System.Windows.Forms.Label()
+ Me.ucrNudMinHeight = New instat.ucrNud()
+ Me.ucrChkMinHeight = New instat.ucrCheck()
+ Me.ucrChkOmitYAxis = New instat.ucrCheck()
+ Me.ucrNudBinwidth = New instat.ucrNud()
+ Me.ucrChkBinWidth = New instat.ucrCheck()
+ Me.ucrInputStation = New instat.ucrInputComboBox()
+ Me.ucr1stFactorReceiver = New instat.ucrReceiverSingle()
+ Me.ucrInputLegendPosition = New instat.ucrInputComboBox()
+ Me.ucrChkLegend = New instat.ucrCheck()
+ Me.ucrInputAddReorder = New instat.ucrInputComboBox()
Me.cmdOptions = New instat.ucrSplitButton()
Me.ucrChkDisplayAsDotPlot = New instat.ucrCheck()
Me.ucrChkRidges = New instat.ucrCheck()
@@ -62,13 +74,6 @@ Partial Class dlgHistogram
Me.ucrHistogramSelector = New instat.ucrSelectorByDataFrameAddRemove()
Me.ucrBase = New instat.ucrButtons()
Me.ucrPnlOptions = New instat.UcrPanel()
- Me.lblReorder = New System.Windows.Forms.Label()
- Me.ucrInputAddReorder = New instat.ucrInputComboBox()
- Me.ucrInputStation = New instat.ucrInputComboBox()
- Me.ucr1stFactorReceiver = New instat.ucrReceiverSingle()
- Me.lblFacetBy = New System.Windows.Forms.Label()
- Me.ucrInputLegendPosition = New instat.ucrInputComboBox()
- Me.ucrChkLegend = New instat.ucrCheck()
Me.contextMenuStripOptions.SuspendLayout()
Me.SuspendLayout()
'
@@ -184,6 +189,135 @@ Partial Class dlgHistogram
Me.toolStripMenuItemFrequencyPolygonOptions.Size = New System.Drawing.Size(221, 22)
Me.toolStripMenuItemFrequencyPolygonOptions.Text = "Frequency Polygon Options"
'
+ 'lblReorder
+ '
+ Me.lblReorder.AutoSize = True
+ Me.lblReorder.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblReorder.Location = New System.Drawing.Point(286, 298)
+ Me.lblReorder.Name = "lblReorder"
+ Me.lblReorder.Size = New System.Drawing.Size(48, 13)
+ Me.lblReorder.TabIndex = 38
+ Me.lblReorder.Text = "Reorder:"
+ '
+ 'lblFacetBy
+ '
+ Me.lblFacetBy.AutoSize = True
+ Me.lblFacetBy.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblFacetBy.Location = New System.Drawing.Point(208, 334)
+ Me.lblFacetBy.Name = "lblFacetBy"
+ Me.lblFacetBy.Size = New System.Drawing.Size(52, 13)
+ Me.lblFacetBy.TabIndex = 84
+ Me.lblFacetBy.Tag = ""
+ Me.lblFacetBy.Text = "Facet By:"
+ '
+ 'ucrNudMinHeight
+ '
+ Me.ucrNudMinHeight.AutoSize = True
+ Me.ucrNudMinHeight.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudMinHeight.Increment = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.ucrNudMinHeight.Location = New System.Drawing.Point(138, 313)
+ Me.ucrNudMinHeight.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
+ Me.ucrNudMinHeight.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudMinHeight.Name = "ucrNudMinHeight"
+ Me.ucrNudMinHeight.Size = New System.Drawing.Size(50, 20)
+ Me.ucrNudMinHeight.TabIndex = 44
+ Me.ucrNudMinHeight.Value = New Decimal(New Integer() {0, 0, 0, 0})
+ '
+ 'ucrChkMinHeight
+ '
+ Me.ucrChkMinHeight.AutoSize = True
+ Me.ucrChkMinHeight.Checked = False
+ Me.ucrChkMinHeight.Location = New System.Drawing.Point(10, 311)
+ Me.ucrChkMinHeight.Name = "ucrChkMinHeight"
+ Me.ucrChkMinHeight.Size = New System.Drawing.Size(143, 23)
+ Me.ucrChkMinHeight.TabIndex = 43
+ '
+ 'ucrChkOmitYAxis
+ '
+ Me.ucrChkOmitYAxis.AutoSize = True
+ Me.ucrChkOmitYAxis.Checked = False
+ Me.ucrChkOmitYAxis.Location = New System.Drawing.Point(10, 287)
+ Me.ucrChkOmitYAxis.Name = "ucrChkOmitYAxis"
+ Me.ucrChkOmitYAxis.Size = New System.Drawing.Size(143, 23)
+ Me.ucrChkOmitYAxis.TabIndex = 42
+ '
+ 'ucrNudBinwidth
+ '
+ Me.ucrNudBinwidth.AutoSize = True
+ Me.ucrNudBinwidth.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudBinwidth.Increment = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.ucrNudBinwidth.Location = New System.Drawing.Point(139, 262)
+ Me.ucrNudBinwidth.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
+ Me.ucrNudBinwidth.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudBinwidth.Name = "ucrNudBinwidth"
+ Me.ucrNudBinwidth.Size = New System.Drawing.Size(50, 20)
+ Me.ucrNudBinwidth.TabIndex = 41
+ Me.ucrNudBinwidth.Value = New Decimal(New Integer() {0, 0, 0, 0})
+ '
+ 'ucrChkBinWidth
+ '
+ Me.ucrChkBinWidth.AutoSize = True
+ Me.ucrChkBinWidth.Checked = False
+ Me.ucrChkBinWidth.Location = New System.Drawing.Point(10, 262)
+ Me.ucrChkBinWidth.Name = "ucrChkBinWidth"
+ Me.ucrChkBinWidth.Size = New System.Drawing.Size(144, 23)
+ Me.ucrChkBinWidth.TabIndex = 40
+ '
+ 'ucrInputStation
+ '
+ Me.ucrInputStation.AddQuotesIfUnrecognised = True
+ Me.ucrInputStation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrInputStation.GetSetSelectedIndex = -1
+ Me.ucrInputStation.IsReadOnly = False
+ Me.ucrInputStation.Location = New System.Drawing.Point(318, 348)
+ Me.ucrInputStation.Name = "ucrInputStation"
+ Me.ucrInputStation.Size = New System.Drawing.Size(101, 21)
+ Me.ucrInputStation.TabIndex = 86
+ '
+ 'ucr1stFactorReceiver
+ '
+ Me.ucr1stFactorReceiver.AutoSize = True
+ Me.ucr1stFactorReceiver.frmParent = Me
+ Me.ucr1stFactorReceiver.Location = New System.Drawing.Point(205, 349)
+ Me.ucr1stFactorReceiver.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucr1stFactorReceiver.Name = "ucr1stFactorReceiver"
+ Me.ucr1stFactorReceiver.Selector = Nothing
+ Me.ucr1stFactorReceiver.Size = New System.Drawing.Size(110, 26)
+ Me.ucr1stFactorReceiver.strNcFilePath = ""
+ Me.ucr1stFactorReceiver.TabIndex = 85
+ Me.ucr1stFactorReceiver.ucrSelector = Nothing
+ '
+ 'ucrInputLegendPosition
+ '
+ Me.ucrInputLegendPosition.AddQuotesIfUnrecognised = True
+ Me.ucrInputLegendPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrInputLegendPosition.GetSetSelectedIndex = -1
+ Me.ucrInputLegendPosition.IsReadOnly = False
+ Me.ucrInputLegendPosition.Location = New System.Drawing.Point(87, 348)
+ Me.ucrInputLegendPosition.Name = "ucrInputLegendPosition"
+ Me.ucrInputLegendPosition.Size = New System.Drawing.Size(112, 21)
+ Me.ucrInputLegendPosition.TabIndex = 88
+ '
+ 'ucrChkLegend
+ '
+ Me.ucrChkLegend.AutoSize = True
+ Me.ucrChkLegend.Checked = False
+ Me.ucrChkLegend.Location = New System.Drawing.Point(11, 349)
+ Me.ucrChkLegend.Name = "ucrChkLegend"
+ Me.ucrChkLegend.Size = New System.Drawing.Size(98, 24)
+ Me.ucrChkLegend.TabIndex = 87
+ '
+ 'ucrInputAddReorder
+ '
+ Me.ucrInputAddReorder.AddQuotesIfUnrecognised = True
+ Me.ucrInputAddReorder.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrInputAddReorder.GetSetSelectedIndex = -1
+ Me.ucrInputAddReorder.IsReadOnly = False
+ Me.ucrInputAddReorder.Location = New System.Drawing.Point(287, 314)
+ Me.ucrInputAddReorder.Name = "ucrInputAddReorder"
+ Me.ucrInputAddReorder.Size = New System.Drawing.Size(120, 21)
+ Me.ucrInputAddReorder.TabIndex = 39
+ '
'cmdOptions
'
Me.cmdOptions.AutoSize = True
@@ -305,88 +439,15 @@ Partial Class dlgHistogram
Me.ucrPnlOptions.Size = New System.Drawing.Size(433, 30)
Me.ucrPnlOptions.TabIndex = 0
'
- 'lblReorder
- '
- Me.lblReorder.AutoSize = True
- Me.lblReorder.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblReorder.Location = New System.Drawing.Point(286, 298)
- Me.lblReorder.Name = "lblReorder"
- Me.lblReorder.Size = New System.Drawing.Size(48, 13)
- Me.lblReorder.TabIndex = 38
- Me.lblReorder.Text = "Reorder:"
- '
- 'ucrInputAddReorder
- '
- Me.ucrInputAddReorder.AddQuotesIfUnrecognised = True
- Me.ucrInputAddReorder.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrInputAddReorder.GetSetSelectedIndex = -1
- Me.ucrInputAddReorder.IsReadOnly = False
- Me.ucrInputAddReorder.Location = New System.Drawing.Point(287, 314)
- Me.ucrInputAddReorder.Name = "ucrInputAddReorder"
- Me.ucrInputAddReorder.Size = New System.Drawing.Size(120, 21)
- Me.ucrInputAddReorder.TabIndex = 39
- '
- 'ucrInputStation
- '
- Me.ucrInputStation.AddQuotesIfUnrecognised = True
- Me.ucrInputStation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrInputStation.GetSetSelectedIndex = -1
- Me.ucrInputStation.IsReadOnly = False
- Me.ucrInputStation.Location = New System.Drawing.Point(318, 348)
- Me.ucrInputStation.Name = "ucrInputStation"
- Me.ucrInputStation.Size = New System.Drawing.Size(101, 21)
- Me.ucrInputStation.TabIndex = 86
- '
- 'ucr1stFactorReceiver
- '
- Me.ucr1stFactorReceiver.AutoSize = True
- Me.ucr1stFactorReceiver.frmParent = Me
- Me.ucr1stFactorReceiver.Location = New System.Drawing.Point(205, 349)
- Me.ucr1stFactorReceiver.Margin = New System.Windows.Forms.Padding(0)
- Me.ucr1stFactorReceiver.Name = "ucr1stFactorReceiver"
- Me.ucr1stFactorReceiver.Selector = Nothing
- Me.ucr1stFactorReceiver.Size = New System.Drawing.Size(110, 26)
- Me.ucr1stFactorReceiver.strNcFilePath = ""
- Me.ucr1stFactorReceiver.TabIndex = 85
- Me.ucr1stFactorReceiver.ucrSelector = Nothing
- '
- 'lblFacetBy
- '
- Me.lblFacetBy.AutoSize = True
- Me.lblFacetBy.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblFacetBy.Location = New System.Drawing.Point(208, 334)
- Me.lblFacetBy.Name = "lblFacetBy"
- Me.lblFacetBy.Size = New System.Drawing.Size(52, 13)
- Me.lblFacetBy.TabIndex = 84
- Me.lblFacetBy.Tag = ""
- Me.lblFacetBy.Text = "Facet By:"
- '
- 'ucrInputLegendPosition
- '
- Me.ucrInputLegendPosition.AddQuotesIfUnrecognised = True
- Me.ucrInputLegendPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrInputLegendPosition.GetSetSelectedIndex = -1
- Me.ucrInputLegendPosition.IsReadOnly = False
- Me.ucrInputLegendPosition.Location = New System.Drawing.Point(87, 348)
- Me.ucrInputLegendPosition.Name = "ucrInputLegendPosition"
- Me.ucrInputLegendPosition.Size = New System.Drawing.Size(112, 21)
- Me.ucrInputLegendPosition.TabIndex = 88
- '
- 'ucrChkLegend
- '
- Me.ucrChkLegend.AutoSize = True
- Me.ucrChkLegend.Checked = False
- Me.ucrChkLegend.Location = New System.Drawing.Point(11, 349)
- Me.ucrChkLegend.Name = "ucrChkLegend"
- Me.ucrChkLegend.Size = New System.Drawing.Size(98, 24)
- Me.ucrChkLegend.TabIndex = 87
- '
'dlgHistogram
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi
Me.AutoSize = True
Me.ClientSize = New System.Drawing.Size(448, 461)
+ Me.Controls.Add(Me.ucrNudMinHeight)
+ Me.Controls.Add(Me.ucrNudBinwidth)
+ Me.Controls.Add(Me.ucrChkOmitYAxis)
Me.Controls.Add(Me.ucrInputStation)
Me.Controls.Add(Me.ucr1stFactorReceiver)
Me.Controls.Add(Me.lblFacetBy)
@@ -410,6 +471,8 @@ Partial Class dlgHistogram
Me.Controls.Add(Me.lblfactor)
Me.Controls.Add(Me.ucrBase)
Me.Controls.Add(Me.ucrPnlOptions)
+ Me.Controls.Add(Me.ucrChkMinHeight)
+ Me.Controls.Add(Me.ucrChkBinWidth)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.MaximizeBox = False
Me.MinimizeBox = False
@@ -447,9 +510,17 @@ Partial Class dlgHistogram
Friend WithEvents toolStripMenuItemDotOptions As ToolStripMenuItem
Friend WithEvents lblReorder As Label
Friend WithEvents ucrInputAddReorder As ucrInputComboBox
+
+ Friend WithEvents ucrChkBinWidth As ucrCheck
+ Friend WithEvents ucrNudBinwidth As ucrNud
+ Friend WithEvents ucrChkOmitYAxis As ucrCheck
+ Friend WithEvents ucrNudMinHeight As ucrNud
+ Friend WithEvents ucrChkMinHeight As ucrCheck
+
Friend WithEvents ucrInputStation As ucrInputComboBox
Friend WithEvents ucr1stFactorReceiver As ucrReceiverSingle
Friend WithEvents lblFacetBy As Label
Friend WithEvents ucrInputLegendPosition As ucrInputComboBox
Friend WithEvents ucrChkLegend As ucrCheck
+
End Class
\ No newline at end of file
diff --git a/instat/dlgHistogram.vb b/instat/dlgHistogram.vb
index 76d0d340272..74b2176d8c6 100644
--- a/instat/dlgHistogram.vb
+++ b/instat/dlgHistogram.vb
@@ -20,6 +20,7 @@ Public Class dlgHistogram
Private bFirstLoad As Boolean = True
Private bReset As Boolean = True
Private clsBaseOperator As New ROperator
+ Private clsYlabScalesFunction As New RFunction
Private clsRggplotFunction As New RFunction
Private clsRgeomPlotFunction As New RFunction
Private clsRaesFunction As New RFunction
@@ -129,10 +130,32 @@ Public Class dlgHistogram
ucrChkDisplayAsDotPlot.SetText("Display as Dotplot")
ucrChkDisplayAsDotPlot.AddFunctionNamesCondition(True, "geom_dotplot")
ucrChkDisplayAsDotPlot.AddFunctionNamesCondition(False, "geom_dotplot", False)
+ ucrChkDisplayAsDotPlot.AddToLinkedControls({ucrChkOmitYAxis}, {True}, bNewLinkedHideIfParameterMissing:=True)
+ ucrChkOmitYAxis.SetText("Omit Y Axis")
+
+ ucrChkBinWidth.SetText("Binwidth")
+ ucrChkBinWidth.AddToLinkedControls({ucrNudBinwidth}, {True}, bNewLinkedHideIfParameterMissing:=True)
+
+ ucrNudBinwidth.SetParameter(New RParameter("binwidth", 3))
+ ucrNudBinwidth.SetMinMax(0.00, 10.0)
+ ucrNudBinwidth.DecimalPlaces = 2
+ ucrNudBinwidth.Increment = 0.01
+ ucrNudBinwidth.SetRDefault(1.5)
+
ucrChkRidges.SetText("Density Ridges")
ucrChkRidges.AddFunctionNamesCondition(True, "geom_density_ridges")
ucrChkRidges.AddFunctionNamesCondition(False, "geom_density_ridges", False)
+ ucrChkRidges.AddToLinkedControls({ucrChkMinHeight}, {True}, bNewLinkedHideIfParameterMissing:=True)
+
+ ucrChkMinHeight.SetText("Min Height")
+ ucrChkMinHeight.AddToLinkedControls({ucrNudMinHeight}, {True}, bNewLinkedHideIfParameterMissing:=True)
+
+ ucrNudMinHeight.SetParameter(New RParameter("rel_min_height", 4))
+ ucrNudMinHeight.SetMinMax(0.000, 10.0)
+ ucrNudMinHeight.DecimalPlaces = 3
+ ucrNudMinHeight.Increment = 0.001
+ ucrNudMinHeight.SetRDefault(0.01)
ucrVariablesAsFactorforHist.SetParameter(New RParameter("x", 0))
ucrVariablesAsFactorforHist.SetFactorReceiver(ucrFactorReceiver)
@@ -173,6 +196,7 @@ Public Class dlgHistogram
ucrInputStation.SetDropDownStyleAsNonEditable()
ucrPnlOptions.AddToLinkedControls({ucrChkDisplayAsDotPlot}, {rdoHistogram}, bNewLinkedHideIfParameterMissing:=True)
+ ucrPnlOptions.AddToLinkedControls({ucrChkBinWidth}, {rdoHistogram, rdoFrequencyPolygon}, bNewLinkedHideIfParameterMissing:=True)
ucrPnlOptions.AddToLinkedControls({ucrChkRidges}, {rdoDensity_ridges}, bNewLinkedHideIfParameterMissing:=True)
ucrChkRidges.AddToLinkedControls(ucrInputStats, {"FALSE"}, bNewLinkedHideIfParameterMissing:=True)
@@ -192,6 +216,7 @@ Public Class dlgHistogram
clsRaesFunction = New RFunction
clsHistAesFunction = New RFunction
clsPercentage = New RFunction
+ clsYlabScalesFunction = New RFunction
clsForecatsReverse = New RFunction
clsForecatsInfreqValue = New RFunction
clsForecatsReverseValue = New RFunction
@@ -214,6 +239,7 @@ Public Class dlgHistogram
ucrInputAddReorder.SetText(strNone)
ucrInputAddReorder.bUpdateRCodeFromControl = True
+
clsBaseOperator.SetOperation("+")
clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRggplotFunction, iPosition:=0)
clsBaseOperator.AddParameter(strFirstParameterName, clsRFunctionParameter:=clsRgeomPlotFunction, iPosition:=2)
@@ -245,6 +271,11 @@ Public Class dlgHistogram
clsForecatsInfreqValue.SetPackageName("forcats")
clsForecatsInfreqValue.SetRCommand("fct_infreq")
+
+ clsYlabScalesFunction.SetRCommand("scale_y_continuous")
+ clsYlabScalesFunction.AddParameter("NULL", "NULL", bIncludeArgumentName:=False, iPosition:=0)
+ clsYlabScalesFunction.AddParameter("breaks", "NULL", iPosition:=1)
+
clsFacetFunction.SetPackageName("ggplot2")
clsFacetRowOp.SetOperation("+")
clsFacetRowOp.bBrackets = False
@@ -261,6 +292,7 @@ Public Class dlgHistogram
clsGroupByFunction.SetPackageName("dplyr")
clsGroupByFunction.SetRCommand("group_by")
+
clsBaseOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone())
clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone()
clsYlabFunction = GgplotDefaults.clsYlabTitleFunction.Clone()
@@ -292,11 +324,17 @@ Public Class dlgHistogram
ucrChkDisplayAsDotPlot.SetRCode(clsRgeomPlotFunction, bReset)
ucrChkRidges.SetRCode(clsRgeomPlotFunction, bReset)
ucrVariablesAsFactorforHist.SetRCode(clsRaesFunction, bReset)
+
ucrChkLegend.SetRCode(clsThemeFunction, bReset, bCloneIfNeeded:=True)
ucrInputLegendPosition.SetRCode(clsThemeFunction, bReset, bCloneIfNeeded:=True)
+ ucrNudBinwidth.SetRCode(clsRgeomPlotFunction, bReset)
+ ucrNudMinHeight.SetRCode(clsRgeomPlotFunction, bReset)
+ ucrChkOmitYAxis.SetRCode(clsBaseOperator, bReset)
If bReset Then
ucrInputStats.SetRCode(clsHistAesFunction, bReset)
ucrFactorReceiver.SetRCode(clsRaesFunction, bReset)
+ ucrChkMinHeight.SetRCode(clsRgeomPlotFunction, bReset)
+ ucrChkBinWidth.SetRCode(clsRgeomPlotFunction, bReset)
End If
End Sub
@@ -338,6 +376,7 @@ Public Class dlgHistogram
If ucrChkDisplayAsDotPlot.Checked Then
clsRgeomPlotFunction.SetRCommand("geom_dotplot")
clsRgeomPlotFunction.RemoveParameterByName("mapping")
+ clsRgeomPlotFunction.RemoveParameterByName("rel_min_height")
If Not ucrFactorReceiver.IsEmpty Then
clsRgeomPlotFunction.AddParameter("binpositions", Chr(34) & "all" & Chr(34), iPosition:=0)
clsRgeomPlotFunction.AddParameter("stackgroups", "TRUE", iPosition:=1)
@@ -353,15 +392,22 @@ Public Class dlgHistogram
clsRgeomPlotFunction.RemoveParameterByName("stackgroups")
End If
End If
+ clsBaseOperator.RemoveParameterByName("scale")
+ clsHistAesFunction.RemoveParameterByName("fill")
ucrFactorReceiver.ChangeParameterName("fill")
If Not ucrSaveHist.bUserTyped Then ucrSaveHist.SetPrefix("histogram")
End If
If rdoDensity_ridges.Checked Then
+ clsRgeomPlotFunction.RemoveParameterByName("binpositions")
+ clsRgeomPlotFunction.RemoveParameterByName("stackgroups")
+ clsRgeomPlotFunction.RemoveParameterByName("binwidth")
+ clsBaseOperator.RemoveParameterByName("scale")
If ucrChkRidges.Checked Then
- ucrFactorReceiver.ChangeParameterName("y")
+ ucrFactorReceiver.ChangeParameterName("fill")
clsHistAesFunction.RemoveParameterByName("y")
clsHistAesFunction.AddParameter("x", clsRFunctionParameter:=ucrVariablesAsFactorforHist.GetVariables(), iPosition:=1)
clsHistAesFunction.AddParameter("y", clsRFunctionParameter:=ucrFactorReceiver.GetVariables(), iPosition:=2)
+ clsHistAesFunction.AddParameter("fill", clsRFunctionParameter:=ucrFactorReceiver.GetVariables(), iPosition:=3)
clsRgeomPlotFunction.SetPackageName("ggridges")
clsRgeomPlotFunction.SetRCommand("geom_density_ridges")
clsRgeomPlotFunction.RemoveParameterByName("mapping")
@@ -370,6 +416,7 @@ Public Class dlgHistogram
End If
Else
ucrFactorReceiver.ChangeParameterName("colour")
+ clsHistAesFunction.RemoveParameterByName("fill")
clsRgeomPlotFunction.SetRCommand("geom_density")
clsRgeomPlotFunction.AddParameter("mapping", clsRFunctionParameter:=clsHistAesFunction)
If Not ucrSaveHist.bUserTyped Then
@@ -379,12 +426,17 @@ Public Class dlgHistogram
ElseIf rdoFrequencyPolygon.Checked Then
ucrFactorReceiver.ChangeParameterName("colour")
clsRgeomPlotFunction.SetRCommand("geom_freqpoly")
+ clsRgeomPlotFunction.RemoveParameterByName("binpositions")
+ clsRgeomPlotFunction.RemoveParameterByName("stackgroups")
+ clsRgeomPlotFunction.RemoveParameterByName("rel_min_height")
+ clsBaseOperator.RemoveParameterByName("scale")
If Not ucrSaveHist.bUserTyped Then
ucrSaveHist.SetPrefix("frequency_polygon")
End If
End If
autoTranslate(Me)
UpdateParameter()
+
End Sub
Private Sub UpdateParameter()
@@ -441,7 +493,7 @@ Public Class dlgHistogram
End If
End Sub
- Private Sub ucrPnlOptions_Control() Handles ucrPnlOptions.ControlValueChanged, ucrChkDisplayAsDotPlot.ControlValueChanged, ucrChkRidges.ControlValueChanged, ucrFactorReceiver.ControlValueChanged, ucrVariablesAsFactorforHist.ControlValueChanged, ucrInputAddReorder.ControlValueChanged
+ Private Sub ucrPnlOptions_Control() Handles ucrPnlOptions.ControlValueChanged, ucrChkDisplayAsDotPlot.ControlValueChanged, ucrChkRidges.ControlValueChanged, ucrFactorReceiver.ControlValueChanged, ucrVariablesAsFactorforHist.ControlValueChanged, ucrInputAddReorder.ControlValueChanged, ucrChkOmitYAxis.ControlValueChanged, ucrNudBinwidth.ControlValueChanged
toolStripMenuItemHistogramOptions.Enabled = rdoHistogram.Checked AndAlso Not ucrChkDisplayAsDotPlot.Checked
toolStripMenuItemDotOptions.Enabled = rdoHistogram.Checked AndAlso ucrChkDisplayAsDotPlot.Checked
toolStripMenuItemDensityOptions.Enabled = rdoDensity_ridges.Checked AndAlso Not ucrChkRidges.Checked
@@ -550,6 +602,9 @@ Public Class dlgHistogram
Me.ucrInputAddReorder.Location = New Point(283, 289)
Me.ucrSaveHist.Location = New Point(10, 360)
Me.ucrChkLegend.Location = New Point(11, 329)
+ Me.ucrChkBinWidth.Location = New Point(10, 262)
+ Me.ucrChkOmitYAxis.Location = New Point(10, 287)
+ Me.ucrNudBinwidth.Location = New Point(139, 262)
Me.ucrInputStation.Location = New Point(318, 328)
Me.ucrInputLegendPosition.Location = New Point(87, 328)
Me.ucr1stFactorReceiver.Location = New Point(205, 329)
@@ -559,6 +614,8 @@ Public Class dlgHistogram
Me.Size = New Size(464, 500)
Me.lblReorder.Location = New Point(286, 298)
Me.ucrInputAddReorder.Location = New Point(287, 314)
+ Me.ucrChkMinHeight.Location = New Point(10, 311)
+ Me.ucrNudMinHeight.Location = New Point(138, 313)
Me.ucrSaveHist.Location = New Point(10, 380)
Me.ucrBase.Location = New Point(10, 408)
Me.ucrChkLegend.Location = New Point(11, 349)
@@ -571,7 +628,9 @@ Public Class dlgHistogram
Me.lblReorder.Location = New Point(283, 250)
Me.ucrInputAddReorder.Location = New Point(283, 264)
Me.ucrSaveHist.Location = New Point(10, 330)
+ Me.ucrChkBinWidth.Location = New Point(10, 262)
Me.ucrChkLegend.Location = New Point(11, 296)
+ Me.ucrNudBinwidth.Location = New Point(139, 262)
Me.ucrInputStation.Location = New Point(318, 294)
Me.ucrInputLegendPosition.Location = New Point(87, 294)
Me.ucr1stFactorReceiver.Location = New Point(205, 296)
@@ -684,6 +743,31 @@ Public Class dlgHistogram
End If
End Sub
+ Private Sub ucrChkOmitYAxis_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkOmitYAxis.ControlValueChanged, ucrChkDisplayAsDotPlot.ControlValueChanged
+ If ucrChkDisplayAsDotPlot.Checked AndAlso ucrChkOmitYAxis.Checked Then
+ clsBaseOperator.AddParameter("scale", clsRFunctionParameter:=clsYlabScalesFunction, iPosition:=4, bIncludeArgumentName:=False)
+ Else
+ clsBaseOperator.RemoveParameterByName("scale")
+ End If
+ End Sub
+
+ Private Sub ucrChkMinHeight_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkMinHeight.ControlValueChanged, ucrNudMinHeight.ControlValueChanged
+ If ucrChkRidges.Checked AndAlso ucrChkMinHeight.Checked Then
+ clsRgeomPlotFunction.AddParameter("rel_min_height", ucrNudMinHeight.GetText, iPosition:=4)
+ Else
+ clsRgeomPlotFunction.RemoveParameterByName("rel_min_height")
+ End If
+
+ End Sub
+
+ Private Sub ucrChkBinWidth_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkBinWidth.ControlValueChanged, ucrNudBinwidth.ControlValueChanged
+ If ucrChkBinWidth.Checked Then
+ clsRgeomPlotFunction.AddParameter("binwidth", ucrNudBinwidth.GetText, iPosition:=4)
+ Else
+ clsRgeomPlotFunction.RemoveParameterByName("binwidth")
+ End If
+ End Sub
+
Private Sub ucr1stFactorReceiver_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucr1stFactorReceiver.ControlValueChanged, ucrVariablesAsFactorforHist.ControlValueChanged
AddRemoveFacets()
AddRemoveGroupBy()
@@ -737,8 +821,8 @@ Public Class dlgHistogram
AutoFacetStation()
SetPipeAssignTo()
End Sub
- Private Sub CoreControls_ControlContentsChanged() Handles ucrVariablesAsFactorforHist.ControlContentsChanged, ucrSaveHist.ControlContentsChanged, ucrFactorReceiver.ControlContentsChanged, ucrChkRidges.ControlContentsChanged, ucrInputAddReorder.ControlContentsChanged
+
+ Private Sub CoreControls_ControlContentsChanged() Handles ucrVariablesAsFactorforHist.ControlContentsChanged, ucrSaveHist.ControlContentsChanged, ucrFactorReceiver.ControlContentsChanged, ucrChkRidges.ControlContentsChanged, ucrInputAddReorder.ControlContentsChanged, ucrChkBinWidth.ControlContentsChanged, ucrNudBinwidth.ControlContentsChanged, ucrNudMinHeight.ControlContentsChanged
TestOkEnabled()
End Sub
-
End Class
\ No newline at end of file
diff --git a/instat/dlgJitter.vb b/instat/dlgJitter.vb
index 302ce59c5f0..448b89e180b 100644
--- a/instat/dlgJitter.vb
+++ b/instat/dlgJitter.vb
@@ -42,9 +42,9 @@ Public Class dlgJitter
ucrReceiverJitter.SetMeAsReceiver()
ucrReceiverJitter.strSelectorHeading = "Numerics"
- ucrBase.clsRsyntax.SetOperation("+")
+ ucrBase.clsRsyntax.clsBaseOperator.SetOperation("+")
clsRunif.SetRCommand("runif")
- ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=clsRunif)
+ ucrBase.clsRsyntax.clsBaseOperator.AddParameter(clsRFunctionParameter:=clsRunif)
'ucrInputNewColumnName.SetItemsTypeAsColumns()
'ucrInputNewColumnName.SetDefaultTypeAsColumn()
'ucrInputNewColumnName.SetDataFrameSelector(ucrSelectorForJitter.ucrAvailableDataFrames)
@@ -164,7 +164,7 @@ Public Class dlgJitter
End Sub
Private Sub ucrReceiverJitter_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverJitter.ControlValueChanged
- ucrBase.clsRsyntax.SetOperatorParameter(1, clsRFunc:=ucrReceiverJitter.GetVariables)
+ ucrBase.clsRsyntax.clsBaseOperator.AddParameter(clsRFunctionParameter:=ucrReceiverJitter.GetVariables, iPosition:=1)
End Sub
diff --git a/instat/dlgModelling.vb b/instat/dlgModelling.vb
index 112f49d6a00..9af0dd39c44 100644
--- a/instat/dlgModelling.vb
+++ b/instat/dlgModelling.vb
@@ -228,7 +228,16 @@ Public Class dlgModelling
Private Sub assignToControlsChanged(ucrChangedControl As ucrCore) Handles ucrSaveResult.ControlValueChanged
Dim strAssginTo As String
- strAssginTo = ucrBase.clsRsyntax.GetstrAssignTo()
+ If ucrBase.clsRsyntax.bUseBaseFunction Then
+ strAssginTo = ucrBase.clsRsyntax.clsBaseFunction.GetRObjectToAssignTo()
+ ElseIf ucrBase.clsRsyntax.bUseBaseOperator Then
+ strAssginTo = ucrBase.clsRsyntax.clsBaseOperator.GetRObjectToAssignTo()
+ ElseIf ucrBase.clsRsyntax.bUseCommandString Then
+ strAssginTo = ucrBase.clsRsyntax.clsBaseCommandString.GetRObjectToAssignTo()
+ Else
+ strAssginTo = ""
+ End If
+
'---------------------------------------------------------------------
'model summaries outputs
diff --git a/instat/dlgRandomSubsets.vb b/instat/dlgRandomSubsets.vb
index 024499229d5..77f40c69528 100644
--- a/instat/dlgRandomSubsets.vb
+++ b/instat/dlgRandomSubsets.vb
@@ -80,7 +80,7 @@ Public Class dlgRandomSubsets
ucrSelectorRandomSubsets.Reset()
ucrNewDataFrame.Reset()
- ucrBase.clsRsyntax.lstBeforeCodes.Clear()
+ ucrBase.clsRsyntax.GetBeforeCodes().Clear()
NewDefaultName()
ReplaceParameters()
diff --git a/instat/dlgRownamesOrNumbers.vb b/instat/dlgRownamesOrNumbers.vb
index dee1a9c4e04..6c4028729a9 100644
--- a/instat/dlgRownamesOrNumbers.vb
+++ b/instat/dlgRownamesOrNumbers.vb
@@ -113,7 +113,7 @@ Public Class dlgRowNamesOrNumbers
ucrNewColumnName.Reset()
ucrSelectorRowNames.Reset()
- ucrBase.clsRsyntax.lstAfterCodes.Clear()
+ ucrBase.clsRsyntax.GetAfterCodes().Clear()
clsDummyFunction.AddParameter("checked_rdo", "copy_row", iPosition:=1)
clsDummyFunction.AddParameter("add_key", "TRUE", iPosition:=2)
diff --git a/instat/dlgShowModel.vb b/instat/dlgShowModel.vb
index 476f8b47c2f..879bb8c8d14 100644
--- a/instat/dlgShowModel.vb
+++ b/instat/dlgShowModel.vb
@@ -268,8 +268,8 @@ Public Class dlgShowModel
clsProbabilitiesFunction.AddParameter("return", Chr(34) & "plot" & Chr(34), iPosition:=9)
ElseIf rdoValues.Checked Then
cmdDistributionOptions.Enabled = False
- ucrBase.clsRsyntax.RemoveOperatorParameter("1")
- ucrBase.clsRsyntax.RemoveOperatorParameter("2")
+ ucrBase.clsRsyntax.clsBaseOperator.RemoveParameterByName("1")
+ ucrBase.clsRsyntax.clsBaseOperator.RemoveParameterByName("2")
clsQuantilesFunction.AddParameter("return", Chr(34) & "values" & Chr(34), iPosition:=9)
clsProbabilitiesFunction.AddParameter("return", Chr(34) & "values" & Chr(34), iPosition:=9)
End If
diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb
index 6224d2dbdc4..4c553f4f818 100644
--- a/instat/dlgSummaryTables.vb
+++ b/instat/dlgSummaryTables.vb
@@ -221,7 +221,7 @@ Public Class dlgSummaryTables
ucrSelectorSummaryTables.Reset()
ucrSaveTable.Reset()
- ucrBase.clsRsyntax.lstBeforeCodes.Clear()
+ ucrBase.clsRsyntax.GetBeforeCodes().Clear()
clsDummyFunction.AddParameter("theme", "select", iPosition:=11)
clsDummyFunction.AddParameter("rdo_checked", "rdoFrequency", iPosition:=1)
diff --git a/instat/dlgTransform.Designer.vb b/instat/dlgTransform.Designer.vb
index c3df268c5ff..0650f55b907 100644
--- a/instat/dlgTransform.Designer.vb
+++ b/instat/dlgTransform.Designer.vb
@@ -108,6 +108,9 @@ Partial Class dlgTransform
Me.ucrSelectorForRank = New instat.ucrSelectorByDataFrameAddRemove()
Me.ucrChkMissingLast = New instat.ucrCheck()
Me.ucrChkDecreasing = New instat.ucrCheck()
+ Me.ucrPnlColumnSelectOptions = New instat.UcrPanel()
+ Me.rdoSingle = New System.Windows.Forms.RadioButton()
+ Me.rdoMultiple = New System.Windows.Forms.RadioButton()
Me.grpTies.SuspendLayout()
Me.grpMissingValues.SuspendLayout()
Me.grpNumericOptions.SuspendLayout()
@@ -894,7 +897,7 @@ Partial Class dlgTransform
Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.ucrBase.Location = New System.Drawing.Point(10, 392)
Me.ucrBase.Name = "ucrBase"
- Me.ucrBase.Size = New System.Drawing.Size(405, 52)
+ Me.ucrBase.Size = New System.Drawing.Size(408, 52)
Me.ucrBase.TabIndex = 16
'
'ucrSelectorForRank
@@ -927,12 +930,47 @@ Partial Class dlgTransform
Me.ucrChkDecreasing.Size = New System.Drawing.Size(100, 23)
Me.ucrChkDecreasing.TabIndex = 12
'
+ 'ucrPnlColumnSelectOptions
+ '
+ Me.ucrPnlColumnSelectOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrPnlColumnSelectOptions.Location = New System.Drawing.Point(237, 52)
+ Me.ucrPnlColumnSelectOptions.Name = "ucrPnlColumnSelectOptions"
+ Me.ucrPnlColumnSelectOptions.Size = New System.Drawing.Size(185, 29)
+ Me.ucrPnlColumnSelectOptions.TabIndex = 37
+ '
+ 'rdoSingle
+ '
+ Me.rdoSingle.AutoSize = True
+ Me.rdoSingle.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoSingle.Location = New System.Drawing.Point(255, 59)
+ Me.rdoSingle.Name = "rdoSingle"
+ Me.rdoSingle.Size = New System.Drawing.Size(54, 17)
+ Me.rdoSingle.TabIndex = 37
+ Me.rdoSingle.TabStop = True
+ Me.rdoSingle.Text = "Single"
+ Me.rdoSingle.UseVisualStyleBackColor = True
+ '
+ 'rdoMultiple
+ '
+ Me.rdoMultiple.AutoSize = True
+ Me.rdoMultiple.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoMultiple.Location = New System.Drawing.Point(321, 60)
+ Me.rdoMultiple.Name = "rdoMultiple"
+ Me.rdoMultiple.Size = New System.Drawing.Size(61, 17)
+ Me.rdoMultiple.TabIndex = 68
+ Me.rdoMultiple.TabStop = True
+ Me.rdoMultiple.Text = "Multiple"
+ Me.rdoMultiple.UseVisualStyleBackColor = True
+ '
'dlgTransform
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi
Me.AutoSize = True
Me.ClientSize = New System.Drawing.Size(440, 445)
+ Me.Controls.Add(Me.rdoMultiple)
+ Me.Controls.Add(Me.rdoSingle)
+ Me.Controls.Add(Me.ucrPnlColumnSelectOptions)
Me.Controls.Add(Me.grpNumericOptions)
Me.Controls.Add(Me.grpNonNegative)
Me.Controls.Add(Me.grpTies)
@@ -1050,4 +1088,7 @@ Partial Class dlgTransform
Friend WithEvents ucrInputLogicOperations As ucrInputComboBox
Friend WithEvents rdoLogical As RadioButton
Friend WithEvents ucrPnlNumericOptions As UcrPanel
+ Friend WithEvents rdoMultiple As RadioButton
+ Friend WithEvents rdoSingle As RadioButton
+ Friend WithEvents ucrPnlColumnSelectOptions As UcrPanel
End Class
diff --git a/instat/dlgTransform.vb b/instat/dlgTransform.vb
index e81ca5dccb9..fc8147d6f9c 100644
--- a/instat/dlgTransform.vb
+++ b/instat/dlgTransform.vb
@@ -32,26 +32,69 @@ Public Class dlgTransform
Private clsStandardDevFunction As New RFunction
Private clsSubtractOperator As New ROperator
Private clsDivisionOperator As New ROperator
+
+ Private clsDivisionColsOperator As New ROperator
Private clsSquarerootFunction As New RFunction
+ Private clsSubtractColsOperator As New ROperator
+ Private clsSquarerootColsFunction As New RFunction
Private clsAddConstantOperator As New ROperator
+ Private clsAddConstantColsOperator As New ROperator
Private clsNaturalLogFunction As New RFunction
+ Private clsNaturalLogColsFunction As New RFunction
+ Private clsLagColsFunction As New RFunction
+ Private clsRankColsFunction As New RFunction
Private clsLogBase10Function As New RFunction
+ Private clsLogBase10ColsFunction As New RFunction
+ Private clsStandardDevColsFunction As New RFunction
+ Private clsSymbolOperator As New ROperator
+ Private clsSymbolOperator2 As New ROperator
+ Private clsMeanColsFunction As New RFunction
+ Private clsReplicateColsFunction As New RFunction
+ Private clsConcDiffColsFunction As New RFunction
+ Private clsDiffColsFunction As New RFunction
+ Private clsLeadColsFunction As New RFunction
+ Private clsSignifColsFunction As New RFunction
+ Private clsRoundColsFunction As New RFunction
+ Private clsSortColsFunction As New RFunction
+ Private clsPowerColsOperator As New ROperator
+ Private clsScaleSubtractColsOperator As New ROperator
+ Private clsScaleAddColsOperator As New ROperator
+ Private clsScaleMeanColsFunction As New RFunction
+ Private clsScaleMinColsFunction As New RFunction
+
Private clsRemoveLabelsFunction As New RFunction
Private clsPowerOperator As New ROperator
Private clsScaleSubtractOperator As New ROperator
Private clsScaleMultiplyOperator As New ROperator
+ Private clsScaleMultiplyColsOperator As New ROperator
Private clsScaleDivideOperator As New ROperator
+ Private clsScaleDivideColsOperator As New ROperator
Private clsScaleAddOperator As New ROperator
Private clsScaleMeanFunction As New RFunction
Private clsScaleMinFunction As New RFunction
+
Private clsPreviewOperator As New ROperator
Private clsDummyTransformFunction As New RFunction
Private clsConstantDummyFunction As New RFunction
Private clsNumericDummyFunction As New RFunction
Private clsNonNegativeDummyFunction As New RFunction
+ Private clsGetColSelectionNamesFunction As New RFunction
Private clsPreviewTextFunction As New RCodeStructure
Private clsBooleanOperator As New ROperator
+ Private clsBooleanColsOperator As New ROperator
+ Private clsAddColumnsFunction As New RFunction
Private clsIsNAFunction As New RFunction
+ Private clsIsNAColsFunction As New RFunction
+
+ Private clsGetDataFrameFunction As New RFunction
+ Private clsColumnsFunction As New RFunction
+ Private clsPasteFunction As New RFunction
+ Private clsMutateFunction As New RFunction
+ Private clsAcrossFunction As New RFunction
+ Private clsEverythingFunction As New RFunction
+ Private clsPipeOperator As New ROperator
+ Private clsTildaOperator As New ROperator
+ Private clsAssignOperator As New ROperator
Private bResetRCode As Boolean = True
Private Sub dlgRank_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -77,18 +120,25 @@ Public Class dlgTransform
Dim dctAddValues As New Dictionary(Of String, String)
Dim dctPowerValues As New Dictionary(Of String, String)
+
ucrPnlTransformOptions.AddRadioButton(rdoRank)
ucrPnlTransformOptions.AddRadioButton(rdoNumeric)
ucrPnlTransformOptions.AddRadioButton(rdoSort)
ucrPnlTransformOptions.AddRadioButton(rdoNonNegative)
ucrPnlTransformOptions.AddRadioButton(rdoScale)
+ ucrPnlColumnSelectOptions.AddRadioButton(rdoSingle)
+ ucrPnlColumnSelectOptions.AddRadioButton(rdoMultiple)
+
ucrPnlTransformOptions.AddParameterValuesCondition(rdoRank, "check", "rank")
ucrPnlTransformOptions.AddParameterValuesCondition(rdoNumeric, "check", "numeric")
ucrPnlTransformOptions.AddParameterValuesCondition(rdoSort, "check", "sort")
ucrPnlTransformOptions.AddParameterValuesCondition(rdoNonNegative, "check", "non-negative")
ucrPnlTransformOptions.AddParameterValuesCondition(rdoScale, "check", "scale")
+ ucrPnlColumnSelectOptions.AddParameterValuesCondition(rdoSingle, "col", "single")
+ ucrPnlColumnSelectOptions.AddParameterValuesCondition(rdoMultiple, "col", "multiple")
+
ucrReceiverRank.SetParameter(New RParameter("x", 0))
ucrReceiverRank.Selector = ucrSelectorForRank
ucrReceiverRank.SetMeAsReceiver()
@@ -147,6 +197,7 @@ Public Class dlgTransform
ucrPnlNonNegative.AddParameterValuesCondition(rdoNaturalLog, "check", "log")
ucrPnlNonNegative.AddParameterValuesCondition(rdoPower, "check", "power")
+ ucrPnlColumnSelectOptions.AddToLinkedControls(ucrChkPreview, {rdoSingle}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlNumericOptions.AddToLinkedControls(ucrNudSignifDigits, {rdoSignificantDigits}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlNumericOptions.AddToLinkedControls(ucrNudRoundOfDigits, {rdoRoundOf}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlNumericOptions.AddToLinkedControls(ucrNudLagLeadPosition, {rdoLead}, bNewLinkedHideIfParameterMissing:=True)
@@ -250,6 +301,8 @@ Public Class dlgTransform
ucrInputSubtract.AddQuotesIfUnrecognised = False
ucrChkSubtract.SetText("Subtract")
+ ucrChkSubtract.AddParameterValuesCondition(True, "subtract", "True")
+ ucrChkSubtract.AddParameterValuesCondition(False, "subtract", "False")
ucrInputMultiply.SetParameter(New RParameter("y", 1))
dctMultiplyValues.Add("1", "1")
@@ -263,6 +316,8 @@ Public Class dlgTransform
ucrInputMultiply.AddQuotesIfUnrecognised = False
ucrChkMultiply.SetText("Multiply")
+ ucrChkMultiply.AddParameterValuesCondition(True, "multiple", "True")
+ ucrChkMultiply.AddParameterValuesCondition(False, "multiple", "False")
ucrInputDivide.SetParameter(New RParameter("z", 1))
dctDivideValues.Add("1", "1")
@@ -275,6 +330,8 @@ Public Class dlgTransform
ucrInputDivide.AddQuotesIfUnrecognised = False
ucrChkDivide.SetText("Divide")
+ ucrChkDivide.AddParameterValuesCondition(True, "divide", "True")
+ ucrChkDivide.AddParameterValuesCondition(False, "divide", "False")
ucrInputAdd.SetParameter(New RParameter("v", 1))
dctAddValues.Add("0", "0")
@@ -284,12 +341,13 @@ Public Class dlgTransform
ucrInputAdd.AddQuotesIfUnrecognised = False
ucrChkAdd.SetText("Add")
+ ucrChkAdd.AddParameterValuesCondition(True, "add", "True")
+ ucrChkAdd.AddParameterValuesCondition(False, "add", "False")
ucrChkPreview.SetText("Preview")
ucrChkPreview.AddParameterValuesCondition(True, "preview", "FALSE")
ucrChkPreview.AddParameterValuesCondition(False, "preview", "TRUE")
-
ucrChkOmitNA.SetText("Omit NA")
ucrChkOmitNA.SetParameter(New RParameter("na.rm", 1))
ucrChkOmitNA.SetValuesCheckedAndUnchecked("TRUE", "FALSE")
@@ -315,12 +373,14 @@ Public Class dlgTransform
clsDivisionOperator = New ROperator
clsSquarerootFunction = New RFunction
clsAddConstantOperator = New ROperator
+ clsAddConstantColsOperator = New ROperator
clsNaturalLogFunction = New RFunction
clsLogBase10Function = New RFunction
clsPowerOperator = New ROperator
clsScaleAddOperator = New ROperator
clsScaleDivideOperator = New ROperator
clsScaleMultiplyOperator = New ROperator
+ clsScaleMultiplyColsOperator = New ROperator
clsScaleSubtractOperator = New ROperator
clsPreviewOperator = New ROperator
clsScaleMeanFunction = New RFunction
@@ -333,6 +393,31 @@ Public Class dlgTransform
clsBooleanOperator = New ROperator
clsIsNAFunction = New RFunction
clsRemoveLabelsFunction = New RFunction
+ clsGetColSelectionNamesFunction = New RFunction
+ clsGetDataFrameFunction = New RFunction
+ clsMutateFunction = New RFunction
+ clsAcrossFunction = New RFunction
+ clsEverythingFunction = New RFunction
+ clsPipeOperator = New ROperator
+ clsTildaOperator = New ROperator
+ clsRoundColsFunction = New RFunction
+ clsRankColsFunction = New RFunction
+ clsSortColsFunction = New RFunction
+ clsSignifColsFunction = New RFunction
+ clsLagColsFunction = New RFunction
+ clsLeadColsFunction = New RFunction
+ clsLeadColsFunction = New RFunction
+ clsConcDiffColsFunction = New RFunction
+ clsReplicateColsFunction = New RFunction
+ clsStandardDevColsFunction = New RFunction
+ clsSymbolOperator = New ROperator
+ clsSymbolOperator2 = New ROperator
+ clsBooleanColsOperator = New ROperator
+ clsAddColumnsFunction = New RFunction
+ clsPasteFunction = New RFunction
+ clsColumnsFunction = New RFunction
+ clsAssignOperator = New ROperator
+ clsIsNAColsFunction = New RFunction
ucrSelectorForRank.Reset()
ucrReceiverRank.SetMeAsReceiver()
@@ -350,6 +435,8 @@ Public Class dlgTransform
clsSortFunction.AddParameter("decreasing", "TRUE", iPosition:=1)
clsSortFunction.AddParameter("na.last", "TRUE", iPosition:=2)
+ clsGetColSelectionNamesFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_column_selected_column_names")
+
clsRoundFunction.SetRCommand("round")
clsSignifFunction.SetRCommand("signif")
@@ -425,20 +512,147 @@ Public Class dlgTransform
clsBooleanOperator.SetOperation("==")
clsIsNAFunction.SetRCommand("is.na")
+ clsRankColsFunction.SetRCommand("~rank")
+ clsRankColsFunction.AddParameter("na.last", Chr(34) & "keep" & Chr(34), iPosition:=2)
+ clsRankColsFunction.AddParameter("ties.method", Chr(34) & "average" & Chr(34), iPosition:=3)
+
+ clsSortColsFunction.SetRCommand("~sort")
+ clsSortColsFunction.AddParameter("decreasing", "TRUE", iPosition:=1)
+ clsSortColsFunction.AddParameter("na.last", "TRUE", iPosition:=2)
+
+ clsRoundColsFunction.SetRCommand("~round")
+
+ clsSignifColsFunction.SetRCommand("~signif")
+
+ clsLagColsFunction.SetPackageName("~dplyr")
+ clsLagColsFunction.SetRCommand("lag")
+
+ clsLeadColsFunction.SetPackageName("~dplyr")
+ clsLeadColsFunction.SetRCommand("lead")
+
+ clsDiffColsFunction.SetRCommand("diff")
+ clsDiffColsFunction.AddParameter("lag", "1", iPosition:=1)
+
+ clsReplicateColsFunction.SetRCommand("rep")
+ clsReplicateColsFunction.AddParameter("x", "NA", iPosition:=0)
+
+ clsConcDiffColsFunction.SetRCommand("~c")
+ clsConcDiffColsFunction.AddParameter("y", clsRFunctionParameter:=clsReplicateColsFunction, iPosition:=0, bIncludeArgumentName:=False)
+ clsConcDiffColsFunction.AddParameter("x", clsRFunctionParameter:=clsDiffColsFunction, iPosition:=1, bIncludeArgumentName:=False)
+
+ clsMeanColsFunction.SetRCommand("mean")
+ clsMeanColsFunction.AddParameter("na.rm", "TRUE", iPosition:=1)
+
+ clsStandardDevColsFunction.SetRCommand("sd")
+ clsStandardDevColsFunction.AddParameter("na.rm", "TRUE", iPosition:=1)
+
+ clsSubtractColsOperator.SetOperation("-")
+ clsSubtractColsOperator.AddParameter("left", ".x", iPosition:=0)
+ clsSubtractColsOperator.AddParameter("y", clsRFunctionParameter:=clsMeanColsFunction, iPosition:=1)
+
+ clsDivisionColsOperator.SetOperation("/")
+ clsDivisionColsOperator.AddParameter("x", clsROperatorParameter:=clsSubtractColsOperator, iPosition:=0)
+ clsDivisionColsOperator.AddParameter("y", clsRFunctionParameter:=clsStandardDevColsFunction, iPosition:=1)
+
+ clsSymbolOperator.AddParameter("left", "~", iPosition:=0, bIncludeArgumentName:=False)
+ clsSymbolOperator.AddParameter("right", clsROperatorParameter:=clsDivisionColsOperator, iPosition:=1, bIncludeArgumentName:=False)
+ clsSymbolOperator.bBrackets = False
+
+ clsSquarerootColsFunction.SetRCommand("~sqrt")
+
+ clsAddConstantColsOperator.SetOperation("+")
+ clsAddConstantColsOperator.AddParameter("c", "0", iPosition:=1)
+
+ clsNaturalLogColsFunction.SetRCommand("~log")
+
+ clsLogBase10ColsFunction.SetRCommand("~log10")
+
+ clsPowerColsOperator.SetOperation("^")
+ clsPowerColsOperator.bSpaceAroundOperation = False
+
+ clsScaleMeanColsFunction.SetRCommand("~mean")
+ clsScaleMeanColsFunction.AddParameter("na.rm", "TRUE", iPosition:=1)
+
+ clsScaleMinColsFunction.SetRCommand("~min")
+ clsScaleMinColsFunction.AddParameter("na.rm", "TRUE", iPosition:=1)
+
+ clsScaleSubtractColsOperator.SetOperation("-")
+ clsScaleSubtractColsOperator.AddParameter("u", "0", iPosition:=1)
+
+ clsScaleMultiplyColsOperator.SetOperation("*")
+ clsScaleMultiplyColsOperator.AddParameter("x", clsROperatorParameter:=clsScaleSubtractColsOperator, iPosition:=0)
+ clsScaleMultiplyColsOperator.AddParameter("y", "1", iPosition:=1)
+
+ clsScaleDivideColsOperator.SetOperation("/")
+ clsScaleDivideColsOperator.AddParameter("x", clsROperatorParameter:=clsSymbolOperator2, iPosition:=0)
+ clsScaleDivideColsOperator.AddParameter("z", "1", iPosition:=1)
+ clsScaleDivideColsOperator.bBrackets = False
+
+ clsScaleAddColsOperator.SetOperation("+")
+ clsScaleAddColsOperator.AddParameter("x", clsROperatorParameter:=clsScaleDivideColsOperator, iPosition:=0)
+ clsScaleAddColsOperator.AddParameter("v", "0", iPosition:=1)
+ clsScaleAddColsOperator.bBrackets = False
+
+ clsSymbolOperator2.AddParameter("left", "~", iPosition:=0, bIncludeArgumentName:=False)
+ clsSymbolOperator2.AddParameter("right", clsROperatorParameter:=clsScaleMultiplyColsOperator, iPosition:=1, bIncludeArgumentName:=False)
+ clsSymbolOperator2.bBrackets = False
+
+ clsBooleanColsOperator.SetOperation("==")
+ clsIsNAColsFunction.SetRCommand("is.na")
+
+ clsGetDataFrameFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_data_frame")
+
+ clsMutateFunction.SetPackageName("dplyr")
+ clsMutateFunction.SetRCommand("mutate")
+
+ clsEverythingFunction.SetRCommand("everything")
+ clsEverythingFunction.AddParameter("dot", ".", bIncludeArgumentName:=False, iPosition:=0)
+
+ clsAcrossFunction.SetPackageName("dplyr")
+ clsAcrossFunction.SetRCommand("across")
+ clsAcrossFunction.AddParameter("every", clsRFunctionParameter:=clsEverythingFunction, bIncludeArgumentName:=False, iPosition:=0)
+
+ clsTildaOperator.SetOperation("~")
+
+ clsPipeOperator.SetOperation("%>%")
+ clsPipeOperator.AddParameter("left", clsRFunctionParameter:=clsGetDataFrameFunction, iPosition:=0)
+ clsPipeOperator.AddParameter("right", clsRFunctionParameter:=clsMutateFunction, iPosition:=1)
+ clsPipeOperator.SetAssignTo("col")
clsRemoveLabelsFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$append_to_variables_metadata")
clsRemoveLabelsFunction.AddParameter("property", Chr(34) & "labels" & Chr(34), iPosition:=2)
clsRemoveLabelsFunction.AddParameter("new_val", Chr(34) & Chr(34), iPosition:=3)
clsDummyTransformFunction.AddParameter("check", "numeric", iPosition:=0)
+ clsDummyTransformFunction.AddParameter("col", "single", iPosition:=1)
+
clsNumericDummyFunction.AddParameter("check", "round", iPosition:=0)
+ clsNumericDummyFunction.AddParameter("multiple", "False", iPosition:=1)
+ clsNumericDummyFunction.AddParameter("divide", "False", iPosition:=2)
+ clsNumericDummyFunction.AddParameter("add", "False", iPosition:=3)
+ clsNumericDummyFunction.AddParameter("subtract", "False", iPosition:=4)
+
clsNonNegativeDummyFunction.AddParameter("check", "sqrt", iPosition:=0)
- ucrBase.clsRsyntax.SetBaseRFunction(clsRoundFunction)
+ clsColumnsFunction.SetRCommand("colnames")
+ clsColumnsFunction.AddParameter("col_data", "col",, bIncludeArgumentName:=False)
+
+ clsPasteFunction.SetRCommand("paste0")
+ clsPasteFunction.AddParameter("data", clsRFunctionParameter:=clsColumnsFunction, iPosition:=0, bIncludeArgumentName:=False)
+
+ clsAssignOperator.SetOperation("<-")
+ clsAssignOperator.AddParameter("left", clsRFunctionParameter:=clsColumnsFunction, iPosition:=0)
+ clsAssignOperator.AddParameter("right", clsRFunctionParameter:=clsPasteFunction, iPosition:=1)
+
+ clsAddColumnsFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$add_columns_to_data")
+ clsAddColumnsFunction.AddParameter("data_name", Chr(34) & ucrSelectorForRank.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0)
+ clsAddColumnsFunction.AddParameter("before", "FALSE", iPosition:=2)
+
End Sub
Private Sub SetRCodeForControls(bReset As Boolean)
bResetRCode = False
+
ucrReceiverRank.AddAdditionalCodeParameterPair(clsSortFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=1)
ucrReceiverRank.AddAdditionalCodeParameterPair(clsRoundFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=2)
ucrReceiverRank.AddAdditionalCodeParameterPair(clsSignifFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=3)
@@ -449,13 +663,51 @@ Public Class dlgTransform
ucrReceiverRank.AddAdditionalCodeParameterPair(clsSubtractOperator, New RParameter("x", 0), iAdditionalPairNo:=8)
ucrReceiverRank.AddAdditionalCodeParameterPair(clsStandardDevFunction, New RParameter("x", 0), iAdditionalPairNo:=9)
ucrNudDiffLag.AddAdditionalCodeParameterPair(clsReplicateFunction, New RParameter("times", 1), iAdditionalPairNo:=1)
+ ucrNudDiffLag.AddAdditionalCodeParameterPair(clsReplicateColsFunction, New RParameter("times", 1), iAdditionalPairNo:=2)
+ ucrNudDiffLag.AddAdditionalCodeParameterPair(clsDiffColsFunction, New RParameter("lag", 1), iAdditionalPairNo:=3)
+ ucrNudLagLeadPosition.AddAdditionalCodeParameterPair(clsLeadColsFunction, New RParameter("n", 1), iAdditionalPairNo:=1)
+ ucrNudLagPosition.AddAdditionalCodeParameterPair(clsLagColsFunction, New RParameter("lag", 1), iAdditionalPairNo:=1)
+ ucrNudSignifDigits.AddAdditionalCodeParameterPair(clsSignifColsFunction, New RParameter("digits", 1), iAdditionalPairNo:=1)
+ ucrInputPower.AddAdditionalCodeParameterPair(clsPowerColsOperator, New RParameter("y", 1), iAdditionalPairNo:=1)
+
ucrReceiverRank.AddAdditionalCodeParameterPair(clsAddConstantOperator, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=10)
ucrReceiverRank.AddAdditionalCodeParameterPair(clsScaleSubtractOperator, New RParameter("x", 0), iAdditionalPairNo:=11)
ucrReceiverRank.AddAdditionalCodeParameterPair(clsScaleMeanFunction, New RParameter("x", 0), iAdditionalPairNo:=12)
ucrReceiverRank.AddAdditionalCodeParameterPair(clsScaleMinFunction, New RParameter("x", 0), iAdditionalPairNo:=13)
ucrReceiverRank.AddAdditionalCodeParameterPair(clsBooleanOperator, New RParameter("x", 0), iAdditionalPairNo:=14)
ucrReceiverRank.AddAdditionalCodeParameterPair(clsIsNAFunction, New RParameter("x", 0), iAdditionalPairNo:=15)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsGetColSelectionNamesFunction, New RParameter("x", 0), iAdditionalPairNo:=16)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsLeadColsFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=17)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsSortColsFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=18)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsRoundColsFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=19)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsSignifColsFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=20)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsLagColsFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=21)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsLeadColsFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=22)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsDiffColsFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=23)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsMeanColsFunction, New RParameter("x", 0), iAdditionalPairNo:=24)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsStandardDevColsFunction, New RParameter("x", 0), iAdditionalPairNo:=25)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsRankColsFunction, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=26)
+
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsAddConstantColsOperator, ucrReceiverRank.GetParameter(), iAdditionalPairNo:=27)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsScaleMeanColsFunction, New RParameter("x", 0), iAdditionalPairNo:=28)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsScaleMinColsFunction, New RParameter("x", 0), iAdditionalPairNo:=29)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsBooleanColsOperator, New RParameter("x", 0), iAdditionalPairNo:=30)
+ ucrReceiverRank.AddAdditionalCodeParameterPair(clsIsNAColsFunction, New RParameter("x", 0), iAdditionalPairNo:=31)
+
ucrChkOmitNA.AddAdditionalCodeParameterPair(clsStandardDevFunction, ucrChkOmitNA.GetParameter(), iAdditionalPairNo:=1)
+ ucrSelectorForRank.AddAdditionalCodeParameterPair(clsGetColSelectionNamesFunction, ucrSelectorForRank.GetParameter, iAdditionalPairNo:=1)
+ ucrNudRoundOfDigits.AddAdditionalCodeParameterPair(clsRoundColsFunction, New RParameter("digits", 1), iAdditionalPairNo:=1)
+ ucrChkOmitNA.AddAdditionalCodeParameterPair(clsMeanColsFunction, ucrChkOmitNA.GetParameter(), iAdditionalPairNo:=2)
+ ucrChkOmitNA.AddAdditionalCodeParameterPair(clsStandardDevColsFunction, ucrChkOmitNA.GetParameter(), iAdditionalPairNo:=3)
+ ucrPnlTies.AddAdditionalCodeParameterPair(clsRankColsFunction, New RParameter("ties.method", 1), iAdditionalPairNo:=1)
+ ucrPnlMissingValues.AddAdditionalCodeParameterPair(clsRankColsFunction, New RParameter("na.last", 2), iAdditionalPairNo:=1)
+ ucrChkMissingLast.AddAdditionalCodeParameterPair(clsSortColsFunction, New RParameter("na.last", 1), iAdditionalPairNo:=1)
+ ucrChkDecreasing.AddAdditionalCodeParameterPair(clsSortColsFunction, New RParameter("decreasing", 2), iAdditionalPairNo:=1)
+ ucrInputMultiply.AddAdditionalCodeParameterPair(clsScaleMultiplyColsOperator, New RParameter("y", 1), iAdditionalPairNo:=1)
+ ucrInputDivide.AddAdditionalCodeParameterPair(clsScaleDivideColsOperator, New RParameter("z", 1), iAdditionalPairNo:=1)
+ ucrInputAdd.AddAdditionalCodeParameterPair(clsScaleAddColsOperator, New RParameter("v", 1), iAdditionalPairNo:=1)
+ ucrInputSubtract.AddAdditionalCodeParameterPair(clsScaleSubtractColsOperator, New RParameter("u", 1), iAdditionalPairNo:=1)
+ ucrInputConstant.AddAdditionalCodeParameterPair(clsAddConstantColsOperator, New RParameter("c", 1), iAdditionalPairNo:=1)
ucrSaveNew.AddAdditionalRCode(clsLeadFunction, iAdditionalPairNo:=1)
ucrSaveNew.AddAdditionalRCode(clsLagFunction, iAdditionalPairNo:=2)
@@ -474,10 +726,10 @@ Public Class dlgTransform
ucrSaveNew.AddAdditionalRCode(clsIsNAFunction, iAdditionalPairNo:=15)
ucrPnlTransformOptions.SetRCode(clsDummyTransformFunction, bReset)
- ucrReceiverRank.SetRCode(clsRankFunction, bReset)
+ ucrPnlColumnSelectOptions.SetRCode(clsDummyTransformFunction, bReset)
ucrChkDecreasing.SetRCode(clsSortFunction, bReset)
ucrChkMissingLast.SetRCode(clsSortFunction, bReset)
- ucrSaveNew.SetRCode(clsRoundFunction, bReset)
+
ucrPnlTies.SetRCode(clsRankFunction, bReset)
ucrPnlMissingValues.SetRCode(clsRankFunction, bReset)
ucrNudRoundOfDigits.SetRCode(clsRoundFunction, bReset)
@@ -496,6 +748,15 @@ Public Class dlgTransform
ucrPnlNonNegative.SetRCode(clsNonNegativeDummyFunction, bReset)
ucrChkOmitNA.SetRCode(clsMeanFunction, bReset)
ucrChkPreview.SetRCode(clsConstantDummyFunction, bReset)
+
+ If bReset Then
+ ucrReceiverRank.SetRCode(clsRankFunction, bReset)
+ ucrChkDivide.SetRCode(clsNumericDummyFunction, bReset)
+ ucrChkAdd.SetRCode(clsNumericDummyFunction, bReset)
+ ucrChkMultiply.SetRCode(clsNumericDummyFunction, bReset)
+ ucrChkSubtract.SetRCode(clsNumericDummyFunction, bReset)
+ ucrSaveNew.SetRCode(clsRoundFunction, bReset)
+ End If
bResetRCode = True
End Sub
@@ -506,14 +767,24 @@ Public Class dlgTransform
Else
ucrBase.OKEnabled(Not ucrReceiverRank.IsEmpty() AndAlso ucrSaveNew.IsComplete)
End If
+
Else
- ucrBase.OKEnabled(Not ucrReceiverRank.IsEmpty() AndAlso ucrSaveNew.IsComplete)
+ ucrBase.OKEnabled(Not ucrReceiverRank.IsEmpty())
End If
End Sub
Private Sub NewDefaultName()
- If (Not ucrSaveNew.bUserTyped) AndAlso Not ucrReceiverRank.IsEmpty Then
- ucrSaveNew.SetPrefix(ucrReceiverRank.GetVariableNames(bWithQuotes:=False))
+ If rdoSingle.Checked Then
+ ucrSaveNew.SetLabelText("New Column Name:")
+ If Not ucrSaveNew.bUserTyped AndAlso Not ucrReceiverRank.IsEmpty Then
+ ucrSaveNew.SetPrefix(ucrReceiverRank.GetVariableNames(bWithQuotes:=False))
+ End If
+ ElseIf rdoMultiple.Checked Then
+ ucrSaveNew.SetLabelText("Suffix Name:")
+ ucrSaveNew.btnColumnPosition.Visible = False
+ If Not ucrReceiverRank.IsEmpty AndAlso (Not ucrSaveNew.bUserTyped) Then
+ clsAddColumnsFunction.AddParameter("col_data", "col", iPosition:=1)
+ End If
End If
End Sub
@@ -526,11 +797,12 @@ Public Class dlgTransform
Private Sub ucrPnlTransformOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlTransformOptions.ControlValueChanged, ucrPnlNumericOptions.ControlValueChanged, ucrInputLogicalValues.ControlValueChanged,
ucrPnlNonNegative.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrPnlTies.ControlValueChanged, ucrChkPreview.ControlValueChanged, ucrReceiverRank.ControlValueChanged, ucrNudDiffLag.ControlValueChanged, ucrNudLagLeadPosition.ControlValueChanged,
- ucrNudLagPosition.ControlValueChanged, ucrNudRoundOfDigits.ControlValueChanged, ucrNudSignifDigits.ControlValueChanged, ucrInputPower.ControlValueChanged, ucrInputMultiply.ControlValueChanged,
+ ucrNudLagPosition.ControlValueChanged, ucrNudRoundOfDigits.ControlValueChanged, ucrNudSignifDigits.ControlValueChanged, ucrInputPower.ControlValueChanged, ucrInputMultiply.ControlValueChanged, ucrPnlColumnSelectOptions.ControlValueChanged,
ucrInputDivide.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputAdd.ControlValueChanged, ucrChkOmitNA.ControlValueChanged, ucrInputLogicOperations.ControlValueChanged, ucrChkAddConstant.ControlValueChanged,
ucrChkMissingLast.ControlValueChanged, ucrChkDecreasing.ControlValueChanged, ucrChkDivide.ControlValueChanged, ucrChkAdd.ControlValueChanged, ucrChkMultiply.ControlValueChanged, ucrChkSubtract.ControlValueChanged
- If bResetRCode Then
- ucrBase.clsRsyntax.ClearCodes()
+
+ ucrBase.clsRsyntax.ClearCodes()
+ If rdoSingle.Checked Then
If rdoRank.Checked Then
clsPreviewTextFunction = clsRankFunction.Clone
clsDummyTransformFunction.AddParameter("check", "rank", iPosition:=0)
@@ -624,11 +896,121 @@ Public Class dlgTransform
ucrBase.clsRsyntax.SetBaseROperator(clsScaleAddOperator)
ucrBase.clsRsyntax.AddToAfterCodes(clsRemoveLabelsFunction)
End If
+
+ ucrBase.clsRsyntax.RemoveFromAfterCodes(clsAssignOperator)
+ ucrBase.clsRsyntax.RemoveFromAfterCodes(clsAddColumnsFunction)
+ Else
+ UpdateLoopParameters()
+ ucrBase.clsRsyntax.ClearCodes()
+ ucrBase.clsRsyntax.SetAssignTo("col")
+ ucrBase.clsRsyntax.AddToAfterCodes(clsPipeOperator, 0)
+ ucrBase.clsRsyntax.AddToAfterCodes(clsAssignOperator, 1)
+ ucrBase.clsRsyntax.AddToAfterCodes(clsAddColumnsFunction, 2)
+
+
End If
SetPreviewText()
UpdateNonNegativeParameters()
NewDefaultName()
ResetPreview()
+ AddRemoveLogicalValues()
+ End Sub
+
+ Private Sub UpdateLoopParameters()
+ If rdoRank.Checked Then
+ clsDummyTransformFunction.AddParameter("check", "rank", iPosition:=0)
+ clsPreviewTextFunction = clsRankColsFunction.Clone
+ clsRankColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsRFunctionParameter:=clsRankColsFunction, bIncludeArgumentName:=False, iPosition:=1)
+ ElseIf rdoSort.Checked Then
+ clsDummyTransformFunction.AddParameter("check", "sort", iPosition:=0)
+ clsPreviewTextFunction = clsSortColsFunction.Clone
+ clsSortColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsRFunctionParameter:=clsSortColsFunction, bIncludeArgumentName:=False, iPosition:=1)
+ ElseIf rdoNumeric.Checked Then
+ clsDummyTransformFunction.AddParameter("check", "numeric", iPosition:=0)
+ If rdoRoundOf.Checked Then
+ clsNumericDummyFunction.AddParameter("check", "round", iPosition:=0)
+ clsRoundColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsRFunctionParameter:=clsRoundColsFunction, bIncludeArgumentName:=False)
+ ElseIf rdoSignificantDigits.Checked Then
+ clsNumericDummyFunction.AddParameter("check", "signif", iPosition:=0)
+ clsSignifColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsRFunctionParameter:=clsSignifColsFunction, bIncludeArgumentName:=False)
+ ElseIf rdoLag.Checked Then
+ clsNumericDummyFunction.AddParameter("check", "lag", iPosition:=0)
+ clsLagColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsRFunctionParameter:=clsLagColsFunction, bIncludeArgumentName:=False)
+ ElseIf rdoLead.Checked Then
+ clsNumericDummyFunction.AddParameter("check", "lead", iPosition:=0)
+ clsLeadColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsRFunctionParameter:=clsLeadColsFunction, bIncludeArgumentName:=False)
+ ElseIf rdoDifference.Checked Then
+ clsNumericDummyFunction.AddParameter("check", "diff", iPosition:=0)
+ clsDiffColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsRFunctionParameter:=clsConcDiffColsFunction, bIncludeArgumentName:=False)
+ ElseIf rdoStandardize.Checked Then
+ clsNumericDummyFunction.AddParameter("check", "standardise", iPosition:=0)
+ clsMeanColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsStandardDevColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsROperatorParameter:=clsSymbolOperator, bIncludeArgumentName:=False)
+ ElseIf rdoLogical.Checked Then
+ clsNumericDummyFunction.AddParameter("check", "logical", iPosition:=0)
+ clsBooleanColsOperator.AddParameter("x", "~.x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsROperatorParameter:=clsBooleanColsOperator, bIncludeArgumentName:=False)
+ Select Case ucrInputLogicOperations.GetText
+ Case "=="
+ clsBooleanColsOperator.SetOperation("==")
+ Case "<"
+ clsBooleanColsOperator.SetOperation("<")
+ Case "<="
+ clsBooleanColsOperator.SetOperation("<=")
+ Case ">"
+ clsBooleanColsOperator.SetOperation(">")
+ Case ">="
+ clsBooleanColsOperator.SetOperation(">=")
+ Case "!="
+ clsBooleanColsOperator.SetOperation("!=")
+ Case "%in%"
+ clsBooleanColsOperator.SetOperation("%in%")
+ Case "is.na"
+ clsIsNAColsFunction.SetRCommand("is.na")
+ clsPreviewTextFunction = clsIsNAFunction.Clone
+ ucrBase.clsRsyntax.SetBaseRFunction(clsIsNAFunction)
+ Case "!is.na"
+ clsIsNAFunction.SetRCommand("!is.na")
+ clsPreviewTextFunction = clsIsNAFunction.Clone
+ ucrBase.clsRsyntax.SetBaseRFunction(clsIsNAFunction)
+ End Select
+ End If
+ ucrBase.clsRsyntax.AddToAfterCodes(clsRemoveLabelsFunction)
+ ElseIf rdoNonNegative.Checked Then
+ clsDummyTransformFunction.AddParameter("check", "non-negative", iPosition:=0)
+ If rdoSquareRoot.Checked Then
+ clsNonNegativeDummyFunction.AddParameter("check", "sqrt", iPosition:=0)
+ clsSquarerootColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsRFunctionParameter:=clsSquarerootColsFunction, bIncludeArgumentName:=False)
+ ElseIf rdoPower.Checked Then
+ clsNonNegativeDummyFunction.AddParameter("check", "power", iPosition:=0)
+ clsPowerColsOperator.AddParameter("y", ucrInputPower.GetText, iPosition:=1)
+ clsPowerColsOperator.AddParameter("x", "~.", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsROperatorParameter:=clsPowerColsOperator, bIncludeArgumentName:=False)
+ ElseIf rdoLogToBase10.Checked Then
+ clsNonNegativeDummyFunction.AddParameter("check", "log10", iPosition:=0)
+ clsLogBase10ColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsRFunctionParameter:=clsLogBase10ColsFunction, bIncludeArgumentName:=False)
+ ElseIf rdoNaturalLog.Checked Then
+ clsNonNegativeDummyFunction.AddParameter("check", "log", iPosition:=0)
+ clsNaturalLogColsFunction.AddParameter("x", ".x", bIncludeArgumentName:=False, iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsRFunctionParameter:=clsNaturalLogColsFunction, bIncludeArgumentName:=False)
+ End If
+ ElseIf rdoScale.Checked Then
+ clsDummyTransformFunction.AddParameter("check", "scale", iPosition:=0)
+ clsScaleSubtractColsOperator.AddParameter("left", ".x", iPosition:=0)
+ clsAcrossFunction.AddParameter("operator", clsROperatorParameter:=clsScaleAddColsOperator, bIncludeArgumentName:=False)
+ End If
+
+ clsMutateFunction.AddParameter("var", clsRFunctionParameter:=clsAcrossFunction, bIncludeArgumentName:=False, iPosition:=0)
End Sub
Private Sub SetPreviewText()
@@ -656,10 +1038,18 @@ Public Class dlgTransform
Private Sub UpdateConstantParameter()
If ucrChkAddConstant.Checked Then
- clsSquarerootFunction.AddParameter("x", clsROperatorParameter:=clsAddConstantOperator, iPosition:=0)
- clsPowerOperator.AddParameter("x", clsROperatorParameter:=clsAddConstantOperator, iPosition:=0)
- clsLogBase10Function.AddParameter("x", clsROperatorParameter:=clsAddConstantOperator, iPosition:=0)
- clsNaturalLogFunction.AddParameter("x", clsROperatorParameter:=clsAddConstantOperator, iPosition:=0)
+ If rdoSingle.Checked Then
+ clsSquarerootFunction.AddParameter("x", clsROperatorParameter:=clsAddConstantOperator, iPosition:=0)
+ clsPowerOperator.AddParameter("x", clsROperatorParameter:=clsAddConstantOperator, iPosition:=0)
+ clsLogBase10Function.AddParameter("x", clsROperatorParameter:=clsAddConstantOperator, iPosition:=0)
+ clsNaturalLogFunction.AddParameter("x", clsROperatorParameter:=clsAddConstantOperator, iPosition:=0)
+ Else
+ clsSquarerootColsFunction.AddParameter("x", clsROperatorParameter:=clsAddConstantColsOperator, iPosition:=0)
+ clsPowerColsOperator.AddParameter("x", clsROperatorParameter:=clsAddConstantColsOperator, iPosition:=0)
+ clsLogBase10ColsFunction.AddParameter("x", clsROperatorParameter:=clsAddConstantColsOperator, iPosition:=0)
+ clsNaturalLogColsFunction.AddParameter("x", clsROperatorParameter:=clsAddConstantColsOperator, iPosition:=0)
+ End If
+
End If
If bResetRCode Then
If ucrChkAddConstant.Checked Then
@@ -701,13 +1091,30 @@ Public Class dlgTransform
Private Sub ucrInputLogicalValues_TextChanged(sender As Object, e As EventArgs) Handles ucrInputLogicalValues.TextChanged
SetPreviewText()
+ AddRemoveLogicalValues()
End Sub
Private Sub ucrInputLogicalValues_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputLogicalValues.ControlValueChanged
- If Not ucrInputLogicalValues.IsEmpty Then
- clsBooleanOperator.AddParameter("right", ucrInputLogicalValues.GetText, iPosition:=1)
- Else
+ AddRemoveLogicalValues()
+ End Sub
+
+ Private Sub AddRemoveLogicalValues()
+ If rdoSingle.Checked Then
+ If Not ucrInputLogicalValues.IsEmpty Then
+ clsBooleanOperator.AddParameter("right", ucrInputLogicalValues.GetText, iPosition:=1)
+ Else
+ clsBooleanOperator.RemoveParameterByName("right")
+ End If
+ clsBooleanColsOperator.RemoveParameterByName("right")
+
+ ElseIf rdoMultiple.Checked Then
+ If Not ucrInputLogicalValues.IsEmpty Then
+ clsBooleanColsOperator.AddParameter("right", ucrInputLogicalValues.GetText, iPosition:=1)
+ Else
+ clsBooleanColsOperator.RemoveParameterByName("right")
+ End If
clsBooleanOperator.RemoveParameterByName("right")
+
End If
End Sub
@@ -718,13 +1125,65 @@ Public Class dlgTransform
Private Sub ucrSaveNew_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveNew.ControlValueChanged
If ucrSaveNew.GetText <> "" AndAlso ucrSaveNew.IsComplete() Then
clsRemoveLabelsFunction.AddParameter("col_names", Chr(34) & ucrSaveNew.GetText & Chr(34), iPosition:=1)
+ clsPasteFunction.AddParameter("col_data", Chr(34) & "_" & ucrSaveNew.GetText & Chr(34), iPosition:=1, bIncludeArgumentName:=False)
End If
End Sub
Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlContentsChanged, ucrSaveNew.ControlContentsChanged,
- ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged,
+ ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, ucrPnlColumnSelectOptions.ControlContentsChanged, ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged,
ucrChkMultiply.ControlContentsChanged, ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged,
ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged, ucrInputLogicalValues.ControlContentsChanged, ucrInputLogicOperations.ControlContentsChanged
TestOKEnabled()
End Sub
+
+ Private Sub ucrPnlColumnSelectOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnSelectOptions.ControlValueChanged, ucrReceiverRank.ControlValueChanged, ucrSelectorForRank.ControlValueChanged
+ clsGetDataFrameFunction.AddParameter("data_name", Chr(34) & ucrSelectorForRank.strCurrentDataFrame & Chr(34), iPosition:=0, bIncludeArgumentName:=False)
+ clsGetDataFrameFunction.AddParameter("column_selection_name ", ucrReceiverRank.GetVariableNames, iPosition:=1)
+ clsGetDataFrameFunction.SetAssignTo(ucrSelectorForRank.ucrAvailableDataFrames.cboAvailableDataFrames.Text)
+ clsAddColumnsFunction.AddParameter("data_name", Chr(34) & ucrSelectorForRank.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0)
+ If rdoMultiple.Checked Then
+ clsDummyTransformFunction.AddParameter("col", "multiple", iPosition:=0)
+ ucrSelectorForRank.SetItemType("column_selection")
+ ucrReceiverRank.strSelectorHeading = "Column selections"
+ lblSelectColumns.Text = "Select:"
+ ElseIf rdoSingle.Checked Then
+ clsDummyTransformFunction.AddParameter("col", "single", iPosition:=0)
+ ucrSelectorForRank.SetItemType("column")
+ ucrReceiverRank.strSelectorHeading = "Numerics"
+ lblSelectColumns.Text = "Column:"
+ End If
+ AddRemoveLogicalValues()
+ End Sub
+
+ Private Sub ucrChkMultiply_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkMultiply.ControlValueChanged, ucrInputMultiply.ControlValueChanged
+ If ucrChkMultiply.Checked AndAlso Not ucrInputMultiply.IsEmpty Then
+ clsScaleMultiplyColsOperator.AddParameter("y", ucrInputMultiply.GetText, iPosition:=1)
+ Else
+ clsScaleMultiplyColsOperator.RemoveParameterByName("y")
+ End If
+ End Sub
+
+ Private Sub ucrChkAdd_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAdd.ControlValueChanged, ucrInputAdd.ControlValueChanged
+ If ucrChkAdd.Checked AndAlso Not ucrInputAdd.IsEmpty Then
+ clsScaleAddColsOperator.AddParameter("v", ucrInputAdd.GetText, iPosition:=1)
+ Else
+ clsScaleAddColsOperator.RemoveParameterByName("v")
+ End If
+ End Sub
+
+ Private Sub ucrChkSubtract_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSubtract.ControlValueChanged, ucrInputSubtract.ControlValueChanged
+ If ucrChkSubtract.Checked AndAlso Not ucrInputSubtract.IsEmpty Then
+ clsScaleSubtractColsOperator.AddParameter("u", ucrInputSubtract.GetText, iPosition:=1)
+ Else
+ clsScaleSubtractColsOperator.RemoveParameterByName("u")
+ End If
+ End Sub
+
+ Private Sub ucrChkDivide_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDivide.ControlValueChanged, ucrInputDivide.ControlValueChanged
+ If ucrChkDivide.Checked AndAlso Not ucrInputDivide.IsEmpty Then
+ clsScaleDivideColsOperator.AddParameter("z", ucrInputDivide.GetText, iPosition:=1)
+ Else
+ clsScaleDivideColsOperator.RemoveParameterByName("z")
+ End If
+ End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgTransformText.vb b/instat/dlgTransformText.vb
index b0d570247b6..d4559e71ce2 100644
--- a/instat/dlgTransformText.vb
+++ b/instat/dlgTransformText.vb
@@ -50,7 +50,6 @@ Public Class dlgTransformText
Dim dctInputSeparator As New Dictionary(Of String, String)
ucrBase.iHelpTopicID = 343
- ucrBase.clsRsyntax.bUseBaseFunction = True
'ucrReceiver
ucrReceiverTransformText.SetParameter(New RParameter("string", 0))
diff --git a/instat/dlgTransposeColumns.vb b/instat/dlgTransposeColumns.vb
index 0673dacc656..6dab56ea4cd 100644
--- a/instat/dlgTransposeColumns.vb
+++ b/instat/dlgTransposeColumns.vb
@@ -105,7 +105,7 @@ Public Class dlgTransposeColumns
NewDefaultName()
End Sub
Private Sub ucrReceiverColumnsToTranspose_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverColumnsToTranspose.ControlValueChanged
- ucrBase.clsRsyntax.lstBeforeCodes.Clear()
+ ucrBase.clsRsyntax.GetBeforeCodes().Clear()
clsGetColumnNamesFunction = ucrReceiverColumnsToTranspose.GetVariables(True).Clone
clsGetColumnNamesFunction.SetAssignTo("columns")
ucrBase.clsRsyntax.AddToBeforeCodes(clsGetColumnNamesFunction)
diff --git a/instat/dlgTwoVariableUseModel.vb b/instat/dlgTwoVariableUseModel.vb
index 604c852e2f6..0f5e96ac92e 100644
--- a/instat/dlgTwoVariableUseModel.vb
+++ b/instat/dlgTwoVariableUseModel.vb
@@ -50,11 +50,11 @@ Public Class dlgTwoVariableUseModel
'autoplot function does not support glm/lm models
' sdgSimpleRegOptions.chkFittedModel.Enabled = False
'ucrBase.iHelpTopicID =
- ucrBaseUseModel.clsRsyntax.SetOperation("+")
+ ucrBaseUseModel.clsRsyntax.clsBaseOperator.SetOperation("+")
ucrReceiverUseModel.SetItemType(RObjectTypeLabel.Model)
ucrReceiverUseModel.Selector = ucrSelectorUseModel
clsRCommand.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_models")
- ucrBaseUseModel.clsRsyntax.SetOperatorParameter(True, clsRFunc:=clsRCommand)
+ ucrBaseUseModel.clsRsyntax.clsBaseOperator.AddParameter(clsRFunctionParameter:=clsRCommand, iPosition:=0)
ucrModel.IsReadOnly = True
' sdgSimpleRegOptions.SetRModelFunction(clsRCommand)
ucrReceiverUseModel.strSelectorHeading = "Models"
diff --git a/instat/dlgUseModel.vb b/instat/dlgUseModel.vb
index e0f328504e2..6cdefc38f12 100644
--- a/instat/dlgUseModel.vb
+++ b/instat/dlgUseModel.vb
@@ -256,7 +256,7 @@ Public Class dlgUseModel
Dim strModel As String
Dim item As ListViewItem
- ucrBase.clsRsyntax.lstBeforeCodes.Clear()
+ ucrBase.clsRsyntax.GetBeforeCodes.Clear()
clsGetModel.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data")
ucrInputModels.SetName("[No models selected]")
strExpression = ucrReceiverForTestColumn.GetVariableNames(False)
@@ -277,7 +277,7 @@ Public Class dlgUseModel
End If
'Checking if the commandString contains the commands from the segmented ,davie and pscore buttons.If so Again check if the list of before codes contains the clsAttach function before adiing
If Not (InStr(ucrBase.clsRsyntax.strCommandString, "segmented::segmented") = 0) Or Not (InStr(ucrBase.clsRsyntax.strCommandString, "segmented::davies.test") = 0) Or Not (InStr(ucrBase.clsRsyntax.strCommandString, "segmented::pscore.test") = 0) Then
- If Not ucrBase.clsRsyntax.lstBeforeCodes.Contains(clsAttach) Then
+ If Not ucrBase.clsRsyntax.GetBeforeCodes().Contains(clsAttach) Then
ucrBase.clsRsyntax.AddToBeforeCodes(clsAttach)
End If
diff --git a/instat/dlgWordwrap.vb b/instat/dlgWordwrap.vb
index 7bf92ad9369..bbd8078145d 100644
--- a/instat/dlgWordwrap.vb
+++ b/instat/dlgWordwrap.vb
@@ -41,7 +41,6 @@ Public Class dlgWordwrap
Dim dctInputSeparator As New Dictionary(Of String, String)
ucrBase.iHelpTopicID = 343
- ucrBase.clsRsyntax.bUseBaseFunction = True
'ucrReceiver
ucrReceiverWrapText.SetParameter(New RParameter("column_data", 2))
diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb
index 123b0175b38..ecf06650717 100644
--- a/instat/frmMain.Designer.vb
+++ b/instat/frmMain.Designer.vb
@@ -2193,7 +2193,6 @@ Partial Class frmMain
'
'mnuClimaticDescribeClimograph
'
- Me.mnuClimaticDescribeClimograph.Enabled = False
Me.mnuClimaticDescribeClimograph.Name = "mnuClimaticDescribeClimograph"
Me.mnuClimaticDescribeClimograph.Size = New System.Drawing.Size(211, 22)
Me.mnuClimaticDescribeClimograph.Text = "Climograph..."
diff --git a/instat/sdgSimpleRegOptions.vb b/instat/sdgSimpleRegOptions.vb
index 8d394f27537..80940c110e5 100644
--- a/instat/sdgSimpleRegOptions.vb
+++ b/instat/sdgSimpleRegOptions.vb
@@ -230,7 +230,7 @@ Public Class sdgSimpleRegOptions
Dim clsTempParam As RParameter
Dim lstPlots As New List(Of Integer)
- For Each clsRCode As RCodeStructure In clsRSyntax.lstAfterCodes
+ For Each clsRCode As RCodeStructure In clsRSyntax.GetAfterCodes()
clsTempFunc = TryCast(clsRCode, RFunction)
If clsTempFunc IsNot Nothing AndAlso clsTempFunc.strRCommand = "plot" AndAlso clsTempFunc.ContainsParameter("which") Then
clsTempParam = clsTempFunc.GetParameter("which")
diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R
index fd19d0d0f00..a8110495aad 100644
--- a/instat/static/InstatObject/R/instat_object_R6.R
+++ b/instat/static/InstatObject/R/instat_object_R6.R
@@ -652,7 +652,7 @@ DataBook$set("public", "get_object_data", function(data_name = NULL, object_name
}
return(out)
}
-)
+)
#returns object data from the object_names character vector
DataBook$set("public", "get_objects_data", function(data_name = NULL, object_names = NULL, as_files = FALSE) {
diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R
index 904794d2d2c..ef38345ed0c 100644
--- a/instat/static/InstatObject/R/stand_alone_functions.R
+++ b/instat/static/InstatObject/R/stand_alone_functions.R
@@ -1,5 +1,6 @@
get_default_significant_figures <- function(data) {
- if(is.numeric(data)) return(3)
+ default_digits <- getOption("digits")
+ if(is.numeric(data) || is.complex(data)) return(default_digits)
else return(NA)
}
@@ -2634,7 +2635,7 @@ view_object_data <- function(object, object_format = NULL) {
file_name <- view_text_object(object)
} else if (identical(object_format, "html")) {
file_name <- view_html_object(object)
- }else{
+ } else{
print(object)
}
return(file_name)
@@ -2730,11 +2731,28 @@ view_text_object <- function(text_object){
}
+view_html_object <- function(html_object) {
+ # Check if html_object is a list and has more than one element
+ if (is.list(html_object) && all(sapply(html_object, class) == class(html_object[[1]]))) {
+ file_names <- vector("list", length(html_object))
+ for (i in seq_along(html_object)) {
+ # If html_object is a list with multiple elements of the same class,
+ # use a for loop to process each element
+ file_names[[i]] <- process_html_object(html_object[[i]])
+ }
+ return(file_names)
+ }
+
+ # Process the html_object
+ return(process_html_object(html_object))
+}
+
+#Function to process individual HTML object
#displays the html object in the set R "viewer".
#if the viewer is not available then
#it saves the object as a file in the temporary folder
#and returns the file path.
-view_html_object <- function(html_object){
+process_html_object <- function(html_object) {
#if there is a viewer, like in the case of RStudio then just print the object
#this check is primarily meant to make this function work in a similar manner when run outside R-Instat
r_viewer <- base::getOption("viewer")
@@ -2745,14 +2763,13 @@ view_html_object <- function(html_object){
return(html_object)
}
+ # Get a unique temporary file name from the tempdir path
+ file_name <- tempfile(pattern = "viewhtml", fileext = ".html")
- file_name <- ""
- #get a vector of available class names
+ # Get a vector of available class names
object_class_names <- class(html_object)
- #get a unique temporary file name from the tempdir path
- file_name <- tempfile(pattern = "viewhtml", fileext = ".html")
- #save the object as a html file depending on the object type
+ # Save the object as an HTML file depending on the object type
if ("htmlwidget" %in% object_class_names) {
#Note. When selfcontained is set to True
#a "Saving a widget with selfcontained = TRUE requires pandoc" error is thrown in R-Instat
@@ -2768,12 +2785,14 @@ view_html_object <- function(html_object){
} else if ("gt_tbl" %in% object_class_names) {
#"gt table" objects are not compatible with "htmlwidgets" package. So they have to be saved differently.
#"mmtable2" package produces "gt_tbl" objects
- gt::gtsave(html_object,filename = file_name)
+ gt::gtsave(html_object, filename = file_name)
}
message("R viewer not detected. File saved in location ", file_name)
return(file_name)
-}
+}
+
+
#tries to recordPlot if graph_object = NULL, then returns graph object of class "recordedplot".
#applicable to base graphs only
@@ -3047,4 +3066,269 @@ write_weather_data <- function(year, month, day, rain, mn_tmp, mx_tmp, missing_c
write.table(weather_data, file = output_file, sep = "\t", row.names = FALSE, col.names = TRUE, quote = FALSE)
cat("Weather data has been written to", output_file, "\n")
-}
\ No newline at end of file
+}
+
+prepare_walter_lieth <- function(data, month, tm_min, ta_min){
+ dat_long_int <- NULL
+ for (j in seq(nrow(data) - 1)) {
+ intres <- NULL
+ for (i in seq_len(ncol(data))) {
+ if (is.character(data[j, i]) | is.factor(data[j, i])) {
+ val <- as.data.frame(data[j, i])
+ }
+ else {
+ interpol <- approx(x = data[c(j, j + 1), "indrow"],
+ y = data[c(j, j + 1), i],
+ n = 50)
+ val <- as.data.frame(interpol$y)
+ }
+ names(val) <- names(data)[i]
+ intres <- dplyr::bind_cols(intres, val)
+ }
+ dat_long_int <- dplyr::bind_rows(dat_long_int, intres)
+ }
+ dat_long_int$interpolate <- TRUE
+ dat_long_int[[month]] <- ""
+ data$interpolate <- FALSE
+ dat_long_int <- dat_long_int[!dat_long_int$indrow %in% data$indrow, ]
+ dat_long_end <- dplyr::bind_rows(data, dat_long_int)
+ dat_long_end <- dat_long_end[order(dat_long_end$indrow), ]
+ dat_long_end <- dat_long_end[dat_long_end$indrow >= 0 & dat_long_end$indrow <= 12, ]
+ dat_long_end <- tibble::as_tibble(dat_long_end)
+
+ getpolymax <- function(x, y, y_lim) {
+ initpoly <- FALSE
+ yres <- NULL
+ xres <- NULL
+ for (i in seq_len(length(y))) {
+ lastobs <- i == length(x)
+ if (y[i] > y_lim[i]) {
+ if (isFALSE(initpoly)) {
+ xres <- c(xres, x[i])
+ yres <- c(yres, y_lim[i])
+ initpoly <- TRUE
+ }
+ xres <- c(xres, x[i])
+ yres <- c(yres, y[i])
+ if (lastobs) {
+ xres <- c(xres, x[i], NA)
+ yres <- c(yres, y_lim[i], NA)
+ }
+ }
+ else {
+ if (initpoly) {
+ xres <- c(xres, x[i - 1], NA)
+ yres <- c(yres, y_lim[i - 1], NA)
+ initpoly <- FALSE
+ }
+ }
+ }
+ poly <- tibble::tibble(x = xres, y = yres)
+ return(poly)
+ }
+ getlines <- function(x, y, y_lim) {
+ yres <- NULL
+ xres <- NULL
+ ylim_res <- NULL
+ for (i in seq_len(length(y))) {
+ if (y[i] > y_lim[i]) {
+ xres <- c(xres, x[i])
+ yres <- c(yres, y[i])
+ ylim_res <- c(ylim_res, y_lim[i])
+ }
+ }
+ line <- tibble::tibble(x = xres, y = yres, ylim_res = ylim_res)
+ return(line)
+ }
+ prep_max_poly <- getpolymax(x = dat_long_end$indrow, y = pmax(dat_long_end$pm_reesc,
+ 50), y_lim = rep(50, length(dat_long_end$indrow)))
+ tm_max_line <- getlines(x = dat_long_end$indrow, y = dat_long_end$tm,
+ y_lim = dat_long_end$pm_reesc)
+ pm_max_line <- getlines(x = dat_long_end$indrow, y = pmin(dat_long_end$pm_reesc,
+ 50), y_lim = dat_long_end$tm)
+ dat_real <- dat_long_end[dat_long_end$interpolate == FALSE,
+ c("indrow", ta_min)]
+ x <- NULL
+ y <- NULL
+ for (i in seq_len(nrow(dat_real))) {
+ if (dat_real[i, ][[ta_min]] < 0) {
+ x <- c(x, NA, rep(dat_real[i, ]$indrow - 0.5, 2),
+ rep(dat_real[i, ]$indrow + 0.5, 2), NA)
+ y <- c(y, NA, -3, 0, 0, -3, NA)
+ }
+ else {
+ x <- c(x, NA)
+ y <- c(y, NA)
+ }
+ }
+ probfreeze <- tibble::tibble(x = x, y = y)
+ rm(dat_real)
+ dat_real <- dat_long_end[dat_long_end$interpolate == FALSE,
+ c("indrow", tm_min)]
+ x <- NULL
+ y <- NULL
+ for (i in seq_len(nrow(dat_real))) {
+ if (dat_real[i, ][[tm_min]] < 0) {
+ x <- c(x, NA, rep(dat_real[i, ]$indrow - 0.5, 2),
+ rep(dat_real[i, ]$indrow + 0.5, 2), NA)
+ y <- c(y, NA, -3, 0, 0, -3, NA)
+ }
+ else {
+ x <- c(x, NA)
+ y <- c(y, NA)
+ }
+ }
+ surefreeze <- tibble::tibble(x = x, y = y)
+ return_list <- list(dat_long_end,
+ tm_max_line,
+ pm_max_line,
+ prep_max_poly,
+ probfreeze,
+ surefreeze)
+ names(return_list) <- c("dat_long_end", "tm_max_line", "pm_max_line",
+ "prep_max_poly", "prob_freeze", "surefreeze")
+ return(return_list)
+}
+ggwalter_lieth <- function (data, month, station = NULL, p_mes, tm_max, tm_min, ta_min, station_name = "",
+ alt = NA, per = NA, pcol = "#002F70",
+ tcol = "#ff0000", pfcol = "#9BAEE2", sfcol = "#3C6FC4",
+ shem = FALSE, p3line = FALSE, ...)
+ {
+
+ # Preprocess data with vectorised operations
+ data <- data %>%
+ dplyr::mutate(tm = (.data[[tm_max]] + .data[[tm_min]]) / 2,
+ pm_reesc = dplyr::if_else(.data[[p_mes]] < 100, .data[[p_mes]] * 0.5, .data[[p_mes]] * 0.05 + 45),
+ p3line = .data[[p_mes]] / 3) %>%
+ dplyr::mutate(across(.data[[month]], ~ forcats::fct_expand(.data[[month]], ""))) %>%
+ dplyr::arrange(.data[[month]])
+ # do this for each station, if we have a station
+ if (!is.null(station)){
+ data <- data %>% group_by(!!sym(station))
+ }
+ data <- data %>%
+ group_modify(~{
+ # Add dummy rows at the beginning and end for each group
+ .x <- bind_rows(.x[nrow(.x), , drop = FALSE], .x, .x[1, , drop = FALSE])
+ # Clear month value for the dummy rows
+ .x[c(1, nrow(.x)), which(names(.x) == data[[month]])] <- ""
+ # Add an index column for plotting or further transformations
+ .x <- cbind(indrow = seq(-0.5, 12.5, 1), .x)
+ .x
+ })
+
+ if (!is.null(station)){
+ data <- data %>% ungroup()
+ }
+ data <- data.frame(data)
+
+ # split by station
+ if (is.null(station)){
+ data_list <- prepare_walter_lieth(data, month, tm_min, ta_min)
+ # data things
+ dat_long_end <- data_list$dat_long_end
+ tm_max_line <- data_list$tm_max_line
+ pm_max_line <- data_list$pm_max_line
+ prep_max_poly <- data_list$prep_max_poly
+ probfreeze <- data_list$prob_freeze
+ surefreeze <- data_list$surefreeze
+ } else {
+ results <-
+ map(.x = unique(data[[station]]),
+ .f = ~{filtered_data <- data %>% filter(!!sym(station) == .x)
+ prepare_walter_lieth(filtered_data, month, tm_min, ta_min)})
+ # Function to bind rows for a specific sub-element across all main elements
+ n <- length(results)
+ m <- length(results[[1]])
+ station_name <- unique(data[[station]])
+ binds <- NULL
+ combined <- NULL
+ for (j in 1:m){
+ for (i in 1:n) { # for each station data set
+ binds[[i]] <- results[[i]][[j]] %>% mutate(!!sym(station) := station_name[i])
+ }
+ combined[[j]] <- do.call(rbind, binds) # Combine all the sub-elements row-wise
+ }
+ # data things
+ dat_long_end <- combined[[1]]
+ tm_max_line <- combined[[2]]
+ pm_max_line <- combined[[3]]
+ prep_max_poly <- combined[[4]]
+ probfreeze <- combined[[5]]
+ surefreeze <- combined[[6]]
+ }
+
+ # data frame pretty things ------------------------------------------------------
+ ticks <- data.frame(x = seq(0, 12), ymin = -3, ymax = 0)
+ month_breaks <- dat_long_end[dat_long_end[[month]] != "", ]$indrow
+ month_labs <- dat_long_end[dat_long_end[[month]] != "", ][[month]]
+
+ ymax <- max(60, 10 * floor(max(dat_long_end$pm_reesc)/10) + 10)
+ ymin <- min(-3, min(dat_long_end$tm))
+ range_tm <- seq(0, ymax, 10)
+ if (ymin < -3) {
+ ymin <- floor(ymin/10) * 10
+ range_tm <- seq(ymin, ymax, 10)
+ }
+ templabs <- paste0(range_tm)
+ templabs[range_tm > 50] <- ""
+ range_prec <- range_tm * 2
+ range_prec[range_tm > 50] <- range_tm[range_tm > 50] * 20 - 900
+ preclabs <- paste0(range_prec)
+ preclabs[range_tm < 0] <- ""
+
+ wandlplot <- ggplot2::ggplot() + ggplot2::geom_line(data = dat_long_end,
+ aes(x = .data$indrow, y = .data$pm_reesc), color = pcol) +
+ ggplot2::geom_line(data = dat_long_end, aes(x = .data$indrow,
+ y = .data$tm), color = tcol)
+ if (nrow(tm_max_line > 0)) {
+ wandlplot <- wandlplot + ggplot2::geom_segment(aes(x = .data$x,
+ y = .data$ylim_res, xend = .data$x, yend = .data$y),
+ data = tm_max_line, color = tcol, alpha = 0.2)
+ }
+ if (nrow(pm_max_line > 0)) {
+ wandlplot <- wandlplot + ggplot2::geom_segment(aes(x = .data$x,
+ y = .data$ylim_res, xend = .data$x, yend = .data$y),
+ data = pm_max_line, color = pcol, alpha = 0.2)
+ }
+ if (p3line) {
+ wandlplot <- wandlplot + ggplot2::geom_line(data = dat_long_end,
+ aes(x = .data$indrow, y = .data$p3line), color = pcol)
+ }
+ if (max(dat_long_end$pm_reesc) > 50) {
+ wandlplot <- wandlplot + ggplot2::geom_polygon(data = prep_max_poly, aes(x, y),
+ fill = pcol)
+ }
+ if (min(dat_long_end[[ta_min]]) < 0) {
+ wandlplot <- wandlplot + ggplot2::geom_polygon(data = probfreeze, aes(x = x, y = y),
+ fill = pfcol, colour = "black")
+ }
+ if (min(dat_long_end[[tm_min]]) < 0) {
+ wandlplot <- wandlplot + geom_polygon(data = surefreeze, aes(x = x, y = y),
+ fill = sfcol, colour = "black")
+ }
+ wandlplot <- wandlplot + geom_hline(yintercept = c(0, 50),
+ linewidth = 0.5) +
+ geom_segment(data = ticks, aes(x = x, xend = x, y = ymin, yend = ymax)) +
+ scale_x_continuous(breaks = month_breaks, name = "", labels = month_labs, expand = c(0, 0)) +
+ scale_y_continuous("C", limits = c(ymin, ymax), labels = templabs,
+ breaks = range_tm, sec.axis = dup_axis(name = "mm", labels = preclabs))
+ wandlplot <- wandlplot +
+ ggplot2::theme_classic() +
+ ggplot2::theme(axis.line.x.bottom = element_blank(),
+ axis.title.y.left = element_text(angle = 0,
+ vjust = 0.9, size = 10, colour = tcol,
+ margin = unit(rep(10, 4), "pt")),
+ axis.text.x.bottom = element_text(size = 10),
+ axis.text.y.left = element_text(colour = tcol, size = 10),
+ axis.title.y.right = element_text(angle = 0, vjust = 0.9,
+ size = 10, colour = pcol,
+ margin = unit(rep(10, 4), "pt")),
+ axis.text.y.right = element_text(colour = pcol, size = 10))
+
+ if (!is.null(station)){
+ wandlplot <- wandlplot + facet_wrap(station)
+ }
+
+ return(wandlplot)
+}
diff --git a/instat/ucrButtons.vb b/instat/ucrButtons.vb
index 6ef25d4ec1c..9406a8b3535 100644
--- a/instat/ucrButtons.vb
+++ b/instat/ucrButtons.vb
@@ -144,9 +144,9 @@ Public Class ucrButtons
clsRsyntax.GetAllAssignTo(lstAssignToCodes, lstAssignToStrings)
'Run additional before codes
- lstBeforeScripts = clsRsyntax.GetBeforeCodesScripts()
lstBeforeCodes = clsRsyntax.GetBeforeCodes()
- For i As Integer = 0 To clsRsyntax.lstBeforeCodes.Count - 1
+ lstBeforeScripts = clsRsyntax.GetScriptsFromCodeList(lstBeforeCodes)
+ For i As Integer = 0 To lstBeforeCodes.Count - 1
If bFirstCode Then
strComment = strComments
bFirstCode = False
@@ -173,13 +173,9 @@ Public Class ucrButtons
frmMain.AddToScriptWindow(clsRsyntax.GetScript(), bMakeVisible:=bMakeVisibleScriptWindow, bAppendAtCurrentCursorPosition:=bAppendScriptsAtCurrentScriptWindowCursorPosition)
End If
- 'This clears the script after it has been run, but leave the function and parameters in the base function
- 'so that it can be run exactly the same when reopened.
- clsRsyntax.strScript = ""
-
'Run additional after codes
- lstAfterScripts = clsRsyntax.GetAfterCodesScripts()
lstAfterCodes = clsRsyntax.GetAfterCodes()
+ lstAfterScripts = clsRsyntax.GetScriptsFromCodeList(lstAfterCodes)
For i As Integer = 0 To lstAfterCodes.Count - 1
If bRun Then
If bFirstCode Then
diff --git a/instat/ucrCalculator.Designer.vb b/instat/ucrCalculator.Designer.vb
index 9bca27aa0ba..f52022d6196 100644
--- a/instat/ucrCalculator.Designer.vb
+++ b/instat/ucrCalculator.Designer.vb
@@ -62,10 +62,11 @@ Partial Class ucrCalculator
Me.cmd0 = New System.Windows.Forms.Button()
Me.cmd1 = New System.Windows.Forms.Button()
Me.grpDates = New System.Windows.Forms.GroupBox()
- Me.cmdRHelp = New instat.ucrSplitButton()
- Me.ContextMenuStripDate = New System.Windows.Forms.ContextMenuStrip(Me.components)
- Me.DateLubridateToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
- Me.DateHmsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
+ Me.cmdYmdHms = New System.Windows.Forms.Button()
+ Me.cmdYmdHm = New System.Windows.Forms.Button()
+ Me.cmdAsDate = New System.Windows.Forms.Button()
+ Me.cmdAsTime = New System.Windows.Forms.Button()
+ Me.cmdYmdH = New System.Windows.Forms.Button()
Me.cmdPm = New System.Windows.Forms.Button()
Me.cmdTime = New System.Windows.Forms.Button()
Me.cmdDateTime = New System.Windows.Forms.Button()
@@ -74,7 +75,7 @@ Partial Class ucrCalculator
Me.cmdAm = New System.Windows.Forms.Button()
Me.cmdSec = New System.Windows.Forms.Button()
Me.cmdHour = New System.Windows.Forms.Button()
- Me.cmdminutes = New System.Windows.Forms.Button()
+ Me.cmdMinutes = New System.Windows.Forms.Button()
Me.cmdDmy = New System.Windows.Forms.Button()
Me.cmdDay = New System.Windows.Forms.Button()
Me.cmdMonth = New System.Windows.Forms.Button()
@@ -85,6 +86,10 @@ Partial Class ucrCalculator
Me.cmdMdy = New System.Windows.Forms.Button()
Me.cmdYmd = New System.Windows.Forms.Button()
Me.cmdLeap = New System.Windows.Forms.Button()
+ Me.cmdRHelp = New instat.ucrSplitButton()
+ Me.ContextMenuStripDate = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.DateLubridateToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
+ Me.DateHmsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ContextMenuStripComplex = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ComplexBaseToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.grpInteger = New System.Windows.Forms.GroupBox()
@@ -191,15 +196,15 @@ Partial Class ucrCalculator
Me.cmdCp = New System.Windows.Forms.Button()
Me.cmdBr2 = New System.Windows.Forms.Button()
Me.grpWakefield = New System.Windows.Forms.GroupBox()
- Me.cmdLinkert7 = New System.Windows.Forms.Button()
+ Me.cmdLikert7 = New System.Windows.Forms.Button()
Me.cmdWakefield_Year = New System.Windows.Forms.Button()
Me.cmdValid = New System.Windows.Forms.Button()
- Me.cmdWakefield_Upper = New System.Windows.Forms.Button()
+ Me.cmdWakefieldUpper = New System.Windows.Forms.Button()
Me.cmdString = New System.Windows.Forms.Button()
Me.cmdState = New System.Windows.Forms.Button()
Me.cmdSpeed = New System.Windows.Forms.Button()
Me.cmdSmokes = New System.Windows.Forms.Button()
- Me.cmdSex = New System.Windows.Forms.Button()
+ Me.cmdWakefieldTimes = New System.Windows.Forms.Button()
Me.cmdSex_Inclusive = New System.Windows.Forms.Button()
Me.cmdGender = New System.Windows.Forms.Button()
Me.cmdSentence = New System.Windows.Forms.Button()
@@ -215,9 +220,9 @@ Partial Class ucrCalculator
Me.cmdLorem_ipsum = New System.Windows.Forms.Button()
Me.cmdLikert = New System.Windows.Forms.Button()
Me.cmdGpa = New System.Windows.Forms.Button()
- Me.cmdEla = New System.Windows.Forms.Button()
+ Me.cmdWakefieldMinute = New System.Windows.Forms.Button()
Me.cmdMath = New System.Windows.Forms.Button()
- Me.cmdLevel = New System.Windows.Forms.Button()
+ Me.cmdWakefieldLower = New System.Windows.Forms.Button()
Me.cmdLanguage = New System.Windows.Forms.Button()
Me.cmdIq = New System.Windows.Forms.Button()
Me.cmdInternet_Browser = New System.Windows.Forms.Button()
@@ -229,9 +234,9 @@ Partial Class ucrCalculator
Me.cmdDob = New System.Windows.Forms.Button()
Me.cmdDna = New System.Windows.Forms.Button()
Me.cmdDice = New System.Windows.Forms.Button()
- Me.cmdDied = New System.Windows.Forms.Button()
+ Me.cmdGrade_Letter = New System.Windows.Forms.Button()
Me.cmdDeath = New System.Windows.Forms.Button()
- Me.cmdDate_Stamp = New System.Windows.Forms.Button()
+ Me.cmdWakefieldDates = New System.Windows.Forms.Button()
Me.cmdPrimary = New System.Windows.Forms.Button()
Me.cmdColor = New System.Windows.Forms.Button()
Me.cmdCoin = New System.Windows.Forms.Button()
@@ -289,22 +294,6 @@ Partial Class ucrCalculator
Me.E1071ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.RobustbaseToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.RasterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
- Me.grpFrequencies = New System.Windows.Forms.GroupBox()
- Me.cmdFreqQuantile = New System.Windows.Forms.Button()
- Me.cmdFreqPropn = New System.Windows.Forms.Button()
- Me.cmdFreqDistinct = New System.Windows.Forms.Button()
- Me.cmdFreqIQR = New System.Windows.Forms.Button()
- Me.cmdFreqMedian = New System.Windows.Forms.Button()
- Me.cmdFreqSd = New System.Windows.Forms.Button()
- Me.cmdFreqVar = New System.Windows.Forms.Button()
- Me.cmdFreqMean = New System.Windows.Forms.Button()
- Me.cmdFreqMad = New System.Windows.Forms.Button()
- Me.cmdFreqMiss = New System.Windows.Forms.Button()
- Me.cmdFreqMode1 = New System.Windows.Forms.Button()
- Me.cmdFreqMax = New System.Windows.Forms.Button()
- Me.cmdFreqMin = New System.Windows.Forms.Button()
- Me.cmdFreqSum = New System.Windows.Forms.Button()
- Me.cmdFreqLength = New System.Windows.Forms.Button()
Me.cmdKurtosis = New System.Windows.Forms.Button()
Me.cmdMode1 = New System.Windows.Forms.Button()
Me.cmdMode = New System.Windows.Forms.Button()
@@ -333,6 +322,22 @@ Partial Class ucrCalculator
Me.cmdLength = New System.Windows.Forms.Button()
Me.cmdSum = New System.Windows.Forms.Button()
Me.cmdVar = New System.Windows.Forms.Button()
+ Me.grpFrequencies = New System.Windows.Forms.GroupBox()
+ Me.cmdFreqQuantile = New System.Windows.Forms.Button()
+ Me.cmdFreqPropn = New System.Windows.Forms.Button()
+ Me.cmdFreqDistinct = New System.Windows.Forms.Button()
+ Me.cmdFreqIQR = New System.Windows.Forms.Button()
+ Me.cmdFreqMedian = New System.Windows.Forms.Button()
+ Me.cmdFreqSd = New System.Windows.Forms.Button()
+ Me.cmdFreqVar = New System.Windows.Forms.Button()
+ Me.cmdFreqMean = New System.Windows.Forms.Button()
+ Me.cmdFreqMad = New System.Windows.Forms.Button()
+ Me.cmdFreqMiss = New System.Windows.Forms.Button()
+ Me.cmdFreqMode1 = New System.Windows.Forms.Button()
+ Me.cmdFreqMax = New System.Windows.Forms.Button()
+ Me.cmdFreqMin = New System.Windows.Forms.Button()
+ Me.cmdFreqSum = New System.Windows.Forms.Button()
+ Me.cmdFreqLength = New System.Windows.Forms.Button()
Me.grpProbabilty = New System.Windows.Forms.GroupBox()
Me.cmdPascal = New System.Windows.Forms.Button()
Me.cmdProbRHelp = New instat.ucrSplitButton()
@@ -524,6 +529,9 @@ Partial Class ucrCalculator
Me.cmdbegin = New System.Windows.Forms.Button()
Me.cmdAny1 = New System.Windows.Forms.Button()
Me.grpComplex = New System.Windows.Forms.GroupBox()
+ Me.cmdComplexAsin = New System.Windows.Forms.Button()
+ Me.cmdComplexAtan = New System.Windows.Forms.Button()
+ Me.cmdComplexAcos = New System.Windows.Forms.Button()
Me.cmdAsComplex = New System.Windows.Forms.Button()
Me.cmdComplexi = New System.Windows.Forms.Button()
Me.cmdComplexRHelp = New instat.ucrSplitButton()
@@ -925,7 +933,11 @@ Partial Class ucrCalculator
'
'grpDates
'
- Me.grpDates.Controls.Add(Me.cmdRHelp)
+ Me.grpDates.Controls.Add(Me.cmdYmdHms)
+ Me.grpDates.Controls.Add(Me.cmdYmdHm)
+ Me.grpDates.Controls.Add(Me.cmdAsDate)
+ Me.grpDates.Controls.Add(Me.cmdAsTime)
+ Me.grpDates.Controls.Add(Me.cmdYmdH)
Me.grpDates.Controls.Add(Me.cmdPm)
Me.grpDates.Controls.Add(Me.cmdTime)
Me.grpDates.Controls.Add(Me.cmdDateTime)
@@ -934,7 +946,7 @@ Partial Class ucrCalculator
Me.grpDates.Controls.Add(Me.cmdAm)
Me.grpDates.Controls.Add(Me.cmdSec)
Me.grpDates.Controls.Add(Me.cmdHour)
- Me.grpDates.Controls.Add(Me.cmdminutes)
+ Me.grpDates.Controls.Add(Me.cmdMinutes)
Me.grpDates.Controls.Add(Me.cmdDmy)
Me.grpDates.Controls.Add(Me.cmdDay)
Me.grpDates.Controls.Add(Me.cmdMonth)
@@ -945,145 +957,165 @@ Partial Class ucrCalculator
Me.grpDates.Controls.Add(Me.cmdMdy)
Me.grpDates.Controls.Add(Me.cmdYmd)
Me.grpDates.Controls.Add(Me.cmdLeap)
+ Me.grpDates.Controls.Add(Me.cmdRHelp)
Me.grpDates.Location = New System.Drawing.Point(542, 78)
Me.grpDates.Name = "grpDates"
Me.grpDates.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.grpDates.Size = New System.Drawing.Size(305, 205)
+ Me.grpDates.Size = New System.Drawing.Size(315, 291)
Me.grpDates.TabIndex = 188
Me.grpDates.TabStop = False
Me.grpDates.Text = "Dates/Times"
'
- 'cmdRHelp
- '
- Me.cmdRHelp.AutoSize = True
- Me.cmdRHelp.ContextMenuStrip = Me.ContextMenuStripDate
- Me.cmdRHelp.Location = New System.Drawing.Point(186, 164)
- Me.cmdRHelp.Name = "cmdRHelp"
- Me.cmdRHelp.Size = New System.Drawing.Size(113, 38)
- Me.cmdRHelp.SplitMenuStrip = Me.ContextMenuStripDate
- Me.cmdRHelp.TabIndex = 212
- Me.cmdRHelp.Text = "R Help"
- Me.cmdRHelp.UseVisualStyleBackColor = True
- '
- 'ContextMenuStripDate
- '
- Me.ContextMenuStripDate.ImageScalingSize = New System.Drawing.Size(24, 24)
- Me.ContextMenuStripDate.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateLubridateToolStripMenuItem, Me.DateHmsToolStripMenuItem})
- Me.ContextMenuStripDate.Name = "ContextMenuStrip1"
- Me.ContextMenuStripDate.Size = New System.Drawing.Size(139, 52)
- '
- 'DateLubridateToolStripMenuItem
- '
- Me.DateLubridateToolStripMenuItem.Name = "DateLubridateToolStripMenuItem"
- Me.DateLubridateToolStripMenuItem.Size = New System.Drawing.Size(138, 24)
- Me.DateLubridateToolStripMenuItem.Text = "lubridate"
- '
- 'DateHmsToolStripMenuItem
- '
- Me.DateHmsToolStripMenuItem.Name = "DateHmsToolStripMenuItem"
- Me.DateHmsToolStripMenuItem.Size = New System.Drawing.Size(138, 24)
- Me.DateHmsToolStripMenuItem.Text = "hms"
+ 'cmdYmdHms
+ '
+ Me.cmdYmdHms.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdYmdHms.Location = New System.Drawing.Point(6, 91)
+ Me.cmdYmdHms.Name = "cmdYmdHms"
+ Me.cmdYmdHms.Size = New System.Drawing.Size(75, 38)
+ Me.cmdYmdHms.TabIndex = 242
+ Me.cmdYmdHms.Text = "ymd.hms"
+ Me.cmdYmdHms.UseVisualStyleBackColor = True
+ '
+ 'cmdYmdHm
+ '
+ Me.cmdYmdHm.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdYmdHm.Location = New System.Drawing.Point(80, 91)
+ Me.cmdYmdHm.Name = "cmdYmdHm"
+ Me.cmdYmdHm.Size = New System.Drawing.Size(75, 38)
+ Me.cmdYmdHm.TabIndex = 241
+ Me.cmdYmdHm.Text = "ymd.hm"
+ Me.cmdYmdHm.UseVisualStyleBackColor = True
+ '
+ 'cmdAsDate
+ '
+ Me.cmdAsDate.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdAsDate.Location = New System.Drawing.Point(80, 19)
+ Me.cmdAsDate.Name = "cmdAsDate"
+ Me.cmdAsDate.Size = New System.Drawing.Size(75, 38)
+ Me.cmdAsDate.TabIndex = 240
+ Me.cmdAsDate.Text = "as.date"
+ Me.cmdAsDate.UseVisualStyleBackColor = True
+ '
+ 'cmdAsTime
+ '
+ Me.cmdAsTime.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdAsTime.Location = New System.Drawing.Point(239, 55)
+ Me.cmdAsTime.Name = "cmdAsTime"
+ Me.cmdAsTime.Size = New System.Drawing.Size(75, 38)
+ Me.cmdAsTime.TabIndex = 239
+ Me.cmdAsTime.Text = "as.time"
+ Me.cmdAsTime.UseVisualStyleBackColor = True
+ '
+ 'cmdYmdH
+ '
+ Me.cmdYmdH.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdYmdH.Location = New System.Drawing.Point(154, 91)
+ Me.cmdYmdH.Name = "cmdYmdH"
+ Me.cmdYmdH.Size = New System.Drawing.Size(86, 38)
+ Me.cmdYmdH.TabIndex = 238
+ Me.cmdYmdH.Text = "ymd.h"
+ Me.cmdYmdH.UseVisualStyleBackColor = True
'
'cmdPm
'
Me.cmdPm.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdPm.Location = New System.Drawing.Point(5, 162)
+ Me.cmdPm.Location = New System.Drawing.Point(6, 200)
Me.cmdPm.Name = "cmdPm"
Me.cmdPm.Size = New System.Drawing.Size(75, 38)
- Me.cmdPm.TabIndex = 161
+ Me.cmdPm.TabIndex = 237
Me.cmdPm.Text = "pm"
Me.cmdPm.UseVisualStyleBackColor = True
'
'cmdTime
'
Me.cmdTime.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdTime.Location = New System.Drawing.Point(152, 18)
+ Me.cmdTime.Location = New System.Drawing.Point(239, 19)
Me.cmdTime.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdTime.Name = "cmdTime"
Me.cmdTime.Size = New System.Drawing.Size(75, 38)
- Me.cmdTime.TabIndex = 160
+ Me.cmdTime.TabIndex = 236
Me.cmdTime.Text = "time"
Me.cmdTime.UseVisualStyleBackColor = True
'
'cmdDateTime
'
Me.cmdDateTime.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdDateTime.Location = New System.Drawing.Point(78, 18)
+ Me.cmdDateTime.Location = New System.Drawing.Point(154, 19)
Me.cmdDateTime.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdDateTime.Name = "cmdDateTime"
- Me.cmdDateTime.Size = New System.Drawing.Size(75, 38)
- Me.cmdDateTime.TabIndex = 159
- Me.cmdDateTime.Text = "datetime"
+ Me.cmdDateTime.Size = New System.Drawing.Size(86, 38)
+ Me.cmdDateTime.TabIndex = 235
+ Me.cmdDateTime.Text = "as.datetime"
Me.cmdDateTime.UseVisualStyleBackColor = True
'
'cmdQuarter
'
Me.cmdQuarter.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdQuarter.Location = New System.Drawing.Point(78, 162)
+ Me.cmdQuarter.Location = New System.Drawing.Point(80, 127)
Me.cmdQuarter.Name = "cmdQuarter"
Me.cmdQuarter.Size = New System.Drawing.Size(75, 38)
- Me.cmdQuarter.TabIndex = 157
+ Me.cmdQuarter.TabIndex = 234
Me.cmdQuarter.Text = "quarter"
Me.cmdQuarter.UseVisualStyleBackColor = True
'
'cmdD_In_M
'
Me.cmdD_In_M.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdD_In_M.Location = New System.Drawing.Point(78, 53)
+ Me.cmdD_In_M.Location = New System.Drawing.Point(154, 164)
Me.cmdD_In_M.Name = "cmdD_In_M"
- Me.cmdD_In_M.Size = New System.Drawing.Size(75, 38)
- Me.cmdD_In_M.TabIndex = 156
+ Me.cmdD_In_M.Size = New System.Drawing.Size(86, 38)
+ Me.cmdD_In_M.TabIndex = 233
Me.cmdD_In_M.Text = "d_in_m"
Me.cmdD_In_M.UseVisualStyleBackColor = True
'
'cmdAm
'
Me.cmdAm.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdAm.Location = New System.Drawing.Point(227, 127)
+ Me.cmdAm.Location = New System.Drawing.Point(239, 164)
Me.cmdAm.Name = "cmdAm"
Me.cmdAm.Size = New System.Drawing.Size(75, 38)
- Me.cmdAm.TabIndex = 155
+ Me.cmdAm.TabIndex = 232
Me.cmdAm.Text = "am"
Me.cmdAm.UseVisualStyleBackColor = True
'
'cmdSec
'
Me.cmdSec.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdSec.Location = New System.Drawing.Point(152, 127)
+ Me.cmdSec.Location = New System.Drawing.Point(239, 200)
Me.cmdSec.Name = "cmdSec"
Me.cmdSec.Size = New System.Drawing.Size(75, 38)
- Me.cmdSec.TabIndex = 154
+ Me.cmdSec.TabIndex = 231
Me.cmdSec.Text = "sec"
Me.cmdSec.UseVisualStyleBackColor = True
'
'cmdHour
'
Me.cmdHour.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdHour.Location = New System.Drawing.Point(5, 127)
+ Me.cmdHour.Location = New System.Drawing.Point(80, 200)
Me.cmdHour.Name = "cmdHour"
Me.cmdHour.Size = New System.Drawing.Size(75, 38)
- Me.cmdHour.TabIndex = 153
+ Me.cmdHour.TabIndex = 230
Me.cmdHour.Text = "hour"
Me.cmdHour.UseVisualStyleBackColor = True
'
- 'cmdminutes
+ 'cmdMinutes
'
- Me.cmdminutes.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdminutes.Location = New System.Drawing.Point(78, 127)
- Me.cmdminutes.Name = "cmdminutes"
- Me.cmdminutes.Size = New System.Drawing.Size(75, 38)
- Me.cmdminutes.TabIndex = 152
- Me.cmdminutes.Text = "min"
- Me.cmdminutes.UseVisualStyleBackColor = True
+ Me.cmdMinutes.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdMinutes.Location = New System.Drawing.Point(154, 200)
+ Me.cmdMinutes.Name = "cmdMinutes"
+ Me.cmdMinutes.Size = New System.Drawing.Size(86, 38)
+ Me.cmdMinutes.TabIndex = 229
+ Me.cmdMinutes.Text = "min"
+ Me.cmdMinutes.UseVisualStyleBackColor = True
'
'cmdDmy
'
Me.cmdDmy.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdDmy.Location = New System.Drawing.Point(78, 90)
+ Me.cmdDmy.Location = New System.Drawing.Point(80, 55)
Me.cmdDmy.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdDmy.Name = "cmdDmy"
Me.cmdDmy.Size = New System.Drawing.Size(75, 38)
- Me.cmdDmy.TabIndex = 151
+ Me.cmdDmy.TabIndex = 228
Me.cmdDmy.Tag = "dmy"
Me.cmdDmy.Text = "dmy"
Me.cmdDmy.UseVisualStyleBackColor = True
@@ -1091,103 +1123,134 @@ Partial Class ucrCalculator
'cmdDay
'
Me.cmdDay.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdDay.Location = New System.Drawing.Point(5, 53)
+ Me.cmdDay.Location = New System.Drawing.Point(239, 127)
Me.cmdDay.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdDay.Name = "cmdDay"
Me.cmdDay.Size = New System.Drawing.Size(75, 38)
- Me.cmdDay.TabIndex = 145
+ Me.cmdDay.TabIndex = 227
Me.cmdDay.Text = "day"
Me.cmdDay.UseVisualStyleBackColor = True
'
'cmdMonth
'
Me.cmdMonth.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdMonth.Location = New System.Drawing.Point(5, 53)
+ Me.cmdMonth.Location = New System.Drawing.Point(154, 127)
Me.cmdMonth.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdMonth.Name = "cmdMonth"
Me.cmdMonth.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.cmdMonth.Size = New System.Drawing.Size(75, 38)
- Me.cmdMonth.TabIndex = 144
+ Me.cmdMonth.Size = New System.Drawing.Size(86, 38)
+ Me.cmdMonth.TabIndex = 226
Me.cmdMonth.Text = "month"
Me.cmdMonth.UseVisualStyleBackColor = True
'
'cmdYear
'
Me.cmdYear.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdYear.Location = New System.Drawing.Point(227, 18)
+ Me.cmdYear.Location = New System.Drawing.Point(6, 127)
Me.cmdYear.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdYear.Name = "cmdYear"
Me.cmdYear.Size = New System.Drawing.Size(75, 38)
- Me.cmdYear.TabIndex = 143
+ Me.cmdYear.TabIndex = 225
Me.cmdYear.Text = "year"
Me.cmdYear.UseVisualStyleBackColor = True
'
'cmdDate
'
Me.cmdDate.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdDate.Location = New System.Drawing.Point(5, 18)
+ Me.cmdDate.Location = New System.Drawing.Point(6, 19)
Me.cmdDate.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdDate.Name = "cmdDate"
Me.cmdDate.Size = New System.Drawing.Size(75, 38)
- Me.cmdDate.TabIndex = 142
+ Me.cmdDate.TabIndex = 224
Me.cmdDate.Text = "date"
Me.cmdDate.UseVisualStyleBackColor = True
'
'cmdYday
'
Me.cmdYday.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdYday.Location = New System.Drawing.Point(227, 53)
+ Me.cmdYday.Location = New System.Drawing.Point(6, 164)
Me.cmdYday.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdYday.Name = "cmdYday"
Me.cmdYday.Size = New System.Drawing.Size(75, 38)
- Me.cmdYday.TabIndex = 141
+ Me.cmdYday.TabIndex = 223
Me.cmdYday.Text = "yday"
Me.cmdYday.UseVisualStyleBackColor = True
'
'cmdWday
'
Me.cmdWday.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdWday.Location = New System.Drawing.Point(152, 53)
+ Me.cmdWday.Location = New System.Drawing.Point(80, 164)
Me.cmdWday.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdWday.Name = "cmdWday"
Me.cmdWday.Size = New System.Drawing.Size(75, 38)
- Me.cmdWday.TabIndex = 140
+ Me.cmdWday.TabIndex = 222
Me.cmdWday.Text = "wday"
Me.cmdWday.UseVisualStyleBackColor = True
'
'cmdMdy
'
Me.cmdMdy.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdMdy.Location = New System.Drawing.Point(152, 90)
+ Me.cmdMdy.Location = New System.Drawing.Point(154, 55)
Me.cmdMdy.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdMdy.Name = "cmdMdy"
- Me.cmdMdy.Size = New System.Drawing.Size(75, 38)
- Me.cmdMdy.TabIndex = 139
+ Me.cmdMdy.Size = New System.Drawing.Size(86, 38)
+ Me.cmdMdy.TabIndex = 221
Me.cmdMdy.Text = "mdy"
Me.cmdMdy.UseVisualStyleBackColor = True
'
'cmdYmd
'
Me.cmdYmd.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdYmd.Location = New System.Drawing.Point(5, 90)
+ Me.cmdYmd.Location = New System.Drawing.Point(6, 55)
Me.cmdYmd.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdYmd.Name = "cmdYmd"
Me.cmdYmd.Size = New System.Drawing.Size(75, 38)
- Me.cmdYmd.TabIndex = 138
+ Me.cmdYmd.TabIndex = 220
Me.cmdYmd.Text = "ymd"
Me.cmdYmd.UseVisualStyleBackColor = True
'
'cmdLeap
'
Me.cmdLeap.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdLeap.Location = New System.Drawing.Point(227, 90)
+ Me.cmdLeap.Location = New System.Drawing.Point(239, 91)
Me.cmdLeap.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdLeap.Name = "cmdLeap"
Me.cmdLeap.Size = New System.Drawing.Size(75, 38)
- Me.cmdLeap.TabIndex = 136
+ Me.cmdLeap.TabIndex = 219
Me.cmdLeap.Text = "leap"
Me.cmdLeap.UseVisualStyleBackColor = True
'
+ 'cmdRHelp
+ '
+ Me.cmdRHelp.AutoSize = True
+ Me.cmdRHelp.ContextMenuStrip = Me.ContextMenuStripDate
+ Me.cmdRHelp.Location = New System.Drawing.Point(194, 248)
+ Me.cmdRHelp.Name = "cmdRHelp"
+ Me.cmdRHelp.Size = New System.Drawing.Size(113, 38)
+ Me.cmdRHelp.SplitMenuStrip = Me.ContextMenuStripDate
+ Me.cmdRHelp.TabIndex = 212
+ Me.cmdRHelp.Text = "R Help"
+ Me.cmdRHelp.UseVisualStyleBackColor = True
+ '
+ 'ContextMenuStripDate
+ '
+ Me.ContextMenuStripDate.ImageScalingSize = New System.Drawing.Size(24, 24)
+ Me.ContextMenuStripDate.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateLubridateToolStripMenuItem, Me.DateHmsToolStripMenuItem})
+ Me.ContextMenuStripDate.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripDate.Size = New System.Drawing.Size(139, 52)
+ '
+ 'DateLubridateToolStripMenuItem
+ '
+ Me.DateLubridateToolStripMenuItem.Name = "DateLubridateToolStripMenuItem"
+ Me.DateLubridateToolStripMenuItem.Size = New System.Drawing.Size(138, 24)
+ Me.DateLubridateToolStripMenuItem.Text = "lubridate"
+ '
+ 'DateHmsToolStripMenuItem
+ '
+ Me.DateHmsToolStripMenuItem.Name = "DateHmsToolStripMenuItem"
+ Me.DateHmsToolStripMenuItem.Size = New System.Drawing.Size(138, 24)
+ Me.DateHmsToolStripMenuItem.Text = "hms"
+ '
'ContextMenuStripComplex
'
Me.ContextMenuStripComplex.ImageScalingSize = New System.Drawing.Size(24, 24)
@@ -2315,15 +2378,15 @@ Partial Class ucrCalculator
'
'grpWakefield
'
- Me.grpWakefield.Controls.Add(Me.cmdLinkert7)
+ Me.grpWakefield.Controls.Add(Me.cmdLikert7)
Me.grpWakefield.Controls.Add(Me.cmdWakefield_Year)
Me.grpWakefield.Controls.Add(Me.cmdValid)
- Me.grpWakefield.Controls.Add(Me.cmdWakefield_Upper)
+ Me.grpWakefield.Controls.Add(Me.cmdWakefieldUpper)
Me.grpWakefield.Controls.Add(Me.cmdString)
Me.grpWakefield.Controls.Add(Me.cmdState)
Me.grpWakefield.Controls.Add(Me.cmdSpeed)
Me.grpWakefield.Controls.Add(Me.cmdSmokes)
- Me.grpWakefield.Controls.Add(Me.cmdSex)
+ Me.grpWakefield.Controls.Add(Me.cmdWakefieldTimes)
Me.grpWakefield.Controls.Add(Me.cmdSex_Inclusive)
Me.grpWakefield.Controls.Add(Me.cmdGender)
Me.grpWakefield.Controls.Add(Me.cmdSentence)
@@ -2339,9 +2402,9 @@ Partial Class ucrCalculator
Me.grpWakefield.Controls.Add(Me.cmdLorem_ipsum)
Me.grpWakefield.Controls.Add(Me.cmdLikert)
Me.grpWakefield.Controls.Add(Me.cmdGpa)
- Me.grpWakefield.Controls.Add(Me.cmdEla)
+ Me.grpWakefield.Controls.Add(Me.cmdWakefieldMinute)
Me.grpWakefield.Controls.Add(Me.cmdMath)
- Me.grpWakefield.Controls.Add(Me.cmdLevel)
+ Me.grpWakefield.Controls.Add(Me.cmdWakefieldLower)
Me.grpWakefield.Controls.Add(Me.cmdLanguage)
Me.grpWakefield.Controls.Add(Me.cmdIq)
Me.grpWakefield.Controls.Add(Me.cmdInternet_Browser)
@@ -2353,9 +2416,9 @@ Partial Class ucrCalculator
Me.grpWakefield.Controls.Add(Me.cmdDob)
Me.grpWakefield.Controls.Add(Me.cmdDna)
Me.grpWakefield.Controls.Add(Me.cmdDice)
- Me.grpWakefield.Controls.Add(Me.cmdDied)
+ Me.grpWakefield.Controls.Add(Me.cmdGrade_Letter)
Me.grpWakefield.Controls.Add(Me.cmdDeath)
- Me.grpWakefield.Controls.Add(Me.cmdDate_Stamp)
+ Me.grpWakefield.Controls.Add(Me.cmdWakefieldDates)
Me.grpWakefield.Controls.Add(Me.cmdPrimary)
Me.grpWakefield.Controls.Add(Me.cmdColor)
Me.grpWakefield.Controls.Add(Me.cmdCoin)
@@ -2377,16 +2440,16 @@ Partial Class ucrCalculator
Me.grpWakefield.TabStop = False
Me.grpWakefield.Text = "Wakefield"
'
- 'cmdLinkert7
+ 'cmdLikert7
'
- Me.cmdLinkert7.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
- Me.cmdLinkert7.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdLinkert7.Location = New System.Drawing.Point(427, 382)
- Me.cmdLinkert7.Name = "cmdLinkert7"
- Me.cmdLinkert7.Size = New System.Drawing.Size(107, 38)
- Me.cmdLinkert7.TabIndex = 54
- Me.cmdLinkert7.Text = "linkert7 (o.f)"
- Me.cmdLinkert7.UseVisualStyleBackColor = True
+ Me.cmdLikert7.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
+ Me.cmdLikert7.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdLikert7.Location = New System.Drawing.Point(427, 382)
+ Me.cmdLikert7.Name = "cmdLikert7"
+ Me.cmdLikert7.Size = New System.Drawing.Size(107, 38)
+ Me.cmdLikert7.TabIndex = 54
+ Me.cmdLikert7.Text = "likert7 (O.F)"
+ Me.cmdLikert7.UseVisualStyleBackColor = True
'
'cmdWakefield_Year
'
@@ -2410,16 +2473,16 @@ Partial Class ucrCalculator
Me.cmdValid.Text = "valid (L)"
Me.cmdValid.UseVisualStyleBackColor = True
'
- 'cmdWakefield_Upper
+ 'cmdWakefieldUpper
'
- Me.cmdWakefield_Upper.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
- Me.cmdWakefield_Upper.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdWakefield_Upper.Location = New System.Drawing.Point(112, 382)
- Me.cmdWakefield_Upper.Name = "cmdWakefield_Upper"
- Me.cmdWakefield_Upper.Size = New System.Drawing.Size(107, 38)
- Me.cmdWakefield_Upper.TabIndex = 51
- Me.cmdWakefield_Upper.Text = "upper (c)"
- Me.cmdWakefield_Upper.UseVisualStyleBackColor = True
+ Me.cmdWakefieldUpper.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
+ Me.cmdWakefieldUpper.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdWakefieldUpper.Location = New System.Drawing.Point(112, 382)
+ Me.cmdWakefieldUpper.Name = "cmdWakefieldUpper"
+ Me.cmdWakefieldUpper.Size = New System.Drawing.Size(107, 38)
+ Me.cmdWakefieldUpper.TabIndex = 51
+ Me.cmdWakefieldUpper.Text = "upper (F)"
+ Me.cmdWakefieldUpper.UseVisualStyleBackColor = True
'
'cmdString
'
@@ -2429,7 +2492,7 @@ Partial Class ucrCalculator
Me.cmdString.Name = "cmdString"
Me.cmdString.Size = New System.Drawing.Size(107, 38)
Me.cmdString.TabIndex = 50
- Me.cmdString.Text = "string (c)"
+ Me.cmdString.Text = "string (C)"
Me.cmdString.UseVisualStyleBackColor = True
'
'cmdState
@@ -2440,7 +2503,7 @@ Partial Class ucrCalculator
Me.cmdState.Name = "cmdState"
Me.cmdState.Size = New System.Drawing.Size(107, 38)
Me.cmdState.TabIndex = 49
- Me.cmdState.Text = "state (f)"
+ Me.cmdState.Text = "state (F)"
Me.cmdState.UseVisualStyleBackColor = True
'
'cmdSpeed
@@ -2465,16 +2528,16 @@ Partial Class ucrCalculator
Me.cmdSmokes.Text = "smokes (L)"
Me.cmdSmokes.UseVisualStyleBackColor = True
'
- 'cmdSex
+ 'cmdWakefieldTimes
'
- Me.cmdSex.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
- Me.cmdSex.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdSex.Location = New System.Drawing.Point(112, 347)
- Me.cmdSex.Name = "cmdSex"
- Me.cmdSex.Size = New System.Drawing.Size(107, 38)
- Me.cmdSex.TabIndex = 46
- Me.cmdSex.Text = "sex (f)"
- Me.cmdSex.UseVisualStyleBackColor = True
+ Me.cmdWakefieldTimes.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
+ Me.cmdWakefieldTimes.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdWakefieldTimes.Location = New System.Drawing.Point(112, 347)
+ Me.cmdWakefieldTimes.Name = "cmdWakefieldTimes"
+ Me.cmdWakefieldTimes.Size = New System.Drawing.Size(107, 38)
+ Me.cmdWakefieldTimes.TabIndex = 46
+ Me.cmdWakefieldTimes.Text = "times (T)"
+ Me.cmdWakefieldTimes.UseVisualStyleBackColor = True
'
'cmdSex_Inclusive
'
@@ -2484,7 +2547,7 @@ Partial Class ucrCalculator
Me.cmdSex_Inclusive.Name = "cmdSex_Inclusive"
Me.cmdSex_Inclusive.Size = New System.Drawing.Size(107, 38)
Me.cmdSex_Inclusive.TabIndex = 45
- Me.cmdSex_Inclusive.Text = "sex_inclusive (f)"
+ Me.cmdSex_Inclusive.Text = "sex_inclusive (F)"
Me.cmdSex_Inclusive.UseVisualStyleBackColor = True
'
'cmdGender
@@ -2495,7 +2558,7 @@ Partial Class ucrCalculator
Me.cmdGender.Name = "cmdGender"
Me.cmdGender.Size = New System.Drawing.Size(107, 38)
Me.cmdGender.TabIndex = 44
- Me.cmdGender.Text = "gender (f)"
+ Me.cmdGender.Text = "gender (F)"
Me.cmdGender.UseVisualStyleBackColor = True
'
'cmdSentence
@@ -2506,7 +2569,7 @@ Partial Class ucrCalculator
Me.cmdSentence.Name = "cmdSentence"
Me.cmdSentence.Size = New System.Drawing.Size(107, 38)
Me.cmdSentence.TabIndex = 43
- Me.cmdSentence.Text = "sentence (c)"
+ Me.cmdSentence.Text = "sentence (C)"
Me.cmdSentence.UseVisualStyleBackColor = True
'
'cmdSat
@@ -2528,7 +2591,7 @@ Partial Class ucrCalculator
Me.cmdReligion.Name = "cmdReligion"
Me.cmdReligion.Size = New System.Drawing.Size(107, 38)
Me.cmdReligion.TabIndex = 41
- Me.cmdReligion.Text = "religion (f)"
+ Me.cmdReligion.Text = "religion (F)"
Me.cmdReligion.UseVisualStyleBackColor = True
'
'cmdRace
@@ -2539,7 +2602,7 @@ Partial Class ucrCalculator
Me.cmdRace.Name = "cmdRace"
Me.cmdRace.Size = New System.Drawing.Size(107, 38)
Me.cmdRace.TabIndex = 40
- Me.cmdRace.Text = "race (f)"
+ Me.cmdRace.Text = "race (F)"
Me.cmdRace.UseVisualStyleBackColor = True
'
'cmdPolitical
@@ -2550,7 +2613,7 @@ Partial Class ucrCalculator
Me.cmdPolitical.Name = "cmdPolitical"
Me.cmdPolitical.Size = New System.Drawing.Size(107, 38)
Me.cmdPolitical.TabIndex = 39
- Me.cmdPolitical.Text = "political (f)"
+ Me.cmdPolitical.Text = "political (F)"
Me.cmdPolitical.UseVisualStyleBackColor = True
'
'cmdNormal
@@ -2572,7 +2635,7 @@ Partial Class ucrCalculator
Me.cmdName.Name = "cmdName"
Me.cmdName.Size = New System.Drawing.Size(107, 38)
Me.cmdName.TabIndex = 37
- Me.cmdName.Text = "name (c)"
+ Me.cmdName.Text = "name (C)"
Me.cmdName.UseVisualStyleBackColor = True
'
'cmdWakefield_Month
@@ -2583,7 +2646,7 @@ Partial Class ucrCalculator
Me.cmdWakefield_Month.Name = "cmdWakefield_Month"
Me.cmdWakefield_Month.Size = New System.Drawing.Size(107, 38)
Me.cmdWakefield_Month.TabIndex = 36
- Me.cmdWakefield_Month.Text = "month (f)"
+ Me.cmdWakefield_Month.Text = "month (F)"
Me.cmdWakefield_Month.UseVisualStyleBackColor = True
'
'cmdMilitary
@@ -2594,7 +2657,7 @@ Partial Class ucrCalculator
Me.cmdMilitary.Name = "cmdMilitary"
Me.cmdMilitary.Size = New System.Drawing.Size(107, 38)
Me.cmdMilitary.TabIndex = 35
- Me.cmdMilitary.Text = "military (f)"
+ Me.cmdMilitary.Text = "military (F)"
Me.cmdMilitary.UseVisualStyleBackColor = True
'
'cmdMarital
@@ -2605,7 +2668,7 @@ Partial Class ucrCalculator
Me.cmdMarital.Name = "cmdMarital"
Me.cmdMarital.Size = New System.Drawing.Size(107, 38)
Me.cmdMarital.TabIndex = 34
- Me.cmdMarital.Text = "marital (f)"
+ Me.cmdMarital.Text = "marital (F)"
Me.cmdMarital.UseVisualStyleBackColor = True
'
'cmdLorem_ipsum
@@ -2616,7 +2679,7 @@ Partial Class ucrCalculator
Me.cmdLorem_ipsum.Name = "cmdLorem_ipsum"
Me.cmdLorem_ipsum.Size = New System.Drawing.Size(107, 38)
Me.cmdLorem_ipsum.TabIndex = 33
- Me.cmdLorem_ipsum.Text = "lorem_ipsum (c)"
+ Me.cmdLorem_ipsum.Text = "lorem_ipsum (C)"
Me.cmdLorem_ipsum.UseVisualStyleBackColor = True
'
'cmdLikert
@@ -2627,7 +2690,7 @@ Partial Class ucrCalculator
Me.cmdLikert.Name = "cmdLikert"
Me.cmdLikert.Size = New System.Drawing.Size(107, 38)
Me.cmdLikert.TabIndex = 32
- Me.cmdLikert.Text = "likert (o.f)"
+ Me.cmdLikert.Text = "likert (O.F)"
Me.cmdLikert.UseVisualStyleBackColor = True
'
'cmdGpa
@@ -2641,16 +2704,16 @@ Partial Class ucrCalculator
Me.cmdGpa.Text = "gpa"
Me.cmdGpa.UseVisualStyleBackColor = True
'
- 'cmdEla
+ 'cmdWakefieldMinute
'
- Me.cmdEla.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
- Me.cmdEla.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdEla.Location = New System.Drawing.Point(7, 237)
- Me.cmdEla.Name = "cmdEla"
- Me.cmdEla.Size = New System.Drawing.Size(107, 38)
- Me.cmdEla.TabIndex = 30
- Me.cmdEla.Text = "ela"
- Me.cmdEla.UseVisualStyleBackColor = True
+ Me.cmdWakefieldMinute.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
+ Me.cmdWakefieldMinute.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdWakefieldMinute.Location = New System.Drawing.Point(7, 237)
+ Me.cmdWakefieldMinute.Name = "cmdWakefieldMinute"
+ Me.cmdWakefieldMinute.Size = New System.Drawing.Size(107, 38)
+ Me.cmdWakefieldMinute.TabIndex = 30
+ Me.cmdWakefieldMinute.Text = "minute (T)"
+ Me.cmdWakefieldMinute.UseVisualStyleBackColor = True
'
'cmdMath
'
@@ -2663,16 +2726,16 @@ Partial Class ucrCalculator
Me.cmdMath.Text = "math"
Me.cmdMath.UseVisualStyleBackColor = True
'
- 'cmdLevel
+ 'cmdWakefieldLower
'
- Me.cmdLevel.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
- Me.cmdLevel.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdLevel.Location = New System.Drawing.Point(322, 200)
- Me.cmdLevel.Name = "cmdLevel"
- Me.cmdLevel.Size = New System.Drawing.Size(107, 38)
- Me.cmdLevel.TabIndex = 28
- Me.cmdLevel.Text = "level"
- Me.cmdLevel.UseVisualStyleBackColor = True
+ Me.cmdWakefieldLower.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
+ Me.cmdWakefieldLower.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdWakefieldLower.Location = New System.Drawing.Point(322, 200)
+ Me.cmdWakefieldLower.Name = "cmdWakefieldLower"
+ Me.cmdWakefieldLower.Size = New System.Drawing.Size(107, 38)
+ Me.cmdWakefieldLower.TabIndex = 28
+ Me.cmdWakefieldLower.Text = "lower(F)"
+ Me.cmdWakefieldLower.UseVisualStyleBackColor = True
'
'cmdLanguage
'
@@ -2682,7 +2745,7 @@ Partial Class ucrCalculator
Me.cmdLanguage.Name = "cmdLanguage"
Me.cmdLanguage.Size = New System.Drawing.Size(107, 38)
Me.cmdLanguage.TabIndex = 27
- Me.cmdLanguage.Text = "language (f)"
+ Me.cmdLanguage.Text = "language (F)"
Me.cmdLanguage.UseVisualStyleBackColor = True
'
'cmdIq
@@ -2704,7 +2767,7 @@ Partial Class ucrCalculator
Me.cmdInternet_Browser.Name = "cmdInternet_Browser"
Me.cmdInternet_Browser.Size = New System.Drawing.Size(107, 38)
Me.cmdInternet_Browser.TabIndex = 25
- Me.cmdInternet_Browser.Text = "browser (f)"
+ Me.cmdInternet_Browser.Text = "browser (F)"
Me.cmdInternet_Browser.UseVisualStyleBackColor = True
'
'cmdGrade_Level
@@ -2715,7 +2778,7 @@ Partial Class ucrCalculator
Me.cmdGrade_Level.Name = "cmdGrade_Level"
Me.cmdGrade_Level.Size = New System.Drawing.Size(107, 38)
Me.cmdGrade_Level.TabIndex = 19
- Me.cmdGrade_Level.Text = "grade_level (f)"
+ Me.cmdGrade_Level.Text = "grade_level (F)"
Me.cmdGrade_Level.UseVisualStyleBackColor = True
'
'cmdEye
@@ -2726,7 +2789,7 @@ Partial Class ucrCalculator
Me.cmdEye.Name = "cmdEye"
Me.cmdEye.Size = New System.Drawing.Size(107, 38)
Me.cmdEye.TabIndex = 18
- Me.cmdEye.Text = "eye (f)"
+ Me.cmdEye.Text = "eye (F)"
Me.cmdEye.UseVisualStyleBackColor = True
'
'cmdEmployment
@@ -2737,7 +2800,7 @@ Partial Class ucrCalculator
Me.cmdEmployment.Name = "cmdEmployment"
Me.cmdEmployment.Size = New System.Drawing.Size(107, 38)
Me.cmdEmployment.TabIndex = 17
- Me.cmdEmployment.Text = "employment (f)"
+ Me.cmdEmployment.Text = "employment (F)"
Me.cmdEmployment.UseVisualStyleBackColor = True
'
'cmdEducation
@@ -2748,7 +2811,7 @@ Partial Class ucrCalculator
Me.cmdEducation.Name = "cmdEducation"
Me.cmdEducation.Size = New System.Drawing.Size(107, 38)
Me.cmdEducation.TabIndex = 16
- Me.cmdEducation.Text = "education (f)"
+ Me.cmdEducation.Text = "education (F)"
Me.cmdEducation.UseVisualStyleBackColor = True
'
'cmdDummy
@@ -2781,7 +2844,7 @@ Partial Class ucrCalculator
Me.cmdDna.Name = "cmdDna"
Me.cmdDna.Size = New System.Drawing.Size(107, 38)
Me.cmdDna.TabIndex = 13
- Me.cmdDna.Text = "dna (f)"
+ Me.cmdDna.Text = "dna (F)"
Me.cmdDna.UseVisualStyleBackColor = True
'
'cmdDice
@@ -2795,16 +2858,16 @@ Partial Class ucrCalculator
Me.cmdDice.Text = "dice"
Me.cmdDice.UseVisualStyleBackColor = True
'
- 'cmdDied
+ 'cmdGrade_Letter
'
- Me.cmdDied.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
- Me.cmdDied.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdDied.Location = New System.Drawing.Point(112, 90)
- Me.cmdDied.Name = "cmdDied"
- Me.cmdDied.Size = New System.Drawing.Size(107, 38)
- Me.cmdDied.TabIndex = 11
- Me.cmdDied.Text = "died (L)"
- Me.cmdDied.UseVisualStyleBackColor = True
+ Me.cmdGrade_Letter.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
+ Me.cmdGrade_Letter.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdGrade_Letter.Location = New System.Drawing.Point(112, 90)
+ Me.cmdGrade_Letter.Name = "cmdGrade_Letter"
+ Me.cmdGrade_Letter.Size = New System.Drawing.Size(107, 38)
+ Me.cmdGrade_Letter.TabIndex = 11
+ Me.cmdGrade_Letter.Text = "grade_letter(F)"
+ Me.cmdGrade_Letter.UseVisualStyleBackColor = True
'
'cmdDeath
'
@@ -2817,16 +2880,16 @@ Partial Class ucrCalculator
Me.cmdDeath.Text = "death (L)"
Me.cmdDeath.UseVisualStyleBackColor = True
'
- 'cmdDate_Stamp
+ 'cmdWakefieldDates
'
- Me.cmdDate_Stamp.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
- Me.cmdDate_Stamp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdDate_Stamp.Location = New System.Drawing.Point(427, 53)
- Me.cmdDate_Stamp.Name = "cmdDate_Stamp"
- Me.cmdDate_Stamp.Size = New System.Drawing.Size(107, 38)
- Me.cmdDate_Stamp.TabIndex = 9
- Me.cmdDate_Stamp.Text = "date_stamp"
- Me.cmdDate_Stamp.UseVisualStyleBackColor = True
+ Me.cmdWakefieldDates.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.25!)
+ Me.cmdWakefieldDates.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdWakefieldDates.Location = New System.Drawing.Point(427, 53)
+ Me.cmdWakefieldDates.Name = "cmdWakefieldDates"
+ Me.cmdWakefieldDates.Size = New System.Drawing.Size(107, 38)
+ Me.cmdWakefieldDates.TabIndex = 9
+ Me.cmdWakefieldDates.Text = "dates (D)"
+ Me.cmdWakefieldDates.UseVisualStyleBackColor = True
'
'cmdPrimary
'
@@ -2836,7 +2899,7 @@ Partial Class ucrCalculator
Me.cmdPrimary.Name = "cmdPrimary"
Me.cmdPrimary.Size = New System.Drawing.Size(107, 38)
Me.cmdPrimary.TabIndex = 8
- Me.cmdPrimary.Text = "primary (f)"
+ Me.cmdPrimary.Text = "primary (F)"
Me.cmdPrimary.UseVisualStyleBackColor = True
'
'cmdColor
@@ -2847,7 +2910,7 @@ Partial Class ucrCalculator
Me.cmdColor.Name = "cmdColor"
Me.cmdColor.Size = New System.Drawing.Size(107, 38)
Me.cmdColor.TabIndex = 7
- Me.cmdColor.Text = "color (f)"
+ Me.cmdColor.Text = "color (F)"
Me.cmdColor.UseVisualStyleBackColor = True
'
'cmdCoin
@@ -2858,7 +2921,7 @@ Partial Class ucrCalculator
Me.cmdCoin.Name = "cmdCoin"
Me.cmdCoin.Size = New System.Drawing.Size(107, 38)
Me.cmdCoin.TabIndex = 6
- Me.cmdCoin.Text = "coin (f)"
+ Me.cmdCoin.Text = "coin (F)"
Me.cmdCoin.UseVisualStyleBackColor = True
'
'cmdChildren
@@ -2880,7 +2943,7 @@ Partial Class ucrCalculator
Me.cmdCar.Name = "cmdCar"
Me.cmdCar.Size = New System.Drawing.Size(107, 38)
Me.cmdCar.TabIndex = 4
- Me.cmdCar.Text = "car (f)"
+ Me.cmdCar.Text = "car (F)"
Me.cmdCar.UseVisualStyleBackColor = True
'
'cmdAnswer
@@ -2891,7 +2954,7 @@ Partial Class ucrCalculator
Me.cmdAnswer.Name = "cmdAnswer"
Me.cmdAnswer.Size = New System.Drawing.Size(107, 38)
Me.cmdAnswer.TabIndex = 3
- Me.cmdAnswer.Text = "answer (f)"
+ Me.cmdAnswer.Text = "answer (F)"
Me.cmdAnswer.UseVisualStyleBackColor = True
'
'cmdPet
@@ -2902,7 +2965,7 @@ Partial Class ucrCalculator
Me.cmdPet.Name = "cmdPet"
Me.cmdPet.Size = New System.Drawing.Size(107, 38)
Me.cmdPet.TabIndex = 2
- Me.cmdPet.Text = "pet (f)"
+ Me.cmdPet.Text = "pet (F)"
Me.cmdPet.UseVisualStyleBackColor = True
'
'cmdAnimal
@@ -2913,7 +2976,7 @@ Partial Class ucrCalculator
Me.cmdAnimal.Name = "cmdAnimal"
Me.cmdAnimal.Size = New System.Drawing.Size(107, 38)
Me.cmdAnimal.TabIndex = 1
- Me.cmdAnimal.Text = "animal (f)"
+ Me.cmdAnimal.Text = "animal (F)"
Me.cmdAnimal.UseVisualStyleBackColor = True
'
'cmdAge
@@ -2957,7 +3020,7 @@ Partial Class ucrCalculator
Me.cmdHair.Name = "cmdHair"
Me.cmdHair.Size = New System.Drawing.Size(107, 38)
Me.cmdHair.TabIndex = 22
- Me.cmdHair.Text = "hair (f)"
+ Me.cmdHair.Text = "hair (F)"
Me.cmdHair.UseVisualStyleBackColor = True
'
'cmdGroup
@@ -2968,7 +3031,7 @@ Partial Class ucrCalculator
Me.cmdGroup.Name = "cmdGroup"
Me.cmdGroup.Size = New System.Drawing.Size(107, 38)
Me.cmdGroup.TabIndex = 21
- Me.cmdGroup.Text = "group (f)"
+ Me.cmdGroup.Text = "group (F)"
Me.cmdGroup.UseVisualStyleBackColor = True
'
'cmdGrade
@@ -3323,7 +3386,6 @@ Partial Class ucrCalculator
Me.grpSummary.Controls.Add(Me.cmdwheremax)
Me.grpSummary.Controls.Add(Me.cmdwhichmin)
Me.grpSummary.Controls.Add(Me.cmdSummaryRHelp)
- Me.grpSummary.Controls.Add(Me.grpFrequencies)
Me.grpSummary.Controls.Add(Me.cmdKurtosis)
Me.grpSummary.Controls.Add(Me.cmdMode1)
Me.grpSummary.Controls.Add(Me.cmdMode)
@@ -3352,6 +3414,7 @@ Partial Class ucrCalculator
Me.grpSummary.Controls.Add(Me.cmdLength)
Me.grpSummary.Controls.Add(Me.cmdSum)
Me.grpSummary.Controls.Add(Me.cmdVar)
+ Me.grpSummary.Controls.Add(Me.grpFrequencies)
Me.grpSummary.Location = New System.Drawing.Point(542, 78)
Me.grpSummary.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.grpSummary.Name = "grpSummary"
@@ -3368,7 +3431,7 @@ Partial Class ucrCalculator
Me.cmdwheremin.Location = New System.Drawing.Point(269, 199)
Me.cmdwheremin.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdwheremin.Name = "cmdwheremin"
- Me.cmdwheremin.Size = New System.Drawing.Size(90, 38)
+ Me.cmdwheremin.Size = New System.Drawing.Size(88, 38)
Me.cmdwheremin.TabIndex = 193
Me.cmdwheremin.Text = "where.min"
Me.cmdwheremin.UseVisualStyleBackColor = True
@@ -3460,211 +3523,7 @@ Partial Class ucrCalculator
'
Me.RasterToolStripMenuItem.Name = "RasterToolStripMenuItem"
Me.RasterToolStripMenuItem.Size = New System.Drawing.Size(155, 24)
- Me.RasterToolStripMenuItem.Text = "Raster"
- '
- 'grpFrequencies
- '
- Me.grpFrequencies.Controls.Add(Me.cmdFreqQuantile)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqPropn)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqDistinct)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqIQR)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqMedian)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqSd)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqVar)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqMean)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqMad)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqMiss)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqMode1)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqMax)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqMin)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqSum)
- Me.grpFrequencies.Controls.Add(Me.cmdFreqLength)
- Me.grpFrequencies.Location = New System.Drawing.Point(2, 283)
- Me.grpFrequencies.Name = "grpFrequencies"
- Me.grpFrequencies.Size = New System.Drawing.Size(353, 133)
- Me.grpFrequencies.TabIndex = 184
- Me.grpFrequencies.TabStop = False
- Me.grpFrequencies.Text = "Frequencies"
- '
- 'cmdFreqQuantile
- '
- Me.cmdFreqQuantile.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqQuantile.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqQuantile.Location = New System.Drawing.Point(282, 90)
- Me.cmdFreqQuantile.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqQuantile.Name = "cmdFreqQuantile"
- Me.cmdFreqQuantile.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqQuantile.TabIndex = 186
- Me.cmdFreqQuantile.Text = "quantile"
- Me.cmdFreqQuantile.UseVisualStyleBackColor = True
- '
- 'cmdFreqPropn
- '
- Me.cmdFreqPropn.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqPropn.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqPropn.Location = New System.Drawing.Point(212, 90)
- Me.cmdFreqPropn.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqPropn.Name = "cmdFreqPropn"
- Me.cmdFreqPropn.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqPropn.TabIndex = 185
- Me.cmdFreqPropn.Text = "propn"
- Me.cmdFreqPropn.UseVisualStyleBackColor = True
- '
- 'cmdFreqDistinct
- '
- Me.cmdFreqDistinct.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqDistinct.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqDistinct.Location = New System.Drawing.Point(142, 90)
- Me.cmdFreqDistinct.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqDistinct.Name = "cmdFreqDistinct"
- Me.cmdFreqDistinct.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqDistinct.TabIndex = 184
- Me.cmdFreqDistinct.Text = "distinct"
- Me.cmdFreqDistinct.UseVisualStyleBackColor = True
- '
- 'cmdFreqIQR
- '
- Me.cmdFreqIQR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqIQR.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqIQR.Location = New System.Drawing.Point(70, 90)
- Me.cmdFreqIQR.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqIQR.Name = "cmdFreqIQR"
- Me.cmdFreqIQR.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqIQR.TabIndex = 183
- Me.cmdFreqIQR.Text = "IQR"
- Me.cmdFreqIQR.UseVisualStyleBackColor = True
- '
- 'cmdFreqMedian
- '
- Me.cmdFreqMedian.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqMedian.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqMedian.Location = New System.Drawing.Point(142, 53)
- Me.cmdFreqMedian.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqMedian.Name = "cmdFreqMedian"
- Me.cmdFreqMedian.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqMedian.TabIndex = 182
- Me.cmdFreqMedian.Text = "median"
- Me.cmdFreqMedian.UseVisualStyleBackColor = True
- '
- 'cmdFreqSd
- '
- Me.cmdFreqSd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqSd.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqSd.Location = New System.Drawing.Point(282, 53)
- Me.cmdFreqSd.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqSd.Name = "cmdFreqSd"
- Me.cmdFreqSd.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqSd.TabIndex = 181
- Me.cmdFreqSd.Text = "sd"
- Me.cmdFreqSd.UseVisualStyleBackColor = True
- '
- 'cmdFreqVar
- '
- Me.cmdFreqVar.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqVar.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqVar.Location = New System.Drawing.Point(212, 53)
- Me.cmdFreqVar.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqVar.Name = "cmdFreqVar"
- Me.cmdFreqVar.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqVar.TabIndex = 180
- Me.cmdFreqVar.Text = "var"
- Me.cmdFreqVar.UseVisualStyleBackColor = True
- '
- 'cmdFreqMean
- '
- Me.cmdFreqMean.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqMean.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqMean.Location = New System.Drawing.Point(70, 53)
- Me.cmdFreqMean.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqMean.Name = "cmdFreqMean"
- Me.cmdFreqMean.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqMean.TabIndex = 179
- Me.cmdFreqMean.Text = "mean"
- Me.cmdFreqMean.UseVisualStyleBackColor = True
- '
- 'cmdFreqMad
- '
- Me.cmdFreqMad.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqMad.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqMad.Location = New System.Drawing.Point(0, 90)
- Me.cmdFreqMad.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqMad.Name = "cmdFreqMad"
- Me.cmdFreqMad.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqMad.TabIndex = 178
- Me.cmdFreqMad.Text = "mad"
- Me.cmdFreqMad.UseVisualStyleBackColor = True
- '
- 'cmdFreqMiss
- '
- Me.cmdFreqMiss.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqMiss.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqMiss.Location = New System.Drawing.Point(0, 53)
- Me.cmdFreqMiss.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqMiss.Name = "cmdFreqMiss"
- Me.cmdFreqMiss.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqMiss.TabIndex = 177
- Me.cmdFreqMiss.Text = "miss"
- Me.cmdFreqMiss.UseVisualStyleBackColor = True
- '
- 'cmdFreqMode1
- '
- Me.cmdFreqMode1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqMode1.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqMode1.Location = New System.Drawing.Point(282, 18)
- Me.cmdFreqMode1.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqMode1.Name = "cmdFreqMode1"
- Me.cmdFreqMode1.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqMode1.TabIndex = 176
- Me.cmdFreqMode1.Text = "mode1"
- Me.cmdFreqMode1.UseVisualStyleBackColor = True
- '
- 'cmdFreqMax
- '
- Me.cmdFreqMax.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqMax.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqMax.Location = New System.Drawing.Point(212, 18)
- Me.cmdFreqMax.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqMax.Name = "cmdFreqMax"
- Me.cmdFreqMax.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqMax.TabIndex = 175
- Me.cmdFreqMax.Text = "max"
- Me.cmdFreqMax.UseVisualStyleBackColor = True
- '
- 'cmdFreqMin
- '
- Me.cmdFreqMin.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqMin.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqMin.Location = New System.Drawing.Point(142, 18)
- Me.cmdFreqMin.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqMin.Name = "cmdFreqMin"
- Me.cmdFreqMin.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqMin.TabIndex = 174
- Me.cmdFreqMin.Text = "min"
- Me.cmdFreqMin.UseVisualStyleBackColor = True
- '
- 'cmdFreqSum
- '
- Me.cmdFreqSum.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqSum.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqSum.Location = New System.Drawing.Point(70, 18)
- Me.cmdFreqSum.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqSum.Name = "cmdFreqSum"
- Me.cmdFreqSum.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqSum.TabIndex = 173
- Me.cmdFreqSum.Text = "sum"
- Me.cmdFreqSum.UseVisualStyleBackColor = True
- '
- 'cmdFreqLength
- '
- Me.cmdFreqLength.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
- Me.cmdFreqLength.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFreqLength.Location = New System.Drawing.Point(0, 18)
- Me.cmdFreqLength.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.cmdFreqLength.Name = "cmdFreqLength"
- Me.cmdFreqLength.Size = New System.Drawing.Size(72, 38)
- Me.cmdFreqLength.TabIndex = 172
- Me.cmdFreqLength.Text = "length"
- Me.cmdFreqLength.UseVisualStyleBackColor = True
+ Me.RasterToolStripMenuItem.Text = "Raster"
'
'cmdKurtosis
'
@@ -3736,7 +3595,7 @@ Partial Class ucrCalculator
'cmdCor
'
Me.cmdCor.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCor.Location = New System.Drawing.Point(2, 235)
+ Me.cmdCor.Location = New System.Drawing.Point(2, 236)
Me.cmdCor.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdCor.Name = "cmdCor"
Me.cmdCor.Size = New System.Drawing.Size(78, 38)
@@ -3747,7 +3606,7 @@ Partial Class ucrCalculator
'cmdCov
'
Me.cmdCov.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCov.Location = New System.Drawing.Point(79, 235)
+ Me.cmdCov.Location = New System.Drawing.Point(79, 236)
Me.cmdCov.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdCov.Name = "cmdCov"
Me.cmdCov.Size = New System.Drawing.Size(70, 38)
@@ -3865,7 +3724,7 @@ Partial Class ucrCalculator
'
Me.cmdQuantile.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdQuantile.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdQuantile.Location = New System.Drawing.Point(148, 235)
+ Me.cmdQuantile.Location = New System.Drawing.Point(148, 236)
Me.cmdQuantile.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdQuantile.Name = "cmdQuantile"
Me.cmdQuantile.Size = New System.Drawing.Size(70, 38)
@@ -3987,6 +3846,210 @@ Partial Class ucrCalculator
Me.cmdVar.Text = "var"
Me.cmdVar.UseVisualStyleBackColor = True
'
+ 'grpFrequencies
+ '
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqQuantile)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqPropn)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqDistinct)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqIQR)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqMedian)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqSd)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqVar)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqMean)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqMad)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqMiss)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqMode1)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqMax)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqMin)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqSum)
+ Me.grpFrequencies.Controls.Add(Me.cmdFreqLength)
+ Me.grpFrequencies.Location = New System.Drawing.Point(2, 283)
+ Me.grpFrequencies.Name = "grpFrequencies"
+ Me.grpFrequencies.Size = New System.Drawing.Size(353, 133)
+ Me.grpFrequencies.TabIndex = 184
+ Me.grpFrequencies.TabStop = False
+ Me.grpFrequencies.Text = "Frequencies"
+ '
+ 'cmdFreqQuantile
+ '
+ Me.cmdFreqQuantile.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqQuantile.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqQuantile.Location = New System.Drawing.Point(282, 90)
+ Me.cmdFreqQuantile.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqQuantile.Name = "cmdFreqQuantile"
+ Me.cmdFreqQuantile.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqQuantile.TabIndex = 186
+ Me.cmdFreqQuantile.Text = "quantile"
+ Me.cmdFreqQuantile.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqPropn
+ '
+ Me.cmdFreqPropn.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqPropn.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqPropn.Location = New System.Drawing.Point(212, 90)
+ Me.cmdFreqPropn.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqPropn.Name = "cmdFreqPropn"
+ Me.cmdFreqPropn.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqPropn.TabIndex = 185
+ Me.cmdFreqPropn.Text = "propn"
+ Me.cmdFreqPropn.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqDistinct
+ '
+ Me.cmdFreqDistinct.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqDistinct.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqDistinct.Location = New System.Drawing.Point(142, 90)
+ Me.cmdFreqDistinct.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqDistinct.Name = "cmdFreqDistinct"
+ Me.cmdFreqDistinct.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqDistinct.TabIndex = 184
+ Me.cmdFreqDistinct.Text = "distinct"
+ Me.cmdFreqDistinct.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqIQR
+ '
+ Me.cmdFreqIQR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqIQR.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqIQR.Location = New System.Drawing.Point(70, 90)
+ Me.cmdFreqIQR.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqIQR.Name = "cmdFreqIQR"
+ Me.cmdFreqIQR.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqIQR.TabIndex = 183
+ Me.cmdFreqIQR.Text = "IQR"
+ Me.cmdFreqIQR.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqMedian
+ '
+ Me.cmdFreqMedian.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqMedian.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqMedian.Location = New System.Drawing.Point(142, 53)
+ Me.cmdFreqMedian.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqMedian.Name = "cmdFreqMedian"
+ Me.cmdFreqMedian.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqMedian.TabIndex = 182
+ Me.cmdFreqMedian.Text = "median"
+ Me.cmdFreqMedian.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqSd
+ '
+ Me.cmdFreqSd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqSd.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqSd.Location = New System.Drawing.Point(282, 53)
+ Me.cmdFreqSd.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqSd.Name = "cmdFreqSd"
+ Me.cmdFreqSd.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqSd.TabIndex = 181
+ Me.cmdFreqSd.Text = "sd"
+ Me.cmdFreqSd.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqVar
+ '
+ Me.cmdFreqVar.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqVar.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqVar.Location = New System.Drawing.Point(212, 53)
+ Me.cmdFreqVar.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqVar.Name = "cmdFreqVar"
+ Me.cmdFreqVar.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqVar.TabIndex = 180
+ Me.cmdFreqVar.Text = "var"
+ Me.cmdFreqVar.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqMean
+ '
+ Me.cmdFreqMean.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqMean.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqMean.Location = New System.Drawing.Point(70, 53)
+ Me.cmdFreqMean.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqMean.Name = "cmdFreqMean"
+ Me.cmdFreqMean.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqMean.TabIndex = 179
+ Me.cmdFreqMean.Text = "mean"
+ Me.cmdFreqMean.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqMad
+ '
+ Me.cmdFreqMad.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqMad.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqMad.Location = New System.Drawing.Point(0, 90)
+ Me.cmdFreqMad.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqMad.Name = "cmdFreqMad"
+ Me.cmdFreqMad.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqMad.TabIndex = 178
+ Me.cmdFreqMad.Text = "mad"
+ Me.cmdFreqMad.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqMiss
+ '
+ Me.cmdFreqMiss.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqMiss.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqMiss.Location = New System.Drawing.Point(0, 53)
+ Me.cmdFreqMiss.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqMiss.Name = "cmdFreqMiss"
+ Me.cmdFreqMiss.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqMiss.TabIndex = 177
+ Me.cmdFreqMiss.Text = "miss"
+ Me.cmdFreqMiss.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqMode1
+ '
+ Me.cmdFreqMode1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqMode1.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqMode1.Location = New System.Drawing.Point(282, 18)
+ Me.cmdFreqMode1.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqMode1.Name = "cmdFreqMode1"
+ Me.cmdFreqMode1.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqMode1.TabIndex = 176
+ Me.cmdFreqMode1.Text = "mode1"
+ Me.cmdFreqMode1.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqMax
+ '
+ Me.cmdFreqMax.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqMax.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqMax.Location = New System.Drawing.Point(212, 18)
+ Me.cmdFreqMax.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqMax.Name = "cmdFreqMax"
+ Me.cmdFreqMax.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqMax.TabIndex = 175
+ Me.cmdFreqMax.Text = "max"
+ Me.cmdFreqMax.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqMin
+ '
+ Me.cmdFreqMin.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqMin.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqMin.Location = New System.Drawing.Point(142, 18)
+ Me.cmdFreqMin.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqMin.Name = "cmdFreqMin"
+ Me.cmdFreqMin.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqMin.TabIndex = 174
+ Me.cmdFreqMin.Text = "min"
+ Me.cmdFreqMin.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqSum
+ '
+ Me.cmdFreqSum.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqSum.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqSum.Location = New System.Drawing.Point(70, 18)
+ Me.cmdFreqSum.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqSum.Name = "cmdFreqSum"
+ Me.cmdFreqSum.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqSum.TabIndex = 173
+ Me.cmdFreqSum.Text = "sum"
+ Me.cmdFreqSum.UseVisualStyleBackColor = True
+ '
+ 'cmdFreqLength
+ '
+ Me.cmdFreqLength.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdFreqLength.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdFreqLength.Location = New System.Drawing.Point(0, 18)
+ Me.cmdFreqLength.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdFreqLength.Name = "cmdFreqLength"
+ Me.cmdFreqLength.Size = New System.Drawing.Size(72, 38)
+ Me.cmdFreqLength.TabIndex = 172
+ Me.cmdFreqLength.Text = "length"
+ Me.cmdFreqLength.UseVisualStyleBackColor = True
+ '
'grpProbabilty
'
Me.grpProbabilty.Controls.Add(Me.cmdPascal)
@@ -5819,7 +5882,7 @@ Partial Class ucrCalculator
'cmdCircMax
'
Me.cmdCircMax.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCircMax.Location = New System.Drawing.Point(223, 138)
+ Me.cmdCircMax.Location = New System.Drawing.Point(224, 139)
Me.cmdCircMax.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircMax.Name = "cmdCircMax"
Me.cmdCircMax.Size = New System.Drawing.Size(82, 40)
@@ -5841,7 +5904,7 @@ Partial Class ucrCalculator
'cmdAngVar
'
Me.cmdAngVar.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdAngVar.Location = New System.Drawing.Point(77, 100)
+ Me.cmdAngVar.Location = New System.Drawing.Point(76, 100)
Me.cmdAngVar.Margin = New System.Windows.Forms.Padding(2)
Me.cmdAngVar.Name = "cmdAngVar"
Me.cmdAngVar.Size = New System.Drawing.Size(75, 40)
@@ -5852,7 +5915,7 @@ Partial Class ucrCalculator
'cmdCircRho
'
Me.cmdCircRho.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCircRho.Location = New System.Drawing.Point(223, 100)
+ Me.cmdCircRho.Location = New System.Drawing.Point(224, 100)
Me.cmdCircRho.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircRho.Name = "cmdCircRho"
Me.cmdCircRho.Size = New System.Drawing.Size(82, 40)
@@ -5863,7 +5926,7 @@ Partial Class ucrCalculator
'cmdCircQ3
'
Me.cmdCircQ3.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCircQ3.Location = New System.Drawing.Point(150, 138)
+ Me.cmdCircQ3.Location = New System.Drawing.Point(150, 139)
Me.cmdCircQ3.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircQ3.Name = "cmdCircQ3"
Me.cmdCircQ3.Size = New System.Drawing.Size(75, 40)
@@ -5874,7 +5937,7 @@ Partial Class ucrCalculator
'cmdCircQ1
'
Me.cmdCircQ1.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCircQ1.Location = New System.Drawing.Point(77, 138)
+ Me.cmdCircQ1.Location = New System.Drawing.Point(76, 139)
Me.cmdCircQ1.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircQ1.Name = "cmdCircQ1"
Me.cmdCircQ1.Size = New System.Drawing.Size(75, 40)
@@ -5885,7 +5948,7 @@ Partial Class ucrCalculator
'cmdCircMin
'
Me.cmdCircMin.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCircMin.Location = New System.Drawing.Point(2, 138)
+ Me.cmdCircMin.Location = New System.Drawing.Point(2, 139)
Me.cmdCircMin.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircMin.Name = "cmdCircMin"
Me.cmdCircMin.Size = New System.Drawing.Size(75, 40)
@@ -5896,7 +5959,7 @@ Partial Class ucrCalculator
'cmdAngDev
'
Me.cmdAngDev.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdAngDev.Location = New System.Drawing.Point(150, 62)
+ Me.cmdAngDev.Location = New System.Drawing.Point(150, 61)
Me.cmdAngDev.Margin = New System.Windows.Forms.Padding(2)
Me.cmdAngDev.Name = "cmdAngDev"
Me.cmdAngDev.Size = New System.Drawing.Size(75, 40)
@@ -5907,7 +5970,7 @@ Partial Class ucrCalculator
'cmdCircVar
'
Me.cmdCircVar.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCircVar.Location = New System.Drawing.Point(223, 62)
+ Me.cmdCircVar.Location = New System.Drawing.Point(224, 61)
Me.cmdCircVar.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircVar.Name = "cmdCircVar"
Me.cmdCircVar.Size = New System.Drawing.Size(82, 40)
@@ -5918,7 +5981,7 @@ Partial Class ucrCalculator
'cmdCircSd
'
Me.cmdCircSd.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCircSd.Location = New System.Drawing.Point(77, 62)
+ Me.cmdCircSd.Location = New System.Drawing.Point(76, 61)
Me.cmdCircSd.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircSd.Name = "cmdCircSd"
Me.cmdCircSd.Size = New System.Drawing.Size(75, 40)
@@ -5929,7 +5992,7 @@ Partial Class ucrCalculator
'cmdCircRange
'
Me.cmdCircRange.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCircRange.Location = New System.Drawing.Point(2, 62)
+ Me.cmdCircRange.Location = New System.Drawing.Point(2, 61)
Me.cmdCircRange.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircRange.Name = "cmdCircRange"
Me.cmdCircRange.Size = New System.Drawing.Size(75, 40)
@@ -5940,7 +6003,7 @@ Partial Class ucrCalculator
'cmdMedianHL
'
Me.cmdMedianHL.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdMedianHL.Location = New System.Drawing.Point(223, 22)
+ Me.cmdMedianHL.Location = New System.Drawing.Point(224, 22)
Me.cmdMedianHL.Margin = New System.Windows.Forms.Padding(2)
Me.cmdMedianHL.Name = "cmdMedianHL"
Me.cmdMedianHL.Size = New System.Drawing.Size(82, 40)
@@ -5962,7 +6025,7 @@ Partial Class ucrCalculator
'cmdCircMean
'
Me.cmdCircMean.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCircMean.Location = New System.Drawing.Point(77, 22)
+ Me.cmdCircMean.Location = New System.Drawing.Point(76, 22)
Me.cmdCircMean.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircMean.Name = "cmdCircMean"
Me.cmdCircMean.Size = New System.Drawing.Size(75, 40)
@@ -6046,7 +6109,7 @@ Partial Class ucrCalculator
Me.grpSymbols.Controls.Add(Me.cmdEnd1)
Me.grpSymbols.Controls.Add(Me.cmdbegin)
Me.grpSymbols.Controls.Add(Me.cmdAny1)
- Me.grpSymbols.Location = New System.Drawing.Point(542, 355)
+ Me.grpSymbols.Location = New System.Drawing.Point(542, 359)
Me.grpSymbols.Margin = New System.Windows.Forms.Padding(2)
Me.grpSymbols.Name = "grpSymbols"
Me.grpSymbols.Padding = New System.Windows.Forms.Padding(2)
@@ -6222,6 +6285,9 @@ Partial Class ucrCalculator
'
'grpComplex
'
+ Me.grpComplex.Controls.Add(Me.cmdComplexAsin)
+ Me.grpComplex.Controls.Add(Me.cmdComplexAtan)
+ Me.grpComplex.Controls.Add(Me.cmdComplexAcos)
Me.grpComplex.Controls.Add(Me.cmdAsComplex)
Me.grpComplex.Controls.Add(Me.cmdComplexi)
Me.grpComplex.Controls.Add(Me.cmdComplexRHelp)
@@ -6252,6 +6318,42 @@ Partial Class ucrCalculator
Me.grpComplex.TabStop = False
Me.grpComplex.Text = "Complex"
'
+ 'cmdComplexAsin
+ '
+ Me.cmdComplexAsin.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdComplexAsin.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdComplexAsin.Location = New System.Drawing.Point(30, 128)
+ Me.cmdComplexAsin.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexAsin.Name = "cmdComplexAsin"
+ Me.cmdComplexAsin.Size = New System.Drawing.Size(82, 38)
+ Me.cmdComplexAsin.TabIndex = 217
+ Me.cmdComplexAsin.Text = "asin"
+ Me.cmdComplexAsin.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexAtan
+ '
+ Me.cmdComplexAtan.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdComplexAtan.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdComplexAtan.Location = New System.Drawing.Point(198, 128)
+ Me.cmdComplexAtan.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexAtan.Name = "cmdComplexAtan"
+ Me.cmdComplexAtan.Size = New System.Drawing.Size(82, 38)
+ Me.cmdComplexAtan.TabIndex = 216
+ Me.cmdComplexAtan.Text = "atan"
+ Me.cmdComplexAtan.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexAcos
+ '
+ Me.cmdComplexAcos.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdComplexAcos.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdComplexAcos.Location = New System.Drawing.Point(111, 128)
+ Me.cmdComplexAcos.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexAcos.Name = "cmdComplexAcos"
+ Me.cmdComplexAcos.Size = New System.Drawing.Size(88, 38)
+ Me.cmdComplexAcos.TabIndex = 215
+ Me.cmdComplexAcos.Text = "acos"
+ Me.cmdComplexAcos.UseVisualStyleBackColor = True
+ '
'cmdAsComplex
'
Me.cmdAsComplex.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
@@ -6268,10 +6370,10 @@ Partial Class ucrCalculator
'
Me.cmdComplexi.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdComplexi.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdComplexi.Location = New System.Drawing.Point(111, 202)
+ Me.cmdComplexi.Location = New System.Drawing.Point(30, 237)
Me.cmdComplexi.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdComplexi.Name = "cmdComplexi"
- Me.cmdComplexi.Size = New System.Drawing.Size(88, 38)
+ Me.cmdComplexi.Size = New System.Drawing.Size(82, 38)
Me.cmdComplexi.TabIndex = 210
Me.cmdComplexi.Text = "i"
Me.cmdComplexi.UseVisualStyleBackColor = True
@@ -6280,7 +6382,7 @@ Partial Class ucrCalculator
'
Me.cmdComplexRHelp.AutoSize = True
Me.cmdComplexRHelp.ContextMenuStrip = Me.ContextMenuStripComplex
- Me.cmdComplexRHelp.Location = New System.Drawing.Point(228, 212)
+ Me.cmdComplexRHelp.Location = New System.Drawing.Point(237, 240)
Me.cmdComplexRHelp.Name = "cmdComplexRHelp"
Me.cmdComplexRHelp.Size = New System.Drawing.Size(113, 38)
Me.cmdComplexRHelp.SplitMenuStrip = Me.ContextMenuStripComplex
@@ -6292,7 +6394,7 @@ Partial Class ucrCalculator
'
Me.cmdComplexTanH.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdComplexTanH.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdComplexTanH.Location = New System.Drawing.Point(198, 128)
+ Me.cmdComplexTanH.Location = New System.Drawing.Point(198, 164)
Me.cmdComplexTanH.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdComplexTanH.Name = "cmdComplexTanH"
Me.cmdComplexTanH.Size = New System.Drawing.Size(82, 38)
@@ -6316,10 +6418,10 @@ Partial Class ucrCalculator
'
Me.cmdComplexPi.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdComplexPi.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdComplexPi.Location = New System.Drawing.Point(31, 202)
+ Me.cmdComplexPi.Location = New System.Drawing.Point(279, 128)
Me.cmdComplexPi.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdComplexPi.Name = "cmdComplexPi"
- Me.cmdComplexPi.Size = New System.Drawing.Size(81, 38)
+ Me.cmdComplexPi.Size = New System.Drawing.Size(78, 38)
Me.cmdComplexPi.TabIndex = 206
Me.cmdComplexPi.Text = "pi"
Me.cmdComplexPi.UseVisualStyleBackColor = True
@@ -6352,7 +6454,7 @@ Partial Class ucrCalculator
'
Me.cmdComplexSignif.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdComplexSignif.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdComplexSignif.Location = New System.Drawing.Point(198, 165)
+ Me.cmdComplexSignif.Location = New System.Drawing.Point(198, 200)
Me.cmdComplexSignif.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdComplexSignif.Name = "cmdComplexSignif"
Me.cmdComplexSignif.Size = New System.Drawing.Size(82, 38)
@@ -6364,7 +6466,7 @@ Partial Class ucrCalculator
'
Me.cmdComplexCosH.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdComplexCosH.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdComplexCosH.Location = New System.Drawing.Point(111, 128)
+ Me.cmdComplexCosH.Location = New System.Drawing.Point(111, 164)
Me.cmdComplexCosH.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdComplexCosH.Name = "cmdComplexCosH"
Me.cmdComplexCosH.Size = New System.Drawing.Size(88, 38)
@@ -6376,7 +6478,7 @@ Partial Class ucrCalculator
'
Me.cmdComplexSinH.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdComplexSinH.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdComplexSinH.Location = New System.Drawing.Point(30, 128)
+ Me.cmdComplexSinH.Location = New System.Drawing.Point(30, 164)
Me.cmdComplexSinH.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdComplexSinH.Name = "cmdComplexSinH"
Me.cmdComplexSinH.Size = New System.Drawing.Size(82, 38)
@@ -6412,7 +6514,7 @@ Partial Class ucrCalculator
'
Me.cmdComplexExp.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdComplexExp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdComplexExp.Location = New System.Drawing.Point(279, 128)
+ Me.cmdComplexExp.Location = New System.Drawing.Point(279, 164)
Me.cmdComplexExp.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdComplexExp.Name = "cmdComplexExp"
Me.cmdComplexExp.Size = New System.Drawing.Size(79, 38)
@@ -6424,7 +6526,7 @@ Partial Class ucrCalculator
'
Me.cmdComplexRound.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdComplexRound.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdComplexRound.Location = New System.Drawing.Point(111, 165)
+ Me.cmdComplexRound.Location = New System.Drawing.Point(111, 200)
Me.cmdComplexRound.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdComplexRound.Name = "cmdComplexRound"
Me.cmdComplexRound.Size = New System.Drawing.Size(88, 38)
@@ -6436,7 +6538,7 @@ Partial Class ucrCalculator
'
Me.cmdComplexLog.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdComplexLog.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdComplexLog.Location = New System.Drawing.Point(279, 165)
+ Me.cmdComplexLog.Location = New System.Drawing.Point(279, 200)
Me.cmdComplexLog.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdComplexLog.Name = "cmdComplexLog"
Me.cmdComplexLog.Size = New System.Drawing.Size(79, 38)
@@ -6448,7 +6550,7 @@ Partial Class ucrCalculator
'
Me.cmdComplexSqrt.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdComplexSqrt.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdComplexSqrt.Location = New System.Drawing.Point(30, 165)
+ Me.cmdComplexSqrt.Location = New System.Drawing.Point(30, 200)
Me.cmdComplexSqrt.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdComplexSqrt.Name = "cmdComplexSqrt"
Me.cmdComplexSqrt.Size = New System.Drawing.Size(82, 38)
@@ -6848,7 +6950,7 @@ Partial Class ucrCalculator
'
Me.cmdListSQRT.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.cmdListSQRT.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdListSQRT.Location = New System.Drawing.Point(307, 53)
+ Me.cmdListSQRT.Location = New System.Drawing.Point(307, 52)
Me.cmdListSQRT.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdListSQRT.Name = "cmdListSQRT"
Me.cmdListSQRT.Size = New System.Drawing.Size(73, 38)
@@ -7281,7 +7383,7 @@ Partial Class ucrCalculator
'
Me.cmdWakefieldHelp.AutoSize = True
Me.cmdWakefieldHelp.ContextMenuStrip = Me.ContextMenuStripWakefield
- Me.cmdWakefieldHelp.Location = New System.Drawing.Point(968, 52)
+ Me.cmdWakefieldHelp.Location = New System.Drawing.Point(967, 43)
Me.cmdWakefieldHelp.Name = "cmdWakefieldHelp"
Me.cmdWakefieldHelp.Size = New System.Drawing.Size(113, 28)
Me.cmdWakefieldHelp.SplitMenuStrip = Me.ContextMenuStripWakefield
@@ -7374,21 +7476,21 @@ Partial Class ucrCalculator
Me.Controls.Add(Me.ucrSelectorForCalculations)
Me.Controls.Add(Me.ucrReceiverForCalculation)
Me.Controls.Add(Me.lblExpression)
- Me.Controls.Add(Me.grpSymbols)
- Me.Controls.Add(Me.grpCircular)
- Me.Controls.Add(Me.grpMaths)
- Me.Controls.Add(Me.grpProbabilty)
- Me.Controls.Add(Me.grpInteger)
- Me.Controls.Add(Me.grpTestString)
Me.Controls.Add(Me.grpModifier)
+ Me.Controls.Add(Me.grpTestString)
+ Me.Controls.Add(Me.grpSymbols)
Me.Controls.Add(Me.grpComplex)
Me.Controls.Add(Me.grpSummary)
- Me.Controls.Add(Me.grpWakefield)
Me.Controls.Add(Me.grpTransform)
Me.Controls.Add(Me.grpLogical)
Me.Controls.Add(Me.grpDates)
Me.Controls.Add(Me.grpHydroGOF)
Me.Controls.Add(Me.grpFactor)
+ Me.Controls.Add(Me.grpWakefield)
+ Me.Controls.Add(Me.grpCircular)
+ Me.Controls.Add(Me.grpMaths)
+ Me.Controls.Add(Me.grpProbabilty)
+ Me.Controls.Add(Me.grpInteger)
Me.Name = "ucrCalculator"
Me.Size = New System.Drawing.Size(1123, 572)
Me.grpBasic.ResumeLayout(False)
@@ -7465,16 +7567,6 @@ Partial Class ucrCalculator
Friend WithEvents cmd0 As Button
Friend WithEvents cmd1 As Button
Friend WithEvents grpDates As GroupBox
- Friend WithEvents cmdDmy As Button
- Friend WithEvents cmdDay As Button
- Friend WithEvents cmdMonth As Button
- Friend WithEvents cmdYear As Button
- Friend WithEvents cmdDate As Button
- Friend WithEvents cmdYday As Button
- Friend WithEvents cmdWday As Button
- Friend WithEvents cmdMdy As Button
- Friend WithEvents cmdYmd As Button
- Friend WithEvents cmdLeap As Button
Friend WithEvents grpTransform As GroupBox
Friend WithEvents cmdCumSum As Button
Friend WithEvents cmdCumMin As Button
@@ -7614,12 +7706,12 @@ Partial Class ucrCalculator
Friend WithEvents ttCalculator As ToolTip
Friend WithEvents cmdWakefield_Year As Button
Friend WithEvents cmdValid As Button
- Friend WithEvents cmdWakefield_Upper As Button
+ Friend WithEvents cmdWakefieldUpper As Button
Friend WithEvents cmdString As Button
Friend WithEvents cmdState As Button
Friend WithEvents cmdSpeed As Button
Friend WithEvents cmdSmokes As Button
- Friend WithEvents cmdSex As Button
+ Friend WithEvents cmdWakefieldTimes As Button
Friend WithEvents cmdSex_Inclusive As Button
Friend WithEvents cmdGender As Button
Friend WithEvents cmdSentence As Button
@@ -7634,9 +7726,9 @@ Partial Class ucrCalculator
Friend WithEvents cmdMarital As Button
Friend WithEvents cmdLorem_ipsum As Button
Friend WithEvents cmdGpa As Button
- Friend WithEvents cmdEla As Button
+ Friend WithEvents cmdWakefieldMinute As Button
Friend WithEvents cmdMath As Button
- Friend WithEvents cmdLevel As Button
+ Friend WithEvents cmdWakefieldLower As Button
Friend WithEvents cmdLanguage As Button
Friend WithEvents cmdIq As Button
Friend WithEvents cmdInternet_Browser As Button
@@ -7648,9 +7740,9 @@ Partial Class ucrCalculator
Friend WithEvents cmdDob As Button
Friend WithEvents cmdDna As Button
Friend WithEvents cmdDice As Button
- Friend WithEvents cmdDied As Button
+ Friend WithEvents cmdGrade_Letter As Button
Friend WithEvents cmdDeath As Button
- Friend WithEvents cmdDate_Stamp As Button
+ Friend WithEvents cmdWakefieldDates As Button
Friend WithEvents cmdPrimary As Button
Friend WithEvents cmdColor As Button
Friend WithEvents cmdCoin As Button
@@ -7670,12 +7762,6 @@ Partial Class ucrCalculator
Friend WithEvents cmdLogistic As Button
Friend WithEvents cmdLogit As Button
Friend WithEvents cmdAtan2 As Button
- Friend WithEvents cmdQuarter As Button
- Friend WithEvents cmdD_In_M As Button
- Friend WithEvents cmdAm As Button
- Friend WithEvents cmdSec As Button
- Friend WithEvents cmdHour As Button
- Friend WithEvents cmdminutes As Button
Friend WithEvents grpCircular As GroupBox
Friend WithEvents cmdCircMedian As Button
Friend WithEvents cmdCircMean As Button
@@ -7733,7 +7819,7 @@ Partial Class ucrCalculator
Friend WithEvents cmdQbinom As Button
Friend WithEvents cmdQbirth As Button
Friend WithEvents cmdQbeta As Button
- Friend WithEvents cmdLinkert7 As Button
+ Friend WithEvents cmdLikert7 As Button
Friend WithEvents cmdEncodeb As Button
Friend WithEvents cmdSquishb As Button
Friend WithEvents cmdExtract2 As Button
@@ -7790,9 +7876,6 @@ Partial Class ucrCalculator
Friend WithEvents cmdSsq As Button
Friend WithEvents cmdRsr As Button
Friend WithEvents ucrSaveResultInto As ucrSave
- Friend WithEvents cmdTime As Button
- Friend WithEvents cmdDateTime As Button
- Friend WithEvents cmdPm As Button
Friend WithEvents cmdLenth As Button
Friend WithEvents cmdGlue As Button
Friend WithEvents cmdTrunck As Button
@@ -8027,4 +8110,31 @@ Partial Class ucrCalculator
Friend WithEvents MathsCircularToolStripMenuItem As ToolStripMenuItem
Friend WithEvents cmdComplexi As Button
Friend WithEvents cmdAsComplex As Button
+ Friend WithEvents cmdYmdHms As Button
+ Friend WithEvents cmdYmdHm As Button
+ Friend WithEvents cmdAsDate As Button
+ Friend WithEvents cmdAsTime As Button
+ Friend WithEvents cmdYmdH As Button
+ Friend WithEvents cmdPm As Button
+ Friend WithEvents cmdTime As Button
+ Friend WithEvents cmdDateTime As Button
+ Friend WithEvents cmdQuarter As Button
+ Friend WithEvents cmdD_In_M As Button
+ Friend WithEvents cmdAm As Button
+ Friend WithEvents cmdSec As Button
+ Friend WithEvents cmdHour As Button
+ Friend WithEvents cmdMinutes As Button
+ Friend WithEvents cmdDmy As Button
+ Friend WithEvents cmdDay As Button
+ Friend WithEvents cmdMonth As Button
+ Friend WithEvents cmdYear As Button
+ Friend WithEvents cmdDate As Button
+ Friend WithEvents cmdYday As Button
+ Friend WithEvents cmdWday As Button
+ Friend WithEvents cmdMdy As Button
+ Friend WithEvents cmdYmd As Button
+ Friend WithEvents cmdLeap As Button
+ Friend WithEvents cmdComplexAsin As Button
+ Friend WithEvents cmdComplexAtan As Button
+ Friend WithEvents cmdComplexAcos As Button
End Class
diff --git a/instat/ucrCalculator.resx b/instat/ucrCalculator.resx
index 88d8710e379..b436018d56a 100644
--- a/instat/ucrCalculator.resx
+++ b/instat/ucrCalculator.resx
@@ -163,6 +163,6 @@
759, 103
- 182
+ 99
\ No newline at end of file
diff --git a/instat/ucrCalculator.vb b/instat/ucrCalculator.vb
index ff43b949970..978f359712b 100644
--- a/instat/ucrCalculator.vb
+++ b/instat/ucrCalculator.vb
@@ -1,4 +1,4 @@
-' R- Instat
+'R- Instat
' Copyright (C) 2015-2017
'
' This program is free software: you can redistribute it and/or modify
@@ -73,35 +73,35 @@ Public Class ucrCalculator
ttCalculator.SetToolTip(cmdRound, "round(x) to round to whole numbers, round(x,2) to round to 2 decimal places, round(x,-2) to round to the nearest 100")
ttCalculator.SetToolTip(cmdSiginf, "signif(x,3) to round to 3 significant figures")
- ttCalculator.SetToolTip(cmdSortF, "Sorts a vector into ascending or descending order. For example sort(c(5,7,4,4,3)) = (3,4,4,5,7)")
- ttCalculator.SetToolTip(cmdScale, "Centre and scale the data - usually by producing (x - xbar)/s")
- ttCalculator.SetToolTip(cmdMASSFractions, "Changes decimal data into a character variable with fractions. So 1.5 becomes 3/2, 0.25 becomes 1/4 etc.")
- ttCalculator.SetToolTip(cmdDecimals, "The inverse of the fractions key. So 3/2 becomes 1.5, 1/4 becomes 0.25 etc.")
- ttCalculator.SetToolTip(cmdLag, "Shift a variable down. For example lag(1:5) = (NA,1,2,3,4); lag(1:5,3) = (NA,NA,NA, 1,2)")
- ttCalculator.SetToolTip(cmdLead, "Shift a variable up. For example lead(1:5) = (2,3,4,5,NA); lead(1:5;3) = (4,5, NA,NA,NA)")
- ttCalculator.SetToolTip(cmdDiff, "Difference between successive elements. For example diff(c(1,4,3,7)) = (NA 3,-1,4)")
- ttCalculator.SetToolTip(cmdRev, "Reverse a variable. For example rev(c(1,2,3,4,5)) =(5,4,3,2,1)")
- ttCalculator.SetToolTip(cmdPMax, " Maximum of a set of variables. For examples pmax(c(1,3,5),c(6,4,2)) = (6,4,5)")
- ttCalculator.SetToolTip(cmdPMin, "Minimum of a set of variables. For examples pmin(c(1,3,5),c(6,4,2)) = (1,3,2)")
- ttCalculator.SetToolTip(cmdCumMax, "Cumulative maxima. For example cummax(c(3,2,1,4,0)) = (3,3,3,4,4)")
- ttCalculator.SetToolTip(cmdMovMax, "Moving (or rolling) maxima. For example rollmax(x=c(3,2,1,4,0) ,3,fill=NA, align=""right"") = (NA,NA, 3,4,4)")
- ttCalculator.SetToolTip(cmdCumSum, "Cumulative sums. For example cumsum(c(3,2,1,4,0)) = (3,5,6,10,10)")
- ttCalculator.SetToolTip(cmdCumProd, "Cumulative products. For example cumprod(c(2,3,5,7)) = (2,6,30,210)")
- ttCalculator.SetToolTip(cmdMovProd, "Moving products Fror example rollapply(c(2,3,5,7,11),width=3,fill=NA, FUN=prod) = (NA,30,105,385,NA)")
- ttCalculator.SetToolTip(cmdCumMean, "Cumulative means. For example cummean(c(3,2,1,4,0)) = (3,2.5,2,2.5,2)")
- ttCalculator.SetToolTip(cmdCumMin, "Cumulative minima. For example cummin(c(3,2,1,4,0)) = (3,2.,1,1,0)")
- ttCalculator.SetToolTip(cmdMovSum, "Moving (or rolling) totals. For example rollsum(c(3,2,1,4,0) ,3,fill=NA, align=""left"") = (6,7,5,NA,NA)")
- ttCalculator.SetToolTip(cmdMovMean, "Moving (or rolling) mean. For example rollmean(c(3,2,1,6,2) ,3,fill=NA) = (NA,2,3,3,NA)")
- ttCalculator.SetToolTip(cmMovMed, "Moving (or rolling) medians. For example rollmedian(c(3,2,1,6,2) ,3,fill=NA) = (NA,2,2,2,NA)")
- ttCalculator.SetToolTip(cmdMovmin, "Moving (or rolling) minima. For example rollapply(c(3,2,1,6,2),width=3,fill=NA, FUN=min) = (NA,1,1,1,NA)")
- ttCalculator.SetToolTip(cmdNtile, " Use ranks to divide into (almost) equal sized groups. For example ntile(c(15,11,13,12,NA,12),2) = (2,1,2,1,NA,1)")
- ttCalculator.SetToolTip(cmdCumdist, "Proportion of values less than or equal to the current rank. For example cume_dist(c(2,4,6,8,3)) = (0.2, 0.6, 0.8, 1.0, 0.4)")
- ttCalculator.SetToolTip(cmdRowRank, "Row numbers as ranks. For example :row_number(c(15,11,13,12,NA,12)) = (5,1,3,2,NA,3)")
- ttCalculator.SetToolTip(cmdPercentRank, "Rescale of minimum ranks to [0,1]. For example percent_rank(c(15,11,13,12,NA,12)) = (1,0,0.75,0.25,NA,0.25)")
- ttCalculator.SetToolTip(cmdDRank, "Dense ranks. For example d_rank(c(15,11,13,12,NA,12)) = (4,1,3,2,NA,2)")
- ttCalculator.SetToolTip(cmdMRank, " Minimum ranks. For example m_rank(c(15,11,13,12,NA,12)) = (5,1,4,2,NA,2)")
- ttCalculator.SetToolTip(cmdNafill, "Fills missing values at the start, middle and end. For example na.fill(c(NA,2,NA,4,5,NA),fill=""extend"") = (2,2,3,4,5,5); while fill=c(15,""extend"",NA) = (15,2,3,4,5,NA)")
- ttCalculator.SetToolTip(cmdNaapprox, "Linear interpolation of missing values. For example na.approx(c(5,NA,NA,2,2,NA,4,7,NA),maxgap=1,na.rm=FALSE) = (5,NA,NA,2,2,3,4,7,NA)")
+ ttCalculator.SetToolTip(cmdSortF, "sorts a vector into ascending or descending order. For example sort(c(5,7,4,4,3)) = (3,4,4,5,7)")
+ ttCalculator.SetToolTip(cmdScale, "centre and scale the data - usually by producing (x - xbar)/s")
+ ttCalculator.SetToolTip(cmdMASSFractions, "changes decimal data into a character variable with fractions. So 1.5 becomes 3/2, 0.25 becomes 1/4 etc.")
+ ttCalculator.SetToolTip(cmdDecimals, "the inverse of the fractions key. So 3/2 becomes 1.5, 1/4 becomes 0.25 etc.")
+ ttCalculator.SetToolTip(cmdLag, "shift a variable down. For example lag(1:5) = (NA,1,2,3,4); lag(1:5,3) = (NA,NA,NA, 1,2)")
+ ttCalculator.SetToolTip(cmdLead, "shift a variable up. For example lead(1:5) = (2,3,4,5,NA); lead(1:5;3) = (4,5, NA,NA,NA)")
+ ttCalculator.SetToolTip(cmdDiff, "difference between successive elements. For example diff(c(1,4,3,7)) = (NA 3,-1,4)")
+ ttCalculator.SetToolTip(cmdRev, "reverse a variable. For example rev(c(1,2,3,4,5)) =(5,4,3,2,1)")
+ ttCalculator.SetToolTip(cmdPMax, " maximum of a set of variables. For examples pmax(c(1,3,5),c(6,4,2)) = (6,4,5)")
+ ttCalculator.SetToolTip(cmdPMin, "minimum of a set of variables. For examples pmin(c(1,3,5),c(6,4,2)) = (1,3,2)")
+ ttCalculator.SetToolTip(cmdCumMax, "cumulative maxima. For example cummax(c(3,2,1,4,0)) = (3,3,3,4,4)")
+ ttCalculator.SetToolTip(cmdMovMax, "moving (or rolling) maxima. For example rollmax(x=c(3,2,1,4,0) ,3,fill=NA, align=""right"") = (NA,NA, 3,4,4)")
+ ttCalculator.SetToolTip(cmdCumSum, "cumulative sums. For example cumsum(c(3,2,1,4,0)) = (3,5,6,10,10)")
+ ttCalculator.SetToolTip(cmdCumProd, "cumulative products. For example cumprod(c(2,3,5,7)) = (2,6,30,210)")
+ ttCalculator.SetToolTip(cmdMovProd, "moving products Fror example rollapply(c(2,3,5,7,11),width=3,fill=NA, FUN=prod) = (NA,30,105,385,NA)")
+ ttCalculator.SetToolTip(cmdCumMean, "cumulative means. For example cummean(c(3,2,1,4,0)) = (3,2.5,2,2.5,2)")
+ ttCalculator.SetToolTip(cmdCumMin, "cumulative minima. For example cummin(c(3,2,1,4,0)) = (3,2.,1,1,0)")
+ ttCalculator.SetToolTip(cmdMovSum, "moving (or rolling) totals. For example rollsum(c(3,2,1,4,0) ,3,fill=NA, align=""left"") = (6,7,5,NA,NA)")
+ ttCalculator.SetToolTip(cmdMovMean, "moving (or rolling) mean. For example rollmean(c(3,2,1,6,2) ,3,fill=NA) = (NA,2,3,3,NA)")
+ ttCalculator.SetToolTip(cmMovMed, "moving (or rolling) medians. For example rollmedian(c(3,2,1,6,2) ,3,fill=NA) = (NA,2,2,2,NA)")
+ ttCalculator.SetToolTip(cmdMovmin, "moving (or rolling) minima. For example rollapply(c(3,2,1,6,2),width=3,fill=NA, FUN=min) = (NA,1,1,1,NA)")
+ ttCalculator.SetToolTip(cmdNtile, " use ranks to divide into (almost) equal sized groups. For example ntile(c(15,11,13,12,NA,12),2) = (2,1,2,1,NA,1)")
+ ttCalculator.SetToolTip(cmdCumdist, "proportion of values less than or equal to the current rank. For example cume_dist(c(2,4,6,8,3)) = (0.2, 0.6, 0.8, 1.0, 0.4)")
+ ttCalculator.SetToolTip(cmdRowRank, "row numbers as ranks. For example :row_number(c(15,11,13,12,NA,12)) = (5,1,3,2,NA,3)")
+ ttCalculator.SetToolTip(cmdPercentRank, "rescale of minimum ranks to [0,1]. For example percent_rank(c(15,11,13,12,NA,12)) = (1,0,0.75,0.25,NA,0.25)")
+ ttCalculator.SetToolTip(cmdDRank, "dense ranks. For example d_rank(c(15,11,13,12,NA,12)) = (4,1,3,2,NA,2)")
+ ttCalculator.SetToolTip(cmdMRank, " minimum ranks. For example m_rank(c(15,11,13,12,NA,12)) = (5,1,4,2,NA,2)")
+ ttCalculator.SetToolTip(cmdNafill, "fills missing values at the start, middle and end. For example na.fill(c(NA,2,NA,4,5,NA),fill=""extend"") = (2,2,3,4,5,5); while fill=c(15,""extend"",NA) = (15,2,3,4,5,NA)")
+ ttCalculator.SetToolTip(cmdNaapprox, "linear interpolation of missing values. For example na.approx(c(5,NA,NA,2,2,NA,4,7,NA),maxgap=1,na.rm=FALSE) = (5,NA,NA,2,2,3,4,7,NA)")
ttCalculator.SetToolTip(cmdNasplin, "Spline interpolation of missing values. For example na.spline(c(NA,NA,NA,2,2,NA,4,7,NA),maxgap=2,na.rm=FALSE) = (NA,NA,NA,2,2,2.5,4,7,12)")
ttCalculator.SetToolTip(cmdNaest, "Missing values as the mean (usually) overall or with a factor. For example na.aggregate(c(NA,NA,NA,2,2,NA,4,7,NA),maxgap=2,na.rm=FALSE) = (NA,NA,NA,2,2,3.75,4,7,3.75)")
@@ -135,14 +135,14 @@ Public Class ucrCalculator
ttCalculator.SetToolTip(cmdPf, "F probabilities. For example pf(2,1,10) = 0.8123; pf(2,50,50) = 0.9921")
ttCalculator.SetToolTip(cmdQnorm, "qnormal quantiles. For example qnorm(0.05) = -1.6449; qnorm(0.9772, 100,15) = 130")
- ttCalculator.SetToolTip(cmdPbirth, "Simultaneous birthday probabilities. For example pbirthday(10) = 0.1169 ; pbirthday(50) = 0.97")
- ttCalculator.SetToolTip(cmdQbirth, "Simultaneous birthday quantiles. For example qbirthday(0.5) = 23, qbirthday(0.99) = 57")
- ttCalculator.SetToolTip(cmdPbinom, "Binomial probabilities. For example pbinom(3,5,0.4) = 0.0.913")
- ttCalculator.SetToolTip(cmdQbinom, " Binomial quantiles. For example qbinom(0.9,5,0.4) = 3")
+ ttCalculator.SetToolTip(cmdPbirth, "simultaneous birthday probabilities. For example pbirthday(10) = 0.1169 ; pbirthday(50) = 0.97")
+ ttCalculator.SetToolTip(cmdQbirth, "simultaneous birthday quantiles. For example qbirthday(0.5) = 23, qbirthday(0.99) = 57")
+ ttCalculator.SetToolTip(cmdPbinom, "binomial probabilities. For example pbinom(3,5,0.4) = 0.0.913")
+ ttCalculator.SetToolTip(cmdQbinom, " binomial quantiles. For example qbinom(0.9,5,0.4) = 3")
ttCalculator.SetToolTip(cmdPpois, "Poisson probabilities. For example ppois(8, 5) = 0.93")
ttCalculator.SetToolTip(cmdQpois, "Poisson quantiles. For example qpois(0.9, 5) = 8")
- ttCalculator.SetToolTip(cmdPnbin, "Negative binomial probabilities. For example pnbinom(4,1,0.4) = 0.922 (geometric); pnbinom(13,5,0.4) = 0.9058")
- ttCalculator.SetToolTip(cmdQnbin, "Negative binomial quantiles. For example qnbinom(0.9,1,0.4) = 4 (geometric); qnbinom(0.9, 5,0.4) = 13")
+ ttCalculator.SetToolTip(cmdPnbin, "negative binomial probabilities. For example pnbinom(4,1,0.4) = 0.922 (geometric); pnbinom(13,5,0.4) = 0.9058")
+ ttCalculator.SetToolTip(cmdQnbin, "negative binomial quantiles. For example qnbinom(0.9,1,0.4) = 4 (geometric); qnbinom(0.9, 5,0.4) = 13")
ttCalculator.SetToolTip(cmdFact, "factorial. For example factorial(4) = 4*3*2*1 = 24; factorial(3.5) = gamma(4.5) = 11.63")
ttCalculator.SetToolTip(cmdLfact, "log factorial. For example lfactorial(400) = 2001")
ttCalculator.SetToolTip(cmdChoose, "binomial coefficient. For example choose(7,4) = 7!/(4!*3!) = 35")
@@ -178,11 +178,12 @@ Public Class ucrCalculator
ttCalculator.SetToolTip(cmdSin, "sine of angle in radians. For example sin(pi/2) = sin(rad(90)) = 1.")
ttCalculator.SetToolTip(cmdAsin, "angle corresponding to a given sine (in the range (0 to pi). For example asin(1) = 1.57 = pi/2.")
ttCalculator.SetToolTip(cmdFloor, "integer below the given value. For example floor(3.5)=3; floor(-3.5) = -4.")
- ttCalculator.SetToolTip(cmdRad, "Change from degrees to radians. For example rad(90) = 2*pi * 90/360 = 1.57 ( = pi/2)")
+ ttCalculator.SetToolTip(cmdRad, "change from degrees to radians. For example rad(90) = 2*pi * 90/360 = 1.57 ( = pi/2)")
ttCalculator.SetToolTip(cmdLogTen, "logarithm to base 10. For example log10(1000) =3 (=10^3)")
ttCalculator.SetToolTip(cmdTan, " tangent of angle in radians. For example tan(pi/4) = sin(pi/4)/cos(pi/4) = tan(rad(45)) = 1")
ttCalculator.SetToolTip(cmdAtan, "angle corresponding to a given tangent (in the range 0 to pi). For example atan(1) = 0.7854 (= pi/4); deg(atan(1)) = 45.")
ttCalculator.SetToolTip(cmdTrunc, "truncates the values towards 0. So trunc(3.5) = 3, trunc(-3.5)= -3")
+ '----------------------------------------------------------------------------------------------------
ttCalculator.SetToolTip(cmdUpper, "Change to upper case. For example str_to_upper(""Dr. Foster"") gives ""DR. FOSTER""")
ttCalculator.SetToolTip(cmdLower, "Change to lower case. For example str_to_lower(""Dr. Foster"") gives ""dr. foster""")
@@ -279,7 +280,7 @@ Public Class ucrCalculator
' Complex keyboard tooltips
ttCalculator.SetToolTip(cmdComplexPi, "pi = 3.14159")
ttCalculator.SetToolTip(cmdComplexi, "i is defined as the square root of -1. So sqrt(as.complex(-1)) = 0 + 1i")
- ttCalculator.SetToolTip(cmdComplex, "Construct a complex number. For example complex(3, 2) gives 3 + 2i.")
+ ttCalculator.SetToolTip(cmdComplex, "Generate a complex variable. For example complex(3, 2:4,1.5) gives 2+1.5i, 3+1.5i, 4+1.5i")
ttCalculator.SetToolTip(cmdAsComplex, "Define a variable as complex. For example as.complex(-1) gives 1 + 0i")
ttCalculator.SetToolTip(cmdReal, "The real part of a complex number. For example Re(3 + 2i) gives 3.")
ttCalculator.SetToolTip(cmdImaginary, "The imaginary part of a complex number or variable. For example Im(3 + 2i) gives 2.")
@@ -289,53 +290,167 @@ Public Class ucrCalculator
ttCalculator.SetToolTip(cmdComplexRad, "Change from degrees to radians. For example rad(90 + 180i) gives (1.571 + 3.142i)")
ttCalculator.SetToolTip(cmdComplexDeg, " Change from radians to degrees. For example deg(pi/2 + 3.142i) gives (90 + 180i)")
ttCalculator.SetToolTip(cmdComplexSqrt, "Square root. For example sqrt(-9 + 0i) gives (0 + 3i) or just 3i. sqrt(-9 + 2i) gives 0.331 + 3.018i)")
- 'to add ttCalculator.SetToolTip(cmdComplexExp, "The exponential function. For example exp(3 + 2i) gives")
+ ttCalculator.SetToolTip(cmdComplexExp, "exponential function. For example exp(1 + 2i) gives -1.131+2.472i")
ttCalculator.SetToolTip(cmdComplexRound, "round(pi/2 + 3.14259i) gives 2 + 3i) so rounds to whole numbers. round(pi/2 + 3.14259i, 2) gives 1.57 + 3.14i, so rounds to 2 decimals.")
ttCalculator.SetToolTip(cmdComplexSignif, "Rounds to give the specified number off digits in the larger of the components. For example signif(0.424 + 511.38i, 3) gives (0 + 511i)")
+ ttCalculator.SetToolTip(cmdComplexSin, "sine of the angle in radians For example sin(1-1i) gives (1.2985-0.635i)")
+ ttCalculator.SetToolTip(cmdComplexCos, "cosine of the angle in radians. For example cos(1-1i) gives (0.8337+0.9889i)")
+ ttCalculator.SetToolTip(cmdComplexTan, "tangent of the angle in radians. For example tan(1-i) gives (0.272-1.084i)")
+ ttCalculator.SetToolTip(cmdComplexAsin, "arcsine, or inverse of the sine. It is the angle in radians corresponding to a given sine. For example asin(1.2985-0.635i) gives (1-1i)")
+ ttCalculator.SetToolTip(cmdComplexAcos, "arccos, or inverse of the cosine. It is the angle corresponding to a given cos. For example acos(0.8337+0.9889i) gives (1-1i)")
+ ttCalculator.SetToolTip(cmdComplexAtan, "arctan or inverse of the tangent. It is the angle corresponding to a given tan. For example atan(0.272-1.084i) gives (1-1i)")
+ ttCalculator.SetToolTip(cmdComplexSinH, " hyperbolic sin of a number in radians (asinh also exists)")
+ ttCalculator.SetToolTip(cmdComplexCosH, "hyperbolic cosine of a number in radians (acosh also exists)")
+ ttCalculator.SetToolTip(cmdComplexTanH, "hyperbolic tangent of a number in radians (atanh also exists)")
+ ttCalculator.SetToolTip(cmdComplexLog, "natural logarithm. For example log(1 + 2i) gives 0.805+1.107i")
'Hydro GOF keyboard tooltips
ttCalculator.SetToolTip(cmdBr2, "r-squared times the slope of the regression line between sim and obs")
ttCalculator.SetToolTip(cmdCp, "coefficent of persistence between sim and obs")
ttCalculator.SetToolTip(cmdD, "Index of agreement between sim and obs")
ttCalculator.SetToolTip(cmdKGE, "Kling-Gupta efficiency between sim and obs")
- ttCalculator.SetToolTip(cmdMae, "Mean absolute error between sim and obs")
- ttCalculator.SetToolTip(cmdMd, "Modified index of agreement between sim and obsmNSE")
- ttCalculator.SetToolTip(cmdMe, "Mean error between sim and obs")
- ttCalculator.SetToolTip(cmdmNSE, "Modified Nash-Sutcliffe efficiency between sim and obs")
- ttCalculator.SetToolTip(cmdMse, "Mean squared error between sim and obs")
- ttCalculator.SetToolTip(cmdNrmse, "Normalized root mean square error between sim and obs")
+ ttCalculator.SetToolTip(cmdMae, "mean absolute error between sim and obs")
+ ttCalculator.SetToolTip(cmdMd, "modified index of agreement between sim and obsmNSE")
+ ttCalculator.SetToolTip(cmdMe, "mean error between sim and obs")
+ ttCalculator.SetToolTip(cmdmNSE, "modified Nash-Sutcliffe efficiency between sim and obs")
+ ttCalculator.SetToolTip(cmdMse, "mean squared error between sim and obs")
+ ttCalculator.SetToolTip(cmdNrmse, "normalized root mean square error between sim and obs")
ttCalculator.SetToolTip(cmdNSE, "Nash-Sutcliffe efficiency between sim and obs")
- ttCalculator.SetToolTip(cmdPbias, "Percent bias between sim and obs")
- ttCalculator.SetToolTip(cmdPbiasfdc, "Percent bias in the slope of the midsegment of the flow duration curve")
- ttCalculator.SetToolTip(cmdRd, "Relative index of agreement (d) between sim and obs. (Value is between 0 and 1)")
- ttCalculator.SetToolTip(cmdRmse, "Root mean square error between sim and obs, so the standard deviation of the model prediction error")
- ttCalculator.SetToolTip(cmdRNSE, "Relative Nash-Sutcliffe efficiency between sim and obs")
- ttCalculator.SetToolTip(cmdRPearson, "Correlation between sim and obs")
- ttCalculator.SetToolTip(cmdRSD, "Ratio of standard deviations between sim and obs")
- ttCalculator.SetToolTip(cmdRsr, "Ratio of the root mean square error between sim and obs to the standard deviation of obs")
- ttCalculator.SetToolTip(cmdSsq, "Sum of squared residuals between sim and obs")
- ttCalculator.SetToolTip(cmdVE, " Volumetric efficiency between sim and obs (Value is between 0 and 1)")
+ ttCalculator.SetToolTip(cmdPbias, "percent bias between sim and obs")
+ ttCalculator.SetToolTip(cmdPbiasfdc, "percent bias in the slope of the midsegment of the flow duration curve")
+ ttCalculator.SetToolTip(cmdRd, "relative index of agreement (d) between sim and obs. (Value is between 0 and 1)")
+ ttCalculator.SetToolTip(cmdRmse, "root mean square error between sim and obs, so the standard deviation of the model prediction error")
+ ttCalculator.SetToolTip(cmdRNSE, "relative Nash-Sutcliffe efficiency between sim and obs")
+ ttCalculator.SetToolTip(cmdRPearson, "correlation between sim and obs")
+ ttCalculator.SetToolTip(cmdRSD, "ratio of standard deviations between sim and obs")
+ ttCalculator.SetToolTip(cmdRsr, "ratio of the root mean square error between sim and obs to the standard deviation of obs")
+ ttCalculator.SetToolTip(cmdSsq, "sum of squared residuals between sim and obs")
+ ttCalculator.SetToolTip(cmdVE, " volumetric efficiency between sim and obs (Value is between 0 and 1)")
+
+ 'Wakefield Tooltips
+ ttCalculator.SetToolTip(cmdAge, "Sample of ages, with default from 20 to 35")
+ ttCalculator.SetToolTip(cmdAnimal, "Sample of animals, with default of 10 from a list of 591 animals!")
+ ttCalculator.SetToolTip(cmdPet, "Sample of pets. Default is dog, cat, none, bird, horse, with given probabilities")
+ ttCalculator.SetToolTip(cmdAnswer, " Sample of No or Yes, with defaults of equal probability")
+ ttCalculator.SetToolTip(cmdCar, "Sample of cars, with datasets mtcars makes as default")
+ ttCalculator.SetToolTip(cmdChildren, "Sample of number of children, with default 0 to 10 and defined probabilities")
+ ttCalculator.SetToolTip(cmdCoin, "Sample giving heads or tails with default of equal probability")
+ ttCalculator.SetToolTip(cmdColor, "Sample by default from the 657 colours in the grDevices package")
+ ttCalculator.SetToolTip(cmdPrimary, "Sample by default from the colours, red, green, blue, yellow, black, and white. Are those your primary colours?")
+ ttCalculator.SetToolTip(cmdWakefieldDates, " Sample of dates with default being dates in order, by month, for the past year")
+ ttCalculator.SetToolTip(cmdDeath, "Sample giving FALSE/TRUE with default being equally likely")
+ ttCalculator.SetToolTip(cmdDice, "Sample with default being equally likely from a 6 sided dice")
+ ttCalculator.SetToolTip(cmdDna, "Sample with default being equally likely from Guanine, Adenine, Thymine, Cytosine")
+ ttCalculator.SetToolTip(cmdDob, "Sample of dates, with default being for 2 years, starting 15 years ago")
+ ttCalculator.SetToolTip(cmdDummy, "Sample of 0 and 1, with default equally likely")
+ ttCalculator.SetToolTip(cmdEducation, "Sample of 12 education levels from No education to doctorate with defined probabilities")
+ ttCalculator.SetToolTip(cmdEmployment, "Sample of 5 employment levels, namely: full-time, part-time, unemployed, retired, student")
+ ttCalculator.SetToolTip(cmdEye, "Sample of 5 eye colours, namely: brown, blue green, hazel, grey")
+ ttCalculator.SetToolTip(cmdGrade_Level, "Sample of grade levels from 1 to 12")
+ ttCalculator.SetToolTip(cmdGrade, "Sample from normal disribution with default mean 88 and sd 4. See also grade_letter and gpa")
+ ttCalculator.SetToolTip(cmdGrade_Letter, "Sample from normal distribution with default mean 88 snd sd 4, with fixed translation into A+ to F")
+ ttCalculator.SetToolTip(cmdGpa, "Sample from normal distribution with default mean 88 and sd 4, with fixed translation into gpa of 4 to 0")
+ ttCalculator.SetToolTip(cmdGroup, "Sample generating 2 groups, with default of random assignment to Control and Treatment, with equal probabilities")
+ ttCalculator.SetToolTip(cmdHair, "Sample with default of 4 hair colours, brown, black, blonde, red, and defined probabilities")
+ ttCalculator.SetToolTip(cmdHeight, "Sample from normal distribution with default mean 69, and sd 3.75, min 1, and no specified max, rounded to no decimals")
+ ttCalculator.SetToolTip(cmdIncome, "Sample from a gamma distribution with mean 40,000 and shape 2. (Multiply the result to change the mean)")
+ ttCalculator.SetToolTip(cmdInternet_Browser, "Sample from ""Which browser do you use?"" with Chrome, IE, Firefox, Safari, Opera, Android, being the options")
+ ttCalculator.SetToolTip(cmdIq, "Sample from normal distribution with default of mean 100 and sd 15 - not 10 as provided by the package")
+ ttCalculator.SetToolTip(cmdLanguage, "Sample of world's languages with default being list of 99 languages, provided, together with their proportions")
+ ttCalculator.SetToolTip(cmdWakefieldLower, "Sample of single letters, with default being one of a,b,c,d,e")
+ ttCalculator.SetToolTip(cmdMath, "Sample of integers with default of 1 to 4, and probabilities based on New York grading in maths for Grades 3 to 8 children. (Called level instead if equally likely)")
+ ttCalculator.SetToolTip(cmdWakefieldMinute, "Sample of minutes as H:M:S time elements. (Tweak command to hours or seconds if needed)")
+ ttCalculator.SetToolTip(cmdLikert, "Sample from 5-point scale, ranging from strongly agree to strongly disagree, with default of equal probabilities")
+ ttCalculator.SetToolTip(cmdLorem_ipsum, "Provides random gibberish text, based on Latin")
+ ttCalculator.SetToolTip(cmdMarital, "Sample with default of 5 categories, Married, Divorced, Widowed, Separated, Never Married, equally likely")
+ ttCalculator.SetToolTip(cmdMilitary, "Sample with default of 5 categories, Army, etc, and proportions to match US military")
+ ttCalculator.SetToolTip(cmdWakefield_Month, "Sample of months with default using full names for all months and equal proportions")
+ ttCalculator.SetToolTip(cmdName, "Sample of names, with default from provided list of 95,025 different gender-neutral names, (so sampled without replacement)")
+ ttCalculator.SetToolTip(cmdNormal, "Sample from normal distribution, with default being standard normal, (mean 0, sd 1) and no min or max values specified")
+ ttCalculator.SetToolTip(cmdPolitical, "Sample of political parties with default being 5 categories based on US registered voters")
+ ttCalculator.SetToolTip(cmdRace, "Sample with default of 8 races (white, to Hawaiaan) and US proportions")
+ ttCalculator.SetToolTip(cmdReligion, "Sample with default of 8 religions and world ratios of numbers in each")
+ ttCalculator.SetToolTip(cmdSat, "Sample of SAT scores. Normal distribution and default changed from package values to give mean of 1000 and maximum of 1600")
+ ttCalculator.SetToolTip(cmdSentence, "Sample of sentences with default supplied list from 2012 presidential debate")
+ ttCalculator.SetToolTip(cmdGender, "Sample of male, female with default proportions matching gender makeup")
+ ttCalculator.SetToolTip(cmdSex_Inclusive, "Sample of male, female, intersex, with default proportion of transgender from 2011 report")
+ ttCalculator.SetToolTip(cmdWakefieldTimes, "Sample of times of day as H:M:S time elements")
+ ttCalculator.SetToolTip(cmdSmokes, "Logical (TRUE/FALSE) sample with default of 18% smokers")
+ ttCalculator.SetToolTip(cmdSpeed, "Sample from normal distribution, with default mean 55 and sd 10")
+ ttCalculator.SetToolTip(cmdState, "Sample with default from the 50 US states in proportion to their 2010 populations")
+ ttCalculator.SetToolTip(cmdString, "Sample with default of 10 random alphanumeric characters")
+ ttCalculator.SetToolTip(cmdWakefieldUpper, "Sample of single capital letter, with default being one of A, B, C, D, E")
+ ttCalculator.SetToolTip(cmdValid, "Logical (TRUE/FALSE) sample with default being equal probability")
+ ttCalculator.SetToolTip(cmdWakefield_Year, "Sample of years with default from 1996 to current year, with equal probability")
+ ttCalculator.SetToolTip(cmdLikert7, " Sample from 7-point scale, ranging from strongly agree to strongly disagree, with default of equal probabilities")
' circular keyboard tooltips
- ttCalculator.SetToolTip(cmdCircular, "Define a variable as circular. Specify whether the data are in radians (default), degrees, or hours.")
- ttCalculator.SetToolTip(cmdCircMean, "The circular mean. For example with 1, 2, 3, 6, mean(circular(c(1,2,3,6)) gives 1.51.")
- ttCalculator.SetToolTip(cmdCircSd, "The circular standard deviation. This is not the sqrt(circular.var). It is reasonably close to the ordinary sd for data in radians.")
- ttCalculator.SetToolTip(cmdCircRho, "The mean resultant length is between 0 and 1. Small values imply large (circular) variation. For 1,2,3,6 rho is 0.4036. With 1,2,3,4,5,6 it is 0.049.")
+ ttCalculator.SetToolTip(cmdCircular, "Define a variable as circular. Specify whether the data are in radians (default), degrees, or hours")
+ ttCalculator.SetToolTip(cmdCircMean, "The circular mean. For example with 1, 2, 3, 6, mean(circular(c(1,2,3,6)) gives 1.51")
+ ttCalculator.SetToolTip(cmdCircSd, "The circular standard deviation. This is not the sqrt(circular.var). It is reasonably close to the ordinary sd for data in radians")
+ ttCalculator.SetToolTip(cmdCircRho, "The mean resultant length is between 0 and 1. Small values imply large (circular) variation. For 1,2,3,6 rho is 0.4036. With 1,2,3,4,5,6 it is 0.049")
ttCalculator.SetToolTip(cmdCircRange, "Circular range is the shortest arc containing the data. For example with 1,2,3,6 gives 3.28 (6 is also -0.28 on circle from 0 to 2*pi)")
- ttCalculator.SetToolTip(cmdCircVar, "The circular variance is (1 - rho), so between 0 and 1, with small values implying low (circular) variation. For 1,2,3,6 var is 0.5964. With 1,2,3,4,5,6 var is 0.951.")
- ttCalculator.SetToolTip(cmdCircQuantiles, "Defined quantiles round the circle. With 0.5 it is the (circular) median, so is 1.5 for 1,2,3,6.")
- ttCalculator.SetToolTip(cmdCircMax, "Largest value round the circle. For example, for 1,2,3,6 max is 3.")
+ ttCalculator.SetToolTip(cmdCircVar, "The circular variance is (1 - rho), so between 0 and 1, with small values implying low (circular) variation. For 1,2,3,6 var is 0.5964. With 1,2,3,4,5,6 var is 0.951")
+ ttCalculator.SetToolTip(cmdCircQuantiles, "Defined quantiles round the circle. With 0.5 it is the (circular) median, so is 1.5 for 1,2,3,6")
+ ttCalculator.SetToolTip(cmdCircMax, "Largest value round the circle. For example, for 1,2,3,6 max is 3")
ttCalculator.SetToolTip(cmdCircMin, " Smallest value round the circle. For 1,2,3,6 min is 6. (values are from 6 (almost 2 * pi to 3)")
ttCalculator.SetToolTip(cmdCircQ1, "Lower quartile round the circle. For 1,2,3,6, q1 is 0.68")
- ttCalculator.SetToolTip(cmdCircQ3, "Upper quartile round the circle. For 1,2,3,6 q3 is 2.25.")
- ttCalculator.SetToolTip(cmdMedianHL, " Median using Hodges-Lehmann estimate. For example with 1,2,3,6, medianHL (and median) give 1.5.")
- ttCalculator.SetToolTip(cmdCircMedian, "Circular median. For example with 23 and 2 representing hours, median(circular(c(23,2), units=""hours"")) gives 0,5.")
- ttCalculator.SetToolTip(cmdAngVar, "The angular variance is twice the circular variance, so between 0 and 2.")
- ttCalculator.SetToolTip(cmdA1, "Ratio of Bessel functions for values of kappa parameter. Used in the von Mises (circular normal) distribution kappa = 0.9 gives A1 same as rho value for 1,2,3,6 data.")
- ttCalculator.SetToolTip(cmdAngDev, "The angular deviation is square root of the angular variance, so between 0 and sqrt(2).")
-
-
- Const strTooltipCmdLength = "number of observations: For example length(c(1,2,3,4,NA)) = 5 "
+ ttCalculator.SetToolTip(cmdCircQ3, "Upper quartile round the circle. For 1,2,3,6 q3 is 2.25")
+ ttCalculator.SetToolTip(cmdMedianHL, " Median using Hodges-Lehmann estimate. For example with 1,2,3,6, medianHL (and median) give 1.5")
+ ttCalculator.SetToolTip(cmdCircMedian, "Circular median. For example with 23 and 2 representing hours, median(circular(c(23,2), units=""hours"")) gives 0,5")
+ ttCalculator.SetToolTip(cmdAngVar, "The angular variance is twice the circular variance, so between 0 and 2")
+ ttCalculator.SetToolTip(cmdA1, "Ratio of Bessel functions for values of kappa parameter. Used in the von Mises (circular normal) distribution kappa = 0.9 gives A1 same as rho value for 1,2,3,6 data")
+ ttCalculator.SetToolTip(cmdAngDev, "The angular deviation is square root of the angular variance, so between 0 and sqrt(2)")
+
+ 'Dates/Times keyboard tooltips
+ ttCalculator.SetToolTip(cmdDate, "Get the date part of a date-time variable")
+ ttCalculator.SetToolTip(cmdAsDate, "Converts a character or numeric variable into a date. For example as_date(30) or as_date(""19700131"") or as.date(""1970.jan-31"") each give 1970-01-31")
+ ttCalculator.SetToolTip(cmdDateTime, "Converts a character or numeric variable into a date-time variable. For example as_datetime(30) gives 1970-01-01 00:00:30 UTC")
+ ttCalculator.SetToolTip(cmdTime, "Converts seconds, minutes, hours into a time variable. For example hms(185) gives 00:03:05, hms(25, 64) gives 01:04:25")
+ ttCalculator.SetToolTip(cmdYmd, "Makes a date variable from various character or numeric formats in year-month-day order. For example ymd(19840512) gives 1984-05-12")
+ ttCalculator.SetToolTip(cmdDmy, "Makes a date variable from various formats in day-month-year order. For example dmy(12051984) gives 1984-05-12")
+ ttCalculator.SetToolTip(cmdMdy, " Makes a date variable for mdy order. For example mdy(5121984) gives 1984-05-12. (Note alternatives of myd, ydm and dym)")
+ ttCalculator.SetToolTip(cmdAsTime, "Makes a time variable from numeric or character variable. For example: as_hms(185) gives 00:03:05, as_hms(""14:55:10"") gives 14:55:10")
+ ttCalculator.SetToolTip(cmdYmdHms, "Make a date-time variable from various character or numeric formats")
+ ttCalculator.SetToolTip(cmdYmdHm, " Make a date-time variable from various formats. For example ymd_hm(202406161201) gives 2024-06-16 12:01:00 UTC")
+ ttCalculator.SetToolTip(cmdYmdH, "Make a date-time variable from various formats. For example ymd_h(""2024.6:16,12"") gives ""2024-06-16 12:00:00 UTC""")
+ ttCalculator.SetToolTip(cmdLeap, "True if date is from a leap year and FALSE otherwise. For example leap(1984-05-12) is TRUE")
+ ttCalculator.SetToolTip(cmdYear, "Extract year from date or date-time. For example year(""1984-5-12"") gives 1984")
+ ttCalculator.SetToolTip(cmdMonth, "Extract month from a date or date-time variable")
+ ttCalculator.SetToolTip(cmdDay, "Extract day in month from date or date-time. For example day(""1984-5-12"" gives 12")
+ ttCalculator.SetToolTip(cmdYday, "Gives the day in the year, and depends on leap year. For example yday(""1984-3-1"") gives 61, while yday(""1986-3-1"") gives 60")
+ ttCalculator.SetToolTip(cmdWday, "Gives the day of the week from a date, or date-time variable. For example wday(""1984--5-12"", label=TRUE) gives Sat")
+ ttCalculator.SetToolTip(cmdD_In_M, "Gives the number of days in the month from date, or date-time. For example d_in_m(""1984_2-12"") gives 29 as 1984 is a leap year")
+ ttCalculator.SetToolTip(cmdAm, "TRUE or FALSE from date-time variable. For example am(""1984-05-12 14:23:45"") is FALSE")
+ ttCalculator.SetToolTip(cmdPm, "TRUE or FALSE from date-time variable. For example pm(""1984-05-12 14:23:45"") is TRUE")
+ ttCalculator.SetToolTip(cmdHour, "Extract hour from date-time variable. For example hour(""1984-05-12 14:23:45"") is 14. Also hour(""1984-05-12"") is 0")
+ ttCalculator.SetToolTip(cmdMinutes, "Extract minute from date-time variable. For example minute(""1984-05-12 14:23:45"") Is 23")
+ ttCalculator.SetToolTip(cmdSec, "Extract second from date-time variable. For example second(""1984-05-12 14:23:45"") is 45")
+ ttCalculator.SetToolTip(cmdQuarter, " 3-month period of the year from a date or date-time variable. For example quarter(""1984-05-12"") gives 2")
+
+ ' Factor keyboard tooltips
+ ttCalculator.SetToolTip(cmdFactor, "Make a factor from a numeric or character variable")
+ ttCalculator.SetToolTip(cmdAnon, "Anonymise factor levels, replacing them by a number. Optionally add a prefix, for example fct_anon(name, ""n"")")
+ ttCalculator.SetToolTip(cmdLabelled, "Create a labelled variable")
+ ttCalculator.SetToolTip(cmdCollapse, "Combine factor levels. For example fct_collapse(variety, trad=""TRAD"",improved=c(""NEW"",""OLD""))")
+ ttCalculator.SetToolTip(cmdCross, "Make interaction variable. For example fct_cross(variety,fertgrp, keep_empty=TRUE)")
+ ttCalculator.SetToolTip(cmdDrop, "Drop unused levels")
+ ttCalculator.SetToolTip(cmdExpand, "Add additional levels. For example fct_expand(Village, ""New"", ""Newer"")")
+ ttCalculator.SetToolTip(cmdAdd_na, "Make missing values into an additional factor level. For example fct_na_value_to_level(fertgrp)")
+ ttCalculator.SetToolTip(cmdInorder, "Order the factor levels by their appearance in the data")
+ ttCalculator.SetToolTip(cmdInfreq, "Order the factor levels by their frequency ")
+ ttCalculator.SetToolTip(cmdInseq, "Order a factor with numeric levels")
+ ttCalculator.SetToolTip(cmdLump, "Change all levels appearing less than min times into Other. For example fct_lump_min(Variety,10)")
+ ttCalculator.SetToolTip(cmdFmatch, "Make a logical variable with TRUE when levels are in the factor. For example fct_match(variety,c(""NEW"",""OLD""))")
+ ttCalculator.SetToolTip(cmdOther, " Replace levels with Other. For example fct_other(variety, keep=""NEW"")")
+ ttCalculator.SetToolTip(cmdRecode, "Change factor levels. For example fct_recode(variety,improved=""NEW"",improved=""OLD"")")
+ ttCalculator.SetToolTip(cmdRelevel, " Reorder factor levels. For example fct_relevel(fertgrp,""0cwt"", "".5-2cwt"")")
+ ttCalculator.SetToolTip(cmdReorder, "Reorder levels using (default ofmedian of another variable. For example fct_reorder(variety,yield)")
+ ttCalculator.SetToolTip(cmdReverse, "Reverse the order of the factor levels")
+ ttCalculator.SetToolTip(cmdShift, "Shift the order of the factor levels")
+ ttCalculator.SetToolTip(cmdShuffle, "Shuffle the order of the factor levels")
+
+ Const strTooltipCmdLength = "number Of observations: For example length(c(1,2,3,4,NA)) = 5 "
ttCalculator.SetToolTip(cmdLength, strTooltipCmdLength)
ttCalculator.SetToolTip(cmdListLength, strTooltipCmdLength)
@@ -985,16 +1100,15 @@ Public Class ucrCalculator
Private Sub cmdAcos_Click(sender As Object, e As EventArgs) Handles cmdAcos.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("acos(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("acos(x = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("acos()", 1)
End If
-
End Sub
Private Sub cmdAsin_Click(sender As Object, e As EventArgs) Handles cmdAsin.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("asin(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("asin(x = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("asin()", 1)
End If
@@ -1002,7 +1116,7 @@ Public Class ucrCalculator
Private Sub cmdAtan_Click(sender As Object, e As EventArgs) Handles cmdAtan.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("atan(x = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("atan(x = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("atan()", 1)
End If
@@ -1488,7 +1602,7 @@ Public Class ucrCalculator
Private Sub cmdYear_Click(sender As Object, e As EventArgs) Handles cmdYear.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::year(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::year(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::year()", 1)
End If
@@ -1496,7 +1610,7 @@ Public Class ucrCalculator
Private Sub cmdMonth_Click(sender As Object, e As EventArgs) Handles cmdMonth.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::month(x= , label=FALSE, abbr=TRUE)", 25)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::month(x= , label=FALSE, abbr=TRUE)", 26)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::month()", 1)
End If
@@ -1504,7 +1618,7 @@ Public Class ucrCalculator
Private Sub cmdDay_Click(sender As Object, e As EventArgs) Handles cmdDay.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::day(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::day(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::day()", 1)
End If
@@ -1512,7 +1626,7 @@ Public Class ucrCalculator
Private Sub cmdWday_Click(sender As Object, e As EventArgs) Handles cmdWday.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::wday(x= , label=FALSE, abbr=TRUE)", 25)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::wday(x= , label=FALSE, abbr=TRUE)", 26)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::wday()", 1)
End If
@@ -1520,7 +1634,7 @@ Public Class ucrCalculator
Private Sub cmdYday_Click(sender As Object, e As EventArgs) Handles cmdYday.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::yday(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::yday(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::yday()", 1)
End If
@@ -1528,15 +1642,47 @@ Public Class ucrCalculator
Private Sub cmdDate_Click(sender As Object, e As EventArgs) Handles cmdDate.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::date(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::date(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::date()", 1)
End If
End Sub
+ Private Sub cmdAsDate_Click(sender As Object, e As EventArgs) Handles cmdAsDate.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::as_date(x= )", 2)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::as_date()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdYmdHms_Click(sender As Object, e As EventArgs) Handles cmdYmdHms.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::ymd_hms(x= ) ", 3)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::ymd_hms() ", 2)
+ End If
+ End Sub
+
+ Private Sub cmdYmdHm_Click(sender As Object, e As EventArgs) Handles cmdYmdHm.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::ymd_hm(x= ) ", 3)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::ymd_hm() ", 2)
+ End If
+ End Sub
+
+ Private Sub cmdYmdH_Click(sender As Object, e As EventArgs) Handles cmdYmdH.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::ymd_h(x= ) ", 3)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::ymd_h()", 1)
+ End If
+ End Sub
+
Private Sub cmdLeap_Click(sender As Object, e As EventArgs) Handles cmdLeap.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::leap_year(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::leap_year(date= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::leap_year()", 1)
End If
@@ -1544,7 +1690,7 @@ Public Class ucrCalculator
Private Sub cmdYmd_Click(sender As Object, e As EventArgs) Handles cmdYmd.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::ymd(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::ymd(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::ymd()", 1)
End If
@@ -1552,58 +1698,71 @@ Public Class ucrCalculator
Private Sub cmdMdy_Click(sender As Object, e As EventArgs) Handles cmdMdy.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::mdy(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::mdy(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::mdy()", 1)
End If
End Sub
+
Private Sub cmdDmy_Click(sender As Object, e As EventArgs) Handles cmdDmy.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::dmy(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::dmy(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::dmy()", 1)
End If
End Sub
-
Private Sub cmdHour_Click(sender As Object, e As EventArgs) Handles cmdHour.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::hour(x = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::hour(x = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::hour()", 1)
End If
End Sub
- Private Sub cmdMinutes_Click(sender As Object, e As EventArgs) Handles cmdminutes.Click
+
+ Private Sub cmdMinutes_Click(sender As Object, e As EventArgs) Handles cmdMinutes.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::minute(x = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::minute(x = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::minute()", 1)
End If
End Sub
+
Private Sub cmdSec_Click(sender As Object, e As EventArgs) Handles cmdSec.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::second(x = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::second(x = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::second()", 1)
End If
End Sub
+
Private Sub cmdAm_Click(sender As Object, e As EventArgs) Handles cmdAm.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::am(x = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::am(x = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::am()", 1)
End If
End Sub
+
+ Private Sub cmdPm_Click(sender As Object, e As EventArgs) Handles cmdPm.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::pm(x = )", 2)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::pm()", 1)
+ End If
+ End Sub
+
Private Sub cmdD_In_M_Click(sender As Object, e As EventArgs) Handles cmdD_In_M.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::days_in_month(x = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::days_in_month(x = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::days_in_month()", 1)
End If
End Sub
+
Private Sub cmdQuarter_Click(sender As Object, e As EventArgs) Handles cmdQuarter.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::quarter(x =, with_year = FALSE, fiscal_start = 1 )", 39)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::quarter(x= , with_year = FALSE, fiscal_start = 1 )", 40)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::quarter()", 1)
End If
@@ -1612,6 +1771,7 @@ Public Class ucrCalculator
Private Sub cmdBrackets_Click(sender As Object, e As EventArgs) Handles cmdBrackets.Click
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("( )", 1)
End Sub
+
Private Sub cmdOpeningBracket_Click(sender As Object, e As EventArgs) Handles cmdOpeningBracket.Click
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("(")
End Sub
@@ -2206,7 +2366,7 @@ Public Class ucrCalculator
ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldPrimaryFunction.ToScript, 0)
End Sub
- Private Sub cmdDate_Stamp_Click(sender As Object, e As EventArgs) Handles cmdDate_Stamp.Click
+ Private Sub cmdWakefieldDates_Click(sender As Object, e As EventArgs) Handles cmdWakefieldDates.Click
Dim clsWakefieldDateStampFunction As New RFunction
Dim clsWakefieldNrowFunction As New RFunction
Dim clsStartDateFunction As New RFunction
@@ -2246,20 +2406,21 @@ Public Class ucrCalculator
ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldDeathFunction.ToScript, 0)
End Sub
- Private Sub cmdDied_Click(sender As Object, e As EventArgs) Handles cmdDied.Click
- Dim clsWakefieldDiedFunction As New RFunction
+ Private Sub cmdGrade_Letter_Click(sender As Object, e As EventArgs) Handles cmdGrade_Letter.Click
+ Dim clsWakefieldgrade_letterFunction As New RFunction
Dim clsWakefieldNrowFunction As New RFunction
clsWakefieldNrowFunction.SetRCommand("nrow")
clsWakefieldNrowFunction.AddParameter("x", ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, iPosition:=0)
- clsWakefieldDiedFunction.SetPackageName("wakefield")
- clsWakefieldDiedFunction.SetRCommand("died")
- clsWakefieldDiedFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
- clsWakefieldDiedFunction.AddParameter("prob", "NULL", iPosition:=1)
- clsWakefieldDiedFunction.AddParameter("name", Chr(34) & "Died" & Chr(34), iPosition:=2)
+ clsWakefieldgrade_letterFunction.SetPackageName("wakefield")
+ clsWakefieldgrade_letterFunction.SetRCommand("grade_letter")
+ clsWakefieldgrade_letterFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
+ clsWakefieldgrade_letterFunction.AddParameter("mean", "88", iPosition:=1)
+ clsWakefieldgrade_letterFunction.AddParameter("sd", "4", iPosition:=2)
+ clsWakefieldgrade_letterFunction.AddParameter("name", Chr(34) & "Grade_Letter" & Chr(34), iPosition:=3)
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldDiedFunction.ToScript, 0)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldgrade_letterFunction.ToScript, 0)
End Sub
Private Sub cmdDice_Click(sender As Object, e As EventArgs) Handles cmdDice.Click
@@ -2650,7 +2811,7 @@ Public Class ucrCalculator
clsWakefieldIQFunction.SetRCommand("iq")
clsWakefieldIQFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
clsWakefieldIQFunction.AddParameter("mean", "100", iPosition:=1)
- clsWakefieldIQFunction.AddParameter("sd", "10", iPosition:=2)
+ clsWakefieldIQFunction.AddParameter("sd", "15", iPosition:=2)
clsWakefieldIQFunction.AddParameter("min", "0", iPosition:=3)
clsWakefieldIQFunction.AddParameter("max", "NULL", iPosition:=4)
clsWakefieldIQFunction.AddParameter("digits", "0", iPosition:=5)
@@ -2677,22 +2838,6 @@ Public Class ucrCalculator
ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldLanguageFunction.ToScript, 0)
End Sub
- Private Sub cmdLevel_Click(sender As Object, e As EventArgs) Handles cmdLevel.Click
- Dim clsWakefieldLevelFunction As New RFunction
- Dim clsWakefieldNrowFunction As New RFunction
-
- clsWakefieldNrowFunction.SetRCommand("nrow")
- clsWakefieldNrowFunction.AddParameter("x", ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, iPosition:=0)
-
- clsWakefieldLevelFunction.SetPackageName("wakefield")
- clsWakefieldLevelFunction.SetRCommand("level")
- clsWakefieldLevelFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
- clsWakefieldLevelFunction.AddParameter("x", "1:4", iPosition:=1)
- clsWakefieldLevelFunction.AddParameter("prob", "NULL", iPosition:=2)
- clsWakefieldLevelFunction.AddParameter("name", Chr(34) & "Level" & Chr(34), iPosition:=3)
-
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldLevelFunction.ToScript, 0)
- End Sub
Private Sub cmdMath_Click(sender As Object, e As EventArgs) Handles cmdMath.Click
Dim clsWakefieldMathFunction As New RFunction
Dim clsWakefieldNrowFunction As New RFunction
@@ -2717,28 +2862,22 @@ Public Class ucrCalculator
ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldMathFunction.ToScript, 0)
End Sub
- Private Sub cmdEla_Click(sender As Object, e As EventArgs) Handles cmdEla.Click
- Dim clsWakefieldElaFunction As New RFunction
+ Private Sub cmdWakefieldMinute_Click(sender As Object, e As EventArgs) Handles cmdWakefieldMinute.Click
+ Dim clsWakefieldMinuteFunction As New RFunction
Dim clsWakefieldNrowFunction As New RFunction
- Dim clsELAProbFunction As New RFunction
clsWakefieldNrowFunction.SetRCommand("nrow")
clsWakefieldNrowFunction.AddParameter("x", ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, iPosition:=0)
- clsELAProbFunction.SetRCommand("c")
- clsELAProbFunction.AddParameter("0.3161", "0.29829", iPosition:=0, bIncludeArgumentName:=False)
- clsELAProbFunction.AddParameter("0.37257", "0.37257", iPosition:=1, bIncludeArgumentName:=False)
- clsELAProbFunction.AddParameter("0.2233", "0.2233", iPosition:=2, bIncludeArgumentName:=False)
- clsELAProbFunction.AddParameter("0.08803", "0.08803", iPosition:=3, bIncludeArgumentName:=False)
-
- clsWakefieldElaFunction.SetPackageName("wakefield")
- clsWakefieldElaFunction.SetRCommand("ela")
- clsWakefieldElaFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
- clsWakefieldElaFunction.AddParameter("x", "1:4", iPosition:=1)
- clsWakefieldElaFunction.AddParameter("prob", clsRFunctionParameter:=clsELAProbFunction, iPosition:=2)
- clsWakefieldElaFunction.AddParameter("name", Chr(34) & "ELA" & Chr(34), iPosition:=3)
+ clsWakefieldMinuteFunction.SetPackageName("wakefield")
+ clsWakefieldMinuteFunction.SetRCommand("minute")
+ clsWakefieldMinuteFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
+ clsWakefieldMinuteFunction.AddParameter("x", "seq(0, 59, by = 1)/60 ", iPosition:=1)
+ clsWakefieldMinuteFunction.AddParameter("prob", "NULL", iPosition:=2)
+ clsWakefieldMinuteFunction.AddParameter("random", "FALSE", iPosition:=3)
+ clsWakefieldMinuteFunction.AddParameter("name", Chr(34) & "Minute" & Chr(34), iPosition:=4)
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldElaFunction.ToScript, 0)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldMinuteFunction.ToScript, 0)
End Sub
Private Sub cmdGpa_Click(sender As Object, e As EventArgs) Handles cmdGpa.Click
@@ -3031,10 +3170,10 @@ Public Class ucrCalculator
clsWakefieldSatFunction.SetPackageName("wakefield")
clsWakefieldSatFunction.SetRCommand("sat")
clsWakefieldSatFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
- clsWakefieldSatFunction.AddParameter("mean", "1500", iPosition:=1)
- clsWakefieldSatFunction.AddParameter("sd", "100", iPosition:=2)
- clsWakefieldSatFunction.AddParameter("min", "0", iPosition:=3)
- clsWakefieldSatFunction.AddParameter("max", "2400", iPosition:=4)
+ clsWakefieldSatFunction.AddParameter("mean", "1000", iPosition:=1)
+ clsWakefieldSatFunction.AddParameter("sd", "150", iPosition:=2)
+ clsWakefieldSatFunction.AddParameter("min", "400", iPosition:=3)
+ clsWakefieldSatFunction.AddParameter("max", "1600", iPosition:=4)
clsWakefieldSatFunction.AddParameter("digits", "0", iPosition:=5)
clsWakefieldSatFunction.AddParameter("name", Chr(34) & "SAT" & Chr(34), iPosition:=6)
@@ -3108,31 +3247,22 @@ Public Class ucrCalculator
ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldSexInclusiveFunction.ToScript, 0)
End Sub
- Private Sub cmdSex_Click(sender As Object, e As EventArgs) Handles cmdSex.Click
- Dim clsWakefieldSexFunction As New RFunction
+ Private Sub cmdWakefieldTimes_Click(sender As Object, e As EventArgs) Handles cmdWakefieldTimes.Click
+ Dim clsWakefieldTimestampFunction As New RFunction
Dim clsWakefieldNrowFunction As New RFunction
- Dim clsSexListFunction As New RFunction
- Dim clsSexProbFunction As New RFunction
clsWakefieldNrowFunction.SetRCommand("nrow")
clsWakefieldNrowFunction.AddParameter("x", ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, iPosition:=0)
- clsSexListFunction.SetRCommand("c")
- clsSexListFunction.AddParameter("male", Chr(34) & "Male" & Chr(34), iPosition:=0, bIncludeArgumentName:=False)
- clsSexListFunction.AddParameter("female", Chr(34) & "Female" & Chr(34), iPosition:=1, bIncludeArgumentName:=False)
+ clsWakefieldTimestampFunction.SetPackageName("wakefield")
+ clsWakefieldTimestampFunction.SetRCommand("time_stamp")
+ clsWakefieldTimestampFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
+ clsWakefieldTimestampFunction.AddParameter("x", "seq(0, 23, by = 1)", iPosition:=1)
+ clsWakefieldTimestampFunction.AddParameter("prob", "NULL", iPosition:=2)
+ clsWakefieldTimestampFunction.AddParameter("random", "FALSE", iPosition:=3)
+ clsWakefieldTimestampFunction.AddParameter("name", Chr(34) & "Time" & Chr(34), iPosition:=4)
- clsSexProbFunction.SetRCommand("c")
- clsSexProbFunction.AddParameter("0.51219512195122", "0.51219512195122", iPosition:=0, bIncludeArgumentName:=False)
- clsSexProbFunction.AddParameter("0.48780487804878", "0.48780487804878", iPosition:=1, bIncludeArgumentName:=False)
-
- clsWakefieldSexFunction.SetPackageName("wakefield")
- clsWakefieldSexFunction.SetRCommand("sex")
- clsWakefieldSexFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
- clsWakefieldSexFunction.AddParameter("x", clsRFunctionParameter:=clsSexListFunction, iPosition:=1)
- clsWakefieldSexFunction.AddParameter("prob", clsRFunctionParameter:=clsSexProbFunction, iPosition:=2)
- clsWakefieldSexFunction.AddParameter("name", Chr(34) & "Sex" & Chr(34), iPosition:=3)
-
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldSexFunction.ToScript, 0)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldTimestampFunction.ToScript, 0)
End Sub
Private Sub cmdSmokes_Click(sender As Object, e As EventArgs) Handles cmdSmokes.Click
@@ -3210,22 +3340,40 @@ Public Class ucrCalculator
ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldStringFunction.ToScript, 0)
End Sub
- Private Sub cmdWakefield_Upper_Click(sender As Object, e As EventArgs) Handles cmdWakefield_Upper.Click
- Dim clsWakefieldUpperFunction As New RFunction
+ Private Sub cmdWakefield_Upper_Click(sender As Object, e As EventArgs) Handles cmdWakefieldUpper.Click
+ Dim clsWakefieldUpper_factorFunction As New RFunction
+ Dim clsWakefieldNrowFunction As New RFunction
+
+ clsWakefieldNrowFunction.SetRCommand("nrow")
+ clsWakefieldNrowFunction.AddParameter("x", ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, iPosition:=0)
+
+ clsWakefieldUpper_factorFunction.SetPackageName("wakefield")
+ clsWakefieldUpper_factorFunction.SetRCommand("upper_factor")
+ clsWakefieldUpper_factorFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
+ clsWakefieldUpper_factorFunction.AddParameter("k", "5", iPosition:=1)
+ clsWakefieldUpper_factorFunction.AddParameter("x", "LETTERS", iPosition:=2)
+ clsWakefieldUpper_factorFunction.AddParameter("prob", "NULL", iPosition:=3)
+ clsWakefieldUpper_factorFunction.AddParameter("name", Chr(34) & "Upper" & Chr(34), iPosition:=4)
+
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldUpper_factorFunction.ToScript, 0)
+ End Sub
+
+ Private Sub cmdWakefieldLower_click(sender As Object, e As EventArgs) Handles cmdWakefieldLower.Click
+ Dim clsWakefieldLower_FactorFunction As New RFunction
Dim clsWakefieldNrowFunction As New RFunction
clsWakefieldNrowFunction.SetRCommand("nrow")
clsWakefieldNrowFunction.AddParameter("x", ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, iPosition:=0)
- clsWakefieldUpperFunction.SetPackageName("wakefield")
- clsWakefieldUpperFunction.SetRCommand("upper")
- clsWakefieldUpperFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
- clsWakefieldUpperFunction.AddParameter("k", "5", iPosition:=1)
- clsWakefieldUpperFunction.AddParameter("x", "LETTERS", iPosition:=2)
- clsWakefieldUpperFunction.AddParameter("prob", "NULL", iPosition:=3)
- clsWakefieldUpperFunction.AddParameter("name", Chr(34) & "Upper" & Chr(34), iPosition:=4)
+ clsWakefieldLower_FactorFunction.SetPackageName("wakefield")
+ clsWakefieldLower_FactorFunction.SetRCommand("lower_factor")
+ clsWakefieldLower_FactorFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
+ clsWakefieldLower_FactorFunction.AddParameter("k", "5", iPosition:=1)
+ clsWakefieldLower_FactorFunction.AddParameter("x", "letters", iPosition:=2)
+ clsWakefieldLower_FactorFunction.AddParameter("prob", "NULL", iPosition:=3)
+ clsWakefieldLower_FactorFunction.AddParameter("name", Chr(34) & "Lower" & Chr(34), iPosition:=4)
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldUpperFunction.ToScript, 0)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldLower_FactorFunction.ToScript, 0)
End Sub
Private Sub cmdValid_Click(sender As Object, e As EventArgs) Handles cmdValid.Click
@@ -3369,7 +3517,7 @@ Public Class ucrCalculator
If chkShowParameters.Checked Then
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("circular::quantile.circular(x = , probs = seq(0, 1, 0.25), na.rm = TRUE, names = TRUE, type = 7)", 65)
Else
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("circular::quantile.circular(x = , probs = seq(0, 1, 0.25))", 27)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("circular::quantile.circular(x = , probs = seq(0, 1, 0.25))", 28)
End If
End Sub
@@ -3490,9 +3638,9 @@ Public Class ucrCalculator
Private Sub cmdAdd_na_Click(sender As Object, e As EventArgs) Handles cmdAdd_na.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("forcats::fct_explicit_na(f = , na_level = ""(Missing)"")", 26)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("forcats::fct_na_value_to_level(f = , na_level = ""(Missing)"")", 26)
Else
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("forcats::fct_explicit_na()", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("forcats::fct_na_value_to_level()", 1)
End If
End Sub
@@ -3522,9 +3670,9 @@ Public Class ucrCalculator
Private Sub cmdLump_Click(sender As Object, e As EventArgs) Handles cmdLump.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("forcats::fct_lump(f = , n, prop, w = NULL, other_level = ""Other"", ties.method = c(""min"", ""average"", ""first"", ""last"", ""random"", ""max""))", 113)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("forcats::fct_lump_min(f = , n, prop, w = NULL, other_level = ""Other"", ties.method = c(""min"", ""average"", ""first"", ""last"", ""random"", ""max""))", 113)
Else
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("forcats::fct_lump()", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("forcats::fct_lump_min()", 1)
End If
End Sub
@@ -3689,7 +3837,7 @@ Public Class ucrCalculator
End If
End Sub
- Private Sub cmdLinkert7_Click(sender As Object, e As EventArgs) Handles cmdLinkert7.Click
+ Private Sub cmdLikert7_Click(sender As Object, e As EventArgs) Handles cmdLikert7.Click
Dim clsWakefieldLikert7Function As New RFunction
Dim clsWakefieldNrowFunction As New RFunction
Dim clsLikert7ListFunction As New RFunction
@@ -3711,7 +3859,7 @@ Public Class ucrCalculator
clsWakefieldLikert7Function.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0)
clsWakefieldLikert7Function.AddParameter("x", clsRFunctionParameter:=clsLikert7ListFunction, iPosition:=1)
clsWakefieldLikert7Function.AddParameter("prob", "NULL", iPosition:=2)
- clsWakefieldLikert7Function.AddParameter("name", Chr(34) & "Likert" & Chr(34), iPosition:=3)
+ clsWakefieldLikert7Function.AddParameter("name", Chr(34) & "Likert7" & Chr(34), iPosition:=3)
ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldLikert7Function.ToScript, 0)
End Sub
@@ -4066,17 +4214,17 @@ Public Class ucrCalculator
Private Sub cmdTime_Click(sender As Object, e As EventArgs) Handles cmdTime.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("hms::hms(seconds = , minutes = , hours = , days = )", 32)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("hms::hms(seconds = , minutes = , hours = , days = )", 33)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("hms::hms()", 1)
End If
End Sub
- Private Sub cmdPm_Click(sender As Object, e As EventArgs) Handles cmdPm.Click
+ Private Sub cmdAsTime_Click(sender As Object, e As EventArgs) Handles cmdAsTime.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::pm(x = )", 2)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("hms::as_hms(x= )", 2)
Else
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("lubridate::pm()", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("hms::as_hms()", 1)
End If
End Sub
@@ -5094,17 +5242,41 @@ Public Class ucrCalculator
ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsSampleFunction.ToScript, 36)
End Sub
- Private Sub cmdAsComplex_Click(sender As Object, e As EventArgs) Handles cmdComplex.Click
+ Private Sub cmdComplex_Click(sender As Object, e As EventArgs) Handles cmdComplex.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("complex(x = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("complex(length.out= 0,real= numeric(),imaginary= numeric(),modulus= 1,argument= 0)", 0)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("complex( )", 1)
End If
End Sub
+ Private Sub cmdComplexAsin_Click(sender As Object, e As EventArgs) Handles cmdComplexAsin.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("asin(x = )", 2)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("asin()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexAcos_Click(sender As Object, e As EventArgs) Handles cmdComplexAcos.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("acos(x = )", 2)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("acos()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexAtan_Click(sender As Object, e As EventArgs) Handles cmdComplexAtan.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("atan(x = )", 2)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("atan()", 1)
+ End If
+ End Sub
+
Private Sub cmdReal_Click(sender As Object, e As EventArgs) Handles cmdReal.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Re(z = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Re(z = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Re( )", 1)
End If
@@ -5112,7 +5284,7 @@ Public Class ucrCalculator
Private Sub cmdImaginary_Click(sender As Object, e As EventArgs) Handles cmdImaginary.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Im(z = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Im(z = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Im( )", 1)
End If
@@ -5120,7 +5292,7 @@ Public Class ucrCalculator
Private Sub cmdMod_Click(sender As Object, e As EventArgs) Handles cmdMod.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Mod(z = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Mod(z = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Mod( )", 1)
End If
@@ -5128,7 +5300,7 @@ Public Class ucrCalculator
Private Sub cmdArg_Click(sender As Object, e As EventArgs) Handles cmdArg.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Arg(z = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Arg(z = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Arg( )", 1)
End If
@@ -5136,15 +5308,27 @@ Public Class ucrCalculator
Private Sub cmdConjugate_Click(sender As Object, e As EventArgs) Handles cmdConjugate.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Conj(z = )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Conj(z = )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Conj( )", 1)
End If
End Sub
+ Private Sub cmdComplexi_Click(sender As Object, e As EventArgs) Handles cmdComplexi.Click
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("i", -1)
+ End Sub
+
+ Private Sub cmdAsComplex_Click(sender As Object, e As EventArgs) Handles cmdAsComplex.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("as.complex(x = )", 2)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("as.complex( )", 1)
+ End If
+ End Sub
+
Private Sub cmdComplexLog_Click(sender As Object, e As EventArgs) Handles cmdComplexLog.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("log(x= , base=exp(1))", 14)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("log(x= , base=exp(1))", 15)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("log()", 1)
End If
@@ -5152,7 +5336,7 @@ Public Class ucrCalculator
Private Sub cmdComplexSqrt_Click_1(sender As Object, e As EventArgs) Handles cmdComplexSqrt.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sqrt(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sqrt(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sqrt()", 1)
End If
@@ -5160,7 +5344,7 @@ Public Class ucrCalculator
Private Sub cmdComplexRound_Click(sender As Object, e As EventArgs) Handles cmdComplexRound.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("round(x= , digits=0)", 11)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("round(x= , digits=0)", 12)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("round()", 1)
End If
@@ -5168,7 +5352,7 @@ Public Class ucrCalculator
Private Sub cmdComplexExp_Click_1(sender As Object, e As EventArgs) Handles cmdComplexExp.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("exp(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("exp(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("exp()", 1)
End If
@@ -5176,7 +5360,7 @@ Public Class ucrCalculator
Private Sub cmdComplexSignif_Click(sender As Object, e As EventArgs) Handles cmdComplexSignif.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("signif(x= , digits=6)", 11)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("signif(x= , digits=6)", 12)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("signif()", 1)
End If
@@ -5184,7 +5368,7 @@ Public Class ucrCalculator
Private Sub cmdComplexCos_Click(sender As Object, e As EventArgs) Handles cmdComplexCos.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("cos(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("cos(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("cos()", 1)
End If
@@ -5192,7 +5376,7 @@ Public Class ucrCalculator
Private Sub cmdComplexSin_Click(sender As Object, e As EventArgs) Handles cmdComplexSin.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sin(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sin(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sin()", 1)
End If
@@ -5200,7 +5384,7 @@ Public Class ucrCalculator
Private Sub cmdComplexTan_Click(sender As Object, e As EventArgs) Handles cmdComplexTan.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("tan(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("tan(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("tan()", 1)
End If
@@ -5208,7 +5392,7 @@ Public Class ucrCalculator
Private Sub cmdComplexCosH_Click(sender As Object, e As EventArgs) Handles cmdComplexCosH.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("cosh(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("cosh(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("cosh()", 1)
End If
@@ -5216,7 +5400,7 @@ Public Class ucrCalculator
Private Sub cmdComplexSinH_Click(sender As Object, e As EventArgs) Handles cmdComplexSinH.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sinh(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sinh(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sinh()", 1)
End If
@@ -5224,7 +5408,7 @@ Public Class ucrCalculator
Private Sub cmdComplexTanH_Click(sender As Object, e As EventArgs) Handles cmdComplexTanH.Click
If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("tanh(x= )", 1)
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("tanh(x= )", 2)
Else
ucrReceiverForCalculation.AddToReceiverAtCursorPosition("tanh()", 1)
End If
@@ -5497,16 +5681,4 @@ Public Class ucrCalculator
ucrReceiverForCalculation.AddToReceiverAtCursorPosition(" [which.max( )]", 15)
End If
End Sub
-
- Private Sub cmdComplexi_Click(sender As Object, e As EventArgs) Handles cmdComplexi.Click
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("i", -1)
- End Sub
-
- Private Sub cmdAsComplex_Click_1(sender As Object, e As EventArgs) Handles cmdAsComplex.Click
- If chkShowParameters.Checked Then
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("as.complex(x = )", 1)
- Else
- ucrReceiverForCalculation.AddToReceiverAtCursorPosition("as.complex( )", 1)
- End If
- End Sub
End Class
diff --git a/instat/ucrFactor.vb b/instat/ucrFactor.vb
index 5c82f57a346..715ce4f6710 100644
--- a/instat/ucrFactor.vb
+++ b/instat/ucrFactor.vb
@@ -189,15 +189,15 @@ Public Class ucrFactor
'''
'''
'''
- Private Sub _grdSheet_AfterCellEdit(sender As Object, e As CellAfterEditEventArgs) Handles _grdSheet.AfterCellEdit
+ Private Sub _grdSheet_CellEditTextChanging(sender As Object, e As CellEditTextChangingEventArgs) Handles _grdSheet.CellEditTextChanging
Dim bValid As Boolean = True
'do levels entry validation
If _grdSheet.ColumnHeaders(e.Cell.Column).Text = DefaultColumnNames.Level Then
- If Not IsNumeric(e.NewData) Then
+ If Not IsNumeric(e.Text) Then
MsgBox("Levels must be numeric values", MsgBoxStyle.Information, "Invalid Value")
bValid = False
- ElseIf e.NewData.Contains(".") Then
+ ElseIf e.Text.Contains(".") Then
MsgBox("Levels must not be decimal", MsgBoxStyle.Information, "Invalid Value")
bValid = False
@@ -207,13 +207,13 @@ Public Class ucrFactor
If bValid Then
'set the new data before calling OnControlValueChanged
'very important especially when writing to the parameter value
- _grdSheet(e.Cell.Row, e.Cell.Column) = e.NewData
+ _grdSheet(e.Cell.Row, e.Cell.Column) = e.Text
'this will raise ControlContentsChanged event
'and also update parameter and R code with the values
OnControlValueChanged()
e.Cell.Style.BackColor = Color.Gold
Else
- e.EndReason = EndEditReason.Cancel
+ 'Todo what will happen if the text is not valid
End If
End Sub
@@ -936,4 +936,5 @@ Public Class ucrFactor
lblSelected.Visible = iSelectCol > 0
SetToggleButtonSettings()
End Sub
+
End Class
\ No newline at end of file
diff --git a/instat/ucrTry.vb b/instat/ucrTry.vb
index dbf965054fd..9d5422469fe 100644
--- a/instat/ucrTry.vb
+++ b/instat/ucrTry.vb
@@ -94,7 +94,7 @@ Public Class ucrTry
ElseIf IsNothing(ucrReceiverScript) AndAlso CheckForEmptyInputControl() Then
ucrInputTryMessage.SetName("")
Else
- For Each clsTempCode In clsRSyntax.lstBeforeCodes
+ For Each clsTempCode In clsRSyntax.GetBeforeCodes()
Dim clsCodeClone As RCodeStructure = clsTempCode.Clone()
Dim strBeforeAfterScript As String = ""
Dim strBeforeAfterTemp As String = clsCodeClone.ToScript(strBeforeAfterScript)
@@ -181,7 +181,7 @@ Public Class ucrTry
AddButtonInTryTextBox()
Finally
lstScripts = New List(Of String)
- For Each clsTempCode In clsRSyntax.lstAfterCodes
+ For Each clsTempCode In clsRSyntax.GetAfterCodes()
Dim clsCodeClone As RCodeStructure = clsTempCode.Clone()
Dim strBeforeAfterScript As String = ""
Dim strBeforeAfterTemp As String = clsCodeClone.ToScript(strBeforeAfterScript)