diff --git a/.github/workflows/CreateInstaller.yml b/.github/workflows/CreateInstaller.yml
index e3161d66698..368b50bb738 100644
--- a/.github/workflows/CreateInstaller.yml
+++ b/.github/workflows/CreateInstaller.yml
@@ -29,9 +29,9 @@ jobs:
# set variables
env:
- Solution_Name: Instat.sln # Replace with your solution name, i.e. MyWpfApp.sln.
- Test_Project_Path: instat\instat.vbproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
-
+ Solution_Name: Instat.sln
+ GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+
# check out r-instat
steps:
- name: Checkout
@@ -41,11 +41,11 @@ jobs:
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
- uses: microsoft/setup-msbuild@v1.0.2
+ uses: microsoft/setup-msbuild@v1.1.3
# set up and restore NuGet packages
- name: Setup NuGet
- uses: NuGet/setup-nuget@v1.0.6
+ uses: NuGet/setup-nuget@v1.1.1
- name: Restore NuGet
run: nuget restore $env:Solution_Name
@@ -71,29 +71,41 @@ jobs:
path: instat\My Project\AssemblyInfo.vb
# optional, default is ${{ github.workspace }}
# Version number to set on [AssemblyVersion] and [AssemblyFileVersion] attributes of AssemblyInfo.cs/.vb files
- version: "${{ inputs.major_version }}.${{ inputs.minor_version }}.${{ inputs.build_no }}" #.${env:BUILD_NUMBER}"
+ version: "${{ inputs.major_version }}.${{ inputs.minor_version }}.${{ inputs.build_no }}.${env:BUILD_NUMBER}"
# Create the app package by building and packaging the Windows Application Packaging project
+ #Same output for 64bit and 32 bit
- name: Create the app package
- run: msbuild $env:Test_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }}
+ run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration /p:AppxBundlePlatforms=$env:Appx_Bundle_Platforms /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }}
env:
Appx_Bundle: Always
- Appx_Bundle_Platforms: x86|x64
+ Appx_Bundle_Platforms: x64|x86
Appx_Package_Build_Mode: StoreUpload
Configuration: ${{ matrix.configuration }}
+
+ # Create directory and copy over application to a 32bit folder
+ # There is no difference in R instat other than the packaged R
+ - name: Make Library directory 64 bit
+ run: |
+ MKDIR instat\bin\x86\Release\
+
+ - name: Copy R-Instat Data 64 bit
+ run: |
+ ROBOCOPY instat\bin\Release\ instat\bin\x86\Release\ /E
+ continue-on-error: true
# Build 32 bit installer without R
- name: Building the installer 32bit - No R
run: |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "inno_install_script_32bit.iss"
shell: cmd
-
+
# upload 32 bit installer without R
- name: Upload the 32 bit installer as an artifact
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'pull_request' }}
with:
- path: "Output/R-Instat_0.7.4_Installer_32.exe"
+ path: "Output/R-Instat_Installer_32.exe"
name: rinstat32NoR-innosetup
# Build 64 bit installer without R
@@ -112,7 +124,7 @@ jobs:
# check out R-Instat Data
- name: Checkout Instat Data
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: ' africanmathsinitiative/R-Instat-Data'
fetch-depth: 0
@@ -131,16 +143,16 @@ jobs:
# Create directory and copy over InstatData (32bit)
- name: Make Library directory 32 bit
run: |
- MKDIR instat\bin\x64\Release\static\Library\
+ MKDIR instat\bin\x86\Release\static\Library\
- name: Copy R-Instat Data 32 bit
run: |
- ROBOCOPY InstatData\data\*.* instat\bin\x64\Release\static\Library\ /E
+ ROBOCOPY InstatData\data\*.* instat\bin\x86\Release\static\Library\ /E
continue-on-error: true
# check out R for R-Instat
- name: Checkout R for R-Instat
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: 'ChrisMarsh82/R-RInstat'
fetch-depth: 0
@@ -153,41 +165,49 @@ jobs:
- name: Copy R 32 bit
run: |
- ROBOCOPY R-RInstat\32Bit\ instat\bin\x64\Release\static\ /E
+ ROBOCOPY R-RInstat\32Bit\ instat\bin\x86\Release\static\ /E
continue-on-error: true
- name: Install R packages (64 bit)
run: |
"instat\bin\Release\static\R\bin\Rscript.exe" "instat\static\InstatObject\R\InstallPackages.R"
- shell: cmd
-
- - name: Install R packages (32 bit)
- run: |
- "instat\bin\x64\Release\static\R\bin\Rscript.exe" "instat\static\InstatObject\R\InstallPackages.R"
- shell: cmd
+ shell: cmd
- name: Building the installer 64bit - With R
run: |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "inno_install_script_64bit.iss"
shell: cmd
- - name: Building the installer 32bit - With R
- run: |
- "%programfiles(x86)%\Inno Setup 6\iscc.exe" "inno_install_script_32bit.iss"
- shell: cmd
-
- name: Upload the 64 bit installer with R as an artifact
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'pull_request' }}
with:
path: "Output/R-Instat_Installer_64.exe"
name: rinstat64WithR-innosetup
-
+
+ - name: Remove 64 bit release files to free up space
+ run: |
+ Remove-Item "instat\bin\Release\" -Recurse
+
+ - name: Remove 64 innosetup to free up space
+ run: |
+ del "Output/R-Instat_Installer_64.exe"
+
+ - name: Install R packages (32 bit)
+ run: |
+ "instat\bin\x86\Release\static\R\bin\Rscript.exe" "instat\static\InstatObject\R\InstallPackages.R"
+ shell: cmd
+
+ - name: Building the installer 32bit - With R
+ run: |
+ "%programfiles(x86)%\Inno Setup 6\iscc.exe" "inno_install_script_32bit.iss"
+ shell: cmd
+
- name: Upload the 32 bit installer with R as an artifact
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'pull_request' }}
with:
path: "Output/R-Instat_Installer_32.exe"
- name: rinstat64WithR-innosetup
+ name: rinstat32WithR-innosetup
diff --git a/.gitignore b/.gitignore
index 1da612d1fff..74f0ebe39a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -250,3 +250,4 @@ installer/Output/
# Package used by script window
/packages/jacobslusser.ScintillaNET.*/
+/packages/NLog.*/
diff --git a/inno_install_script_32bit.iss b/inno_install_script_32bit.iss
index 9c7689b98b3..a1983eb54c6 100644
--- a/inno_install_script_32bit.iss
+++ b/inno_install_script_32bit.iss
@@ -5,7 +5,7 @@
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
-AppVersion= {#GetStringFileInfo("instat\bin\Release\instat.exe", "FileVersion")}
+AppVersion= {#GetStringFileInfo("instat\bin\x86\Release\instat.exe", "FileVersion")}
AppId={{979E51D8-9BC4-418F-8D4D-9B44FEA869A6-{#SetupSetting("AppVersion")}}
AppName=R-Instat
@@ -27,8 +27,8 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; OnlyBelowVersion: 0
[Files]
-Source: "instat\bin\x64\Release\instat.exe"; DestDir: "{app}"; Flags: ignoreversion
-Source: "instat\bin\x64\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "instat\bin\x86\Release\instat.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "instat\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
diff --git a/instat/Interface/IGrid.vb b/instat/Interface/IGrid.vb
index c327cacad69..f8f88a79da3 100644
--- a/instat/Interface/IGrid.vb
+++ b/instat/Interface/IGrid.vb
@@ -44,7 +44,7 @@ Public Interface IGrid
Sub UpdateAllWorksheetStyles()
- Sub ReOrderWorksheets()
+ Sub ReOrderWorksheets(strCurrWorksheet As String)
Sub UpdateWorksheetStyle(worksheet As clsWorksheetAdapter)
End Interface
diff --git a/instat/Model/Output/clsOutputElement.vb b/instat/Model/Output/clsOutputElement.vb
index c182d21128a..8fbb663af65 100644
--- a/instat/Model/Output/clsOutputElement.vb
+++ b/instat/Model/Output/clsOutputElement.vb
@@ -13,39 +13,26 @@
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see .
+Imports System.IO
Imports RScript
+
'''
-''' Output element for a r command, the output element could be just the script or the script with
-''' an image or output text
+''' Output element for an R script.
+''' Must contain an R script. The output itself is optional depending on whether the script produces the an output or not.
'''
Public Class clsOutputElement
+ 'holds the id given to the output element
Private _id As Integer
- 'hold the script elements that form the R script that produced the output
- Private _lstRScriptElements As New List(Of clsRScriptElement)
-
- Private _outputType As OutputType
- 'todo. deprecate this list with _lstTextOutput ?
- Private _lstStringOutput As New List(Of String)
+ 'holds the R script that produced the output
+ Private _strScript As String
- 'holds the file paths to the text outputs
- Private _lstTextOutput As New List(Of String)
+ 'holds the output type; Text, Image, HTML etc
+ Private _outputType As OutputType
- 'holds the file paths to the image outputs
- Private _lstImageOutput As New List(Of String)
+ 'holds the file paths to outputs or the a string output
+ Private _strOutput As String
- 'holds the file paths to the html outputs
- Private _lstHtmlOutput As New List(Of String)
-
- '''
- ''' Holds formated R Script, split into R Script Elements
- '''
- '''
- Public ReadOnly Property FormattedRScript As List(Of clsRScriptElement)
- Get
- Return _lstRScriptElements
- End Get
- End Property
'''
''' ID used for ordering elements
@@ -55,35 +42,19 @@ Public Class clsOutputElement
Get
Return _id
End Get
- Set(ByVal value As Integer)
+ Set(value As Integer)
_id = value
End Set
End Property
- Public ReadOnly Property TextOutput As String
+ Public ReadOnly Property Script As String
Get
- Return _lstTextOutput.FirstOrDefault()
+ Return _strScript
End Get
End Property
'''
- ''' Holds image file path if outputType is image file
- '''
- '''
- Public ReadOnly Property ImageOutput As String
- Get
- Return _lstImageOutput.FirstOrDefault()
- End Get
- End Property
-
- Public ReadOnly Property HtmlOutput As String
- Get
- Return _lstHtmlOutput.FirstOrDefault()
- End Get
- End Property
-
- '''
- ''' Defines the type of output
+ ''' Gets the type of output
'''
'''
Public ReadOnly Property OutputType() As OutputType
@@ -92,80 +63,63 @@ Public Class clsOutputElement
End Get
End Property
- '''
- ''' Holds the string output. Not the R Script
- '''
- '''
- Public ReadOnly Property StringOutput As String
+ Public ReadOnly Property Output As String
Get
- Return _lstStringOutput.FirstOrDefault()
+ Return _strOutput
End Get
End Property
- 'this does a shallow clone
- 'todo. add a deep clone implementation
Public Function Clone() As clsOutputElement
Return Me.MemberwiseClone
End Function
- Public Sub AddTextOutput(strFileName As String, script As List(Of clsRScriptElement))
- _lstTextOutput.Add(strFileName)
- _lstRScriptElements = script
- _outputType = OutputType.TextOutput
- End Sub
-
'''
- ''' When adding Output the script must always be added too
+ ''' Sets the contents of the output element
'''
- '''
- '''
- Public Sub AddImageOutput(strFileName As String, script As List(Of clsRScriptElement))
- _lstImageOutput.Add(strFileName)
- _lstRScriptElements = script
- _outputType = OutputType.ImageOutput
- End Sub
-
- Public Sub AddHtmlOutput(strFileName As String, script As List(Of clsRScriptElement))
- _lstHtmlOutput.Add(strFileName)
- _lstRScriptElements = script
- _outputType = OutputType.HtmlOutput
+ ''' R script producing the output
+ ''' Type of output
+ ''' Output produced, can be file name or string value
+ Public Sub SetContent(strScript As String, outputType As OutputType, Optional strOutput As String = "")
+ _strScript = strScript
+ _outputType = outputType
+ _strOutput = strOutput
End Sub
'''
- ''' Adds script and passes through RScript to split into elements
+ ''' Gets formatted R Script, split into R Script Elements
'''
- '''
- Public Sub AddScript(strScript As String)
- Try
- Dim rScript As New clsRScript(strScript)
- Dim lstTokens As List(Of clsRToken) = rScript.GetLstTokens(rScript.GetLstLexemes(strScript)) 'rScript.lstTokens
- If lstTokens IsNot Nothing Then
- For Each rToken In lstTokens
- _lstRScriptElements.Add(New clsRScriptElement With
+ '''
+ Public ReadOnly Property FormattedRScript As List(Of clsRScriptElement)
+ Get
+ Dim _lstRScriptElements As New List(Of clsRScriptElement)
+ Try
+ Dim rScript As New clsRScript(_strScript)
+ Dim lstTokens As List(Of clsRToken) = rScript.GetLstTokens(rScript.GetLstLexemes(_strScript)) 'rScript.lstTokens
+ If lstTokens IsNot Nothing Then
+ For Each rToken In lstTokens
+ _lstRScriptElements.Add(New clsRScriptElement With
{
.Text = rToken.strTxt,
.Type = rToken.enuToken
})
- Next
- _outputType = OutputType.Script
- End If
- Catch ex As Exception
- MessageBox.Show("Unable to parse the following R Script: '" & strScript & "'." &
+ Next
+ End If
+ Catch ex As Exception
+ MessageBox.Show("Unable to parse the following R Script: '" & _strScript & "'." &
Environment.NewLine & ex.Message,
"Developer Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error)
- End Try
- End Sub
+ End Try
+ Return _lstRScriptElements
+ End Get
+ End Property
+
+ Public ReadOnly Property IsFile As Boolean
+ Get
+ Return File.Exists(Output)
+ End Get
+ End Property
- '''
- ''' When adding Output the script must always be added too
- '''
- '''
- Public Sub AddStringOutput(strOutput As String, script As List(Of clsRScriptElement))
- _lstStringOutput.Add(strOutput)
- _lstRScriptElements = script
- _outputType = OutputType.TextOutput
- End Sub
End Class
\ No newline at end of file
diff --git a/instat/Model/Output/clsOutputLogger.vb b/instat/Model/Output/clsOutputLogger.vb
index a303773f9eb..74df7638012 100644
--- a/instat/Model/Output/clsOutputLogger.vb
+++ b/instat/Model/Output/clsOutputLogger.vb
@@ -20,14 +20,13 @@ Imports System.IO
'''
Public Class clsOutputLogger
Private _filteredOutputs As List(Of clsOutputList)
- Private _lastScriptElement As clsOutputElement
- Private _output As List(Of clsOutputElement)
+ Private _outputElements As List(Of clsOutputElement)
''Output not used externally at the moment but will this will need to
''change if we are to remove from the output list.
- Public ReadOnly Property Output As List(Of clsOutputElement)
+ Public ReadOnly Property OutputElements As List(Of clsOutputElement)
Get
- Return _output
+ Return _outputElements
End Get
End Property
@@ -35,7 +34,7 @@ Public Class clsOutputLogger
''' Constructor
'''
Public Sub New()
- _output = New List(Of clsOutputElement)
+ _outputElements = New List(Of clsOutputElement)
_filteredOutputs = New List(Of clsOutputList)
End Sub
@@ -71,85 +70,49 @@ Public Class clsOutputLogger
End Set
End Property
- Public Sub AddFileOutput(strFileName As String)
- Dim strFileExtension As String = Path.GetExtension(strFileName).ToLower
- Select Case strFileExtension
- Case ".png"
- AddImageOutput(strFileName)
- Case ".html"
- AddHtmlOutput(strFileName)
- Case ".txt"
- AddTextOutput(strFileName)
- Case Else
- MessageBox.Show("The file type to be added is currently not suported",
- "Developer Error",
- MessageBoxButtons.OK,
- MessageBoxIcon.Error)
- End Select
- End Sub
-
- '''
- ''' Adds string output to be displayed within the output
- '''
- '''
- Public Sub AddStringOutput(strOutput As String)
- 'Note this is always takes the last script added as corresponding script
- If _lastScriptElement Is Nothing Then
- Throw New Exception("Cannot find script to attach output to.")
- Else
- Dim outputElement As New clsOutputElement
- outputElement.AddStringOutput(strOutput, _lastScriptElement.FormattedRScript)
- _output.Add(outputElement)
- RaiseEvent NewOutputAdded(outputElement)
- End If
- End Sub
-
- '''
- ''' Adds text file to be displayed within the output
- '''
- '''
- Public Sub AddTextOutput(strFilename As String)
+ Public Sub AddOutput(strScript As String, strOutput As String, bAsFile As Boolean, bAddOutputInInternalViewer As Boolean)
'Note this always takes the last script added as corresponding script
- If _lastScriptElement Is Nothing Then
+ If String.IsNullOrWhiteSpace(strScript) Then
Throw New Exception("Cannot find script to attach output to.")
- Else
- Dim outputElement As New clsOutputElement
- outputElement.AddTextOutput(strFilename, _lastScriptElement.FormattedRScript)
- _output.Add(outputElement)
- RaiseEvent NewOutputAdded(outputElement)
+ Exit Sub
End If
- End Sub
- '''
- ''' Adds image file to be displayed within the output
- '''
- '''
- Public Sub AddImageOutput(strFilename As String)
- 'Note this always takes the last script added as corresponding script
- If _lastScriptElement Is Nothing Then
- Throw New Exception("Cannot find script to attach output to.")
+ Dim outputType As OutputType
+ If String.IsNullOrEmpty(strOutput) Then
+ outputType = OutputType.Script
+ ElseIf Not bAsFile Then
+ outputType = OutputType.TextOutput
Else
- Dim outputElement As New clsOutputElement
- outputElement.AddImageOutput(strFilename, _lastScriptElement.FormattedRScript)
- _output.Add(outputElement)
- RaiseEvent NewOutputAdded(outputElement)
+ Dim strFileExtension As String = Path.GetExtension(strOutput).ToLower
+ Select Case strFileExtension
+ Case ".png"
+ outputType = OutputType.ImageOutput
+ Case ".html"
+ outputType = OutputType.HtmlOutput
+ Case ".txt"
+ outputType = OutputType.TextOutput
+ Case Else
+ MessageBox.Show("The file type to be added is currently not suported",
+ "Developer Error",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Error)
+ Exit Sub
+ End Select
End If
- End Sub
- '''
- ''' Adds html output to be displayed within the output
- '''
- '''
- Public Sub AddHtmlOutput(strFilename As String)
- 'Note this always takes the last script added as corresponding script
- If _lastScriptElement Is Nothing Then
- Throw New Exception("Cannot find script to attach output to.")
- Else
- Dim outputElement As New clsOutputElement
- outputElement.AddHtmlOutput(strFilename, _lastScriptElement.FormattedRScript)
- _output.Add(outputElement)
+ Dim outputElement As New clsOutputElement
+ outputElement.SetContent(strScript, outputType, strOutput)
+
+ _outputElements.Add(outputElement)
+
+ If bAddOutputInInternalViewer Then
+ 'raise event for output pages
RaiseEvent NewOutputAdded(outputElement)
+ Else
+ Dim frmMaximiseOutput As New frmMaximiseOutput
+ frmMaximiseOutput.Show(strFileName:=strOutput)
End If
+
End Sub
'''
@@ -165,19 +128,6 @@ Public Class clsOutputLogger
RaiseEvent NewOutputAddedToFilteredList(outputElement, strListName)
End Sub
- '''
- ''' Adds script to be displayed within the output
- '''
- '''
- Public Sub AddRScript(strScript As String)
- 'Always add new element to last element for each script
- 'This will allow the output to atatch to the script later
- _lastScriptElement = New clsOutputElement
- _lastScriptElement.AddScript(strScript)
- _output.Add(_lastScriptElement)
- RaiseEvent NewOutputAdded(_lastScriptElement)
- End Sub
-
'''
''' Deletes output from a filtered list
'''
@@ -198,7 +148,7 @@ Public Class clsOutputLogger
'''
'''
Public Sub DeleteOutputFromMainList(outputElement As clsOutputElement)
- _output.RemoveAll(Function(x) x Is outputElement)
+ _outputElements.RemoveAll(Function(x) x Is outputElement)
End Sub
'''
diff --git a/instat/NLog.config b/instat/NLog.config
new file mode 100644
index 00000000000..3257bbb33e6
--- /dev/null
+++ b/instat/NLog.config
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/instat/NLog.xsd b/instat/NLog.xsd
new file mode 100644
index 00000000000..3425577e3c5
--- /dev/null
+++ b/instat/NLog.xsd
@@ -0,0 +1,3482 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Watch config file for changes and reload automatically.
+
+
+
+
+ Print internal NLog messages to the console. Default value is: false
+
+
+
+
+ Print internal NLog messages to the console error output. Default value is: false
+
+
+
+
+ Write internal NLog messages to the specified file.
+
+
+
+
+ Log level threshold for internal log messages. Default value is: Info.
+
+
+
+
+ Global log level threshold for application log messages. Messages below this level won't be logged.
+
+
+
+
+ Throw an exception when there is an internal error. Default value is: false. Not recommend to set to true in production!
+
+
+
+
+ Throw an exception when there is a configuration error. If not set, determined by throwExceptions.
+
+
+
+
+ Gets or sets a value indicating whether Variables should be kept on configuration reload. Default value is: false.
+
+
+
+
+ Write internal NLog messages to the System.Diagnostics.Trace. Default value is: false.
+
+
+
+
+ Write timestamps for internal NLog messages. Default value is: true.
+
+
+
+
+ Use InvariantCulture as default culture instead of CurrentCulture. Default value is: false.
+
+
+
+
+ Perform message template parsing and formatting of LogEvent messages (true = Always, false = Never, empty = Auto Detect). Default value is: empty.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Prefix for targets/layout renderers/filters/conditions loaded from this assembly.
+
+
+
+
+ Load NLog extensions from the specified file (*.dll)
+
+
+
+
+ Load NLog extensions from the specified assembly. Assembly name should be fully qualified.
+
+
+
+
+
+
+
+
+
+ Filter on the name of the logger. May include wildcard characters ('*' or '?').
+
+
+
+
+ Comma separated list of levels that this rule matches.
+
+
+
+
+ Minimum level that this rule matches.
+
+
+
+
+ Maximum level that this rule matches.
+
+
+
+
+ Level that this rule matches.
+
+
+
+
+ Comma separated list of target names.
+
+
+
+
+ Ignore further rules if this one matches.
+
+
+
+
+ Enable this rule. Note: disabled rules aren't available from the API.
+
+
+
+
+ Rule identifier to allow rule lookup with Configuration.FindRuleByName and Configuration.RemoveRuleByName.
+
+
+
+
+ Loggers matching will be restricted to specified minimum level for following rules.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Default action if none of the filters match.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the file to be included. You could use * wildcard. The name is relative to the name of the current config file.
+
+
+
+
+ Ignore any errors in the include file.
+
+
+
+
+
+
+
+ Variable value. Note, the 'value' attribute has precedence over this one.
+
+
+
+
+
+ Variable name.
+
+
+
+
+ Variable value.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Action to be taken when the lazy writer thread request queue count exceeds the set limit.
+
+
+
+
+ Limit on the number of requests in the lazy writer thread request queue.
+
+
+
+
+ Number of log events that should be processed in a batch by the lazy writer thread.
+
+
+
+
+ Whether to use the locking queue, instead of a lock-free concurrent queue
+
+
+
+
+ Number of batches of P:NLog.Targets.Wrappers.AsyncTargetWrapper.BatchSize to write before yielding into P:NLog.Targets.Wrappers.AsyncTargetWrapper.TimeToSleepBetweenBatches
+
+
+
+
+ Time in milliseconds to sleep between batches. (1 or less means trigger on new activity)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Delay the flush until the LogEvent has been confirmed as written
+
+
+
+
+ Condition expression. Log events who meet this condition will cause a flush on the wrapped target.
+
+
+
+
+ Only flush when LogEvent matches condition. Ignore explicit-flush, config-reload-flush and shutdown-flush
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Number of log events to be buffered.
+
+
+
+
+ Action to take if the buffer overflows.
+
+
+
+
+ Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes.
+
+
+
+
+ Indicates whether to use sliding timeout.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Separator for T:NLog.ScopeContext operation-states-stack.
+
+
+
+
+ Stack separator for log4j:NDC in output from T:NLog.ScopeContext nested context.
+
+
+
+
+ Renderer for log4j:event logger-xml-attribute (Default ${logger})
+
+
+
+
+ Whether to include the contents of the T:NLog.ScopeContext properties-dictionary.
+
+
+
+
+ Whether to include log4j:NDC in output from T:NLog.ScopeContext nested context.
+
+
+
+
+ Indicates whether to include source info (file name and line number) in the information sent over the network.
+
+
+
+
+ Whether to include log4j:NDC in output from T:NLog.ScopeContext nested context.
+
+
+
+
+ Option to include all properties from the log events
+
+
+
+
+ Indicates whether to include call site (class and method name) in the information sent over the network.
+
+
+
+
+ AppInfo field. By default it's the friendly name of the current AppDomain.
+
+
+
+
+ Instance of T:NLog.Layouts.Log4JXmlEventLayout that is used to format log messages.
+
+
+
+
+ Indicates whether to include NLog-specific extensions to log4j schema.
+
+
+
+
+ Action that should be taken, when more connections than P:NLog.Targets.NetworkTarget.MaxConnections.
+
+
+
+
+ SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP.
+
+
+
+
+ Action that should be taken, when more pending messages than P:NLog.Targets.NetworkTarget.MaxQueueSize.
+
+
+
+
+ Action that should be taken if the message is larger than P:NLog.Targets.NetworkTarget.MaxMessageSize
+
+
+
+
+ Maximum queue size for a single connection. Requires P:NLog.Targets.NetworkTarget.KeepConnection = true
+
+
+
+
+ Network address.
+
+
+
+
+ Indicates whether to keep connection open whenever possible.
+
+
+
+
+ The number of seconds a connection will remain idle before the first keep-alive probe is sent
+
+
+
+
+ Size of the connection cache (number of connections which are kept alive). Requires P:NLog.Targets.NetworkTarget.KeepConnection = true
+
+
+
+
+ Maximum simultaneous connections. Requires P:NLog.Targets.NetworkTarget.KeepConnection = false
+
+
+
+
+ Type of compression for protocol payload. Useful for UDP where datagram max-size is 8192 bytes.
+
+
+
+
+ Skip compression when protocol payload is below limit to reduce overhead in cpu-usage and additional headers
+
+
+
+
+ Maximum message size in bytes. On limit breach then P:NLog.Targets.NetworkTarget.OnOverflow action is activated.
+
+
+
+
+ Encoding to be used.
+
+
+
+
+ End of line value if a newline is appended at the end of log message P:NLog.Targets.NetworkTarget.NewLine.
+
+
+
+
+ Indicates whether to append newline at the end of log message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Viewer parameter name.
+
+
+
+
+ Layout that should be use to calculate the value for the parameter.
+
+
+
+
+ Whether an attribute with empty value should be included in the output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Indicates whether to auto-check if the console is available. - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App)
+
+
+
+
+ Enables output using ANSI Color Codes
+
+
+
+
+ The encoding for writing messages to the T:System.Console.
+
+
+
+
+ Indicates whether to send the log messages to the standard error instead of the standard output.
+
+
+
+
+ Indicates whether to auto-flush after M:System.Console.WriteLine
+
+
+
+
+ Indicates whether to auto-check if the console has been redirected to file - Disables coloring logic when System.Console.IsOutputRedirected = true
+
+
+
+
+ Indicates whether to use default row highlighting rules.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Background color.
+
+
+
+
+ Condition that must be met in order to set the specified foreground and background color.
+
+
+
+
+ Foreground color.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Background color.
+
+
+
+
+ Compile the P:NLog.Targets.ConsoleWordHighlightingRule.Regex? This can improve the performance, but at the costs of more memory usage. If false, the Regex Cache is used.
+
+
+
+
+ Condition that must be met before scanning the row for highlight of words
+
+
+
+
+ Foreground color.
+
+
+
+
+ Indicates whether to ignore case when comparing texts.
+
+
+
+
+ Regular expression to be matched. You must specify either text or regex.
+
+
+
+
+ Text to be matched. You must specify either text or regex.
+
+
+
+
+ Indicates whether to match whole words only.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Indicates whether to auto-flush after M:System.Console.WriteLine
+
+
+
+
+ Indicates whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App)
+
+
+
+
+ The encoding for writing messages to the T:System.Console.
+
+
+
+
+ Indicates whether to send the log messages to the standard error instead of the standard output.
+
+
+
+
+ Whether to activate internal buffering to allow batch writing, instead of using M:System.Console.WriteLine
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string.
+
+
+
+
+ Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string.
+
+
+
+
+ Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string.
+
+
+
+
+ Name of the connection string (as specified in <connectionStrings> configuration section.
+
+
+
+
+ Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string.
+
+
+
+
+ Indicates whether to keep the database connection open between the log events.
+
+
+
+
+ Name of the database provider.
+
+
+
+
+ Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase.
+
+
+
+
+ Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used.
+
+
+
+
+ Configures isolated transaction batch writing. If supported by the database, then it will improve insert performance.
+
+
+
+
+ Text of the SQL command to be run on each log level.
+
+
+
+
+ Type of the SQL command to be run on each log level.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Convert format of the property value
+
+
+
+
+ Culture used for parsing property string-value for type-conversion
+
+
+
+
+ Value to assign on the object-property
+
+
+
+
+ Name for the object-property
+
+
+
+
+ Type of the object-property
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type of the command.
+
+
+
+
+ Connection string to run the command against. If not provided, connection string from the target is used.
+
+
+
+
+ Indicates whether to ignore failures.
+
+
+
+
+ Command text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Database parameter name.
+
+
+
+
+ Layout that should be use to calculate the value for the parameter.
+
+
+
+
+ Database parameter DbType.
+
+
+
+
+ Database parameter size.
+
+
+
+
+ Database parameter precision.
+
+
+
+
+ Database parameter scale.
+
+
+
+
+ Type of the parameter.
+
+
+
+
+ Fallback value when result value is not available
+
+
+
+
+ Convert format of the database parameter value.
+
+
+
+
+ Culture used for parsing parameter string-value for type-conversion
+
+
+
+
+ Whether empty value should translate into DbNull. Requires database column to allow NULL values.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+ Layout that renders event Category.
+
+
+
+
+ Optional entry type. When not set, or when not convertible to T:System.Diagnostics.EventLogEntryType then determined by T:NLog.LogLevel
+
+
+
+
+ Layout that renders event ID.
+
+
+
+
+ Name of the Event Log to write to. This can be System, Application or any user-defined name.
+
+
+
+
+ Name of the machine on which Event Log service is running.
+
+
+
+
+ Maximum Event log size in kilobytes.
+
+
+
+
+ Message length limit to write to the Event Log.
+
+
+
+
+ Value to be used as the event Source.
+
+
+
+
+ Action to take if the message is larger than the P:NLog.Targets.EventLogTarget.MaxMessageLength option.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Indicates whether to return to the first target after any successful write.
+
+
+
+
+ Whether to enable batching, but fallback will be handled individually
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Name of the file to write to.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Indicates whether the footer should be written only when the file is archived.
+
+
+
+
+ Maximum number of archive files that should be kept.
+
+
+
+
+ Maximum days of archive files that should be kept.
+
+
+
+
+ Value of the file size threshold to archive old log file on startup.
+
+
+
+
+ Indicates whether to archive old log file on startup.
+
+
+
+
+ Indicates whether to compress archive files into the zip archive format.
+
+
+
+
+ Name of the file to be used for an archive.
+
+
+
+
+ Is the P:NLog.Targets.FileTarget.ArchiveFileName an absolute or relative path?
+
+
+
+
+ Indicates whether to automatically archive log files every time the specified time passes.
+
+
+
+
+ Value specifying the date format to use when archiving files.
+
+
+
+
+ Size in bytes above which log files will be automatically archived.
+
+
+
+
+ Way file archives are numbered.
+
+
+
+
+ Indicates whether to create directories if they do not exist.
+
+
+
+
+ Indicates whether file creation calls should be synchronized by a system global mutex.
+
+
+
+
+ Gets or set a value indicating whether a managed file stream is forced, instead of using the native implementation.
+
+
+
+
+ Is the P:NLog.Targets.FileTarget.FileName an absolute or relative path?
+
+
+
+
+ File attributes (Windows only).
+
+
+
+
+ Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong.
+
+
+
+
+ Indicates whether to write BOM (byte order mark) in created files. Defaults to true for UTF-16 and UTF-32
+
+
+
+
+ Indicates whether to enable log file(s) to be deleted.
+
+
+
+
+ Indicates whether to delete old log file on startup.
+
+
+
+
+ File encoding.
+
+
+
+
+ Indicates whether to replace file contents on each write instead of appending log message at the end.
+
+
+
+
+ Line ending mode.
+
+
+
+
+ Number of times the write is appended on the file before NLog discards the log message.
+
+
+
+
+ Delay in milliseconds to wait before attempting to write to the file again.
+
+
+
+
+ Maximum number of seconds before open files are flushed. Zero or negative means disabled.
+
+
+
+
+ Maximum number of seconds that files are kept open. Zero or negative means disabled.
+
+
+
+
+ Indicates whether concurrent writes to the log file by multiple processes on different network hosts.
+
+
+
+
+ Log file buffer size in bytes.
+
+
+
+
+ Indicates whether to automatically flush the file buffers after each log message.
+
+
+
+
+ Indicates whether to keep log file open instead of opening and closing it on each logging event.
+
+
+
+
+ Indicates whether concurrent writes to the log file by multiple processes on the same host.
+
+
+
+
+ Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write
+
+
+
+
+ Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Condition expression. Log events who meet this condition will be forwarded to the wrapped target.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Identifier to perform group-by
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Windows domain name to change context to.
+
+
+
+
+ Required impersonation level.
+
+
+
+
+ Type of the logon provider.
+
+
+
+
+ Logon Type.
+
+
+
+
+ User account password.
+
+
+
+
+ Indicates whether to revert to the credentials of the process instead of impersonating another user.
+
+
+
+
+ Username to change context to.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Interval in which messages will be written up to the P:NLog.Targets.Wrappers.LimitingTargetWrapper.MessageLimit number of messages.
+
+
+
+
+ Maximum allowed number of messages written per P:NLog.Targets.Wrappers.LimitingTargetWrapper.Interval.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Indicates whether NewLine characters in the body should be replaced with tags.
+
+
+
+
+ Priority used for sending mails.
+
+
+
+
+ Encoding to be used for sending e-mail.
+
+
+
+
+ BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
+
+
+
+
+ CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
+
+
+
+
+ Indicates whether to add new lines between log entries.
+
+
+
+
+ Indicates whether to send message as HTML instead of plain text.
+
+
+
+
+ Sender's email address (e.g. joe@domain.com).
+
+
+
+
+ Mail message body (repeated for each log message send in one mail).
+
+
+
+
+ Mail subject.
+
+
+
+
+ Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
+
+
+
+
+ Specifies how outgoing email messages will be handled.
+
+
+
+
+ SMTP Server to be used for sending.
+
+
+
+
+ SMTP Authentication mode.
+
+
+
+
+ Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic").
+
+
+
+
+ Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic").
+
+
+
+
+ Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server.
+
+
+
+
+ Port number that SMTP Server is listening on.
+
+
+
+
+ Indicates whether the default Settings from System.Net.MailSettings should be used.
+
+
+
+
+ Folder where applications save mail messages to be processed by the local SMTP server.
+
+
+
+
+ Indicates the SMTP client timeout.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Max number of items to have in memory
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Class name.
+
+
+
+
+ Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the parameter.
+
+
+
+
+ Layout that should be use to calculate the value for the parameter.
+
+
+
+
+ Fallback value when result value is not available
+
+
+
+
+ Type of the parameter.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+ SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP.
+
+
+
+
+ Action that should be taken, when more pending messages than P:NLog.Targets.NetworkTarget.MaxQueueSize.
+
+
+
+
+ Action that should be taken if the message is larger than P:NLog.Targets.NetworkTarget.MaxMessageSize
+
+
+
+
+ Maximum queue size for a single connection. Requires P:NLog.Targets.NetworkTarget.KeepConnection = true
+
+
+
+
+ Action that should be taken, when more connections than P:NLog.Targets.NetworkTarget.MaxConnections.
+
+
+
+
+ Indicates whether to keep connection open whenever possible.
+
+
+
+
+ The number of seconds a connection will remain idle before the first keep-alive probe is sent
+
+
+
+
+ Size of the connection cache (number of connections which are kept alive). Requires P:NLog.Targets.NetworkTarget.KeepConnection = true
+
+
+
+
+ Network address.
+
+
+
+
+ Maximum simultaneous connections. Requires P:NLog.Targets.NetworkTarget.KeepConnection = false
+
+
+
+
+ Type of compression for protocol payload. Useful for UDP where datagram max-size is 8192 bytes.
+
+
+
+
+ Skip compression when protocol payload is below limit to reduce overhead in cpu-usage and additional headers
+
+
+
+
+ Maximum message size in bytes. On limit breach then P:NLog.Targets.NetworkTarget.OnOverflow action is activated.
+
+
+
+
+ Encoding to be used.
+
+
+
+
+ End of line value if a newline is appended at the end of log message P:NLog.Targets.NetworkTarget.NewLine.
+
+
+
+
+ Indicates whether to append newline at the end of log message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Separator for T:NLog.ScopeContext operation-states-stack.
+
+
+
+
+ Stack separator for log4j:NDC in output from T:NLog.ScopeContext nested context.
+
+
+
+
+ Renderer for log4j:event logger-xml-attribute (Default ${logger})
+
+
+
+
+ Whether to include the contents of the T:NLog.ScopeContext properties-dictionary.
+
+
+
+
+ Whether to include log4j:NDC in output from T:NLog.ScopeContext nested context.
+
+
+
+
+ Indicates whether to include source info (file name and line number) in the information sent over the network.
+
+
+
+
+ Whether to include log4j:NDC in output from T:NLog.ScopeContext nested context.
+
+
+
+
+ Option to include all properties from the log events
+
+
+
+
+ Indicates whether to include call site (class and method name) in the information sent over the network.
+
+
+
+
+ AppInfo field. By default it's the friendly name of the current AppDomain.
+
+
+
+
+ Instance of T:NLog.Layouts.Log4JXmlEventLayout that is used to format log messages.
+
+
+
+
+ Indicates whether to include NLog-specific extensions to log4j schema.
+
+
+
+
+ Action that should be taken, when more connections than P:NLog.Targets.NetworkTarget.MaxConnections.
+
+
+
+
+ SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP.
+
+
+
+
+ Action that should be taken, when more pending messages than P:NLog.Targets.NetworkTarget.MaxQueueSize.
+
+
+
+
+ Action that should be taken if the message is larger than P:NLog.Targets.NetworkTarget.MaxMessageSize
+
+
+
+
+ Maximum queue size for a single connection. Requires P:NLog.Targets.NetworkTarget.KeepConnection = true
+
+
+
+
+ Network address.
+
+
+
+
+ Indicates whether to keep connection open whenever possible.
+
+
+
+
+ The number of seconds a connection will remain idle before the first keep-alive probe is sent
+
+
+
+
+ Size of the connection cache (number of connections which are kept alive). Requires P:NLog.Targets.NetworkTarget.KeepConnection = true
+
+
+
+
+ Maximum simultaneous connections. Requires P:NLog.Targets.NetworkTarget.KeepConnection = false
+
+
+
+
+ Type of compression for protocol payload. Useful for UDP where datagram max-size is 8192 bytes.
+
+
+
+
+ Skip compression when protocol payload is below limit to reduce overhead in cpu-usage and additional headers
+
+
+
+
+ Maximum message size in bytes. On limit breach then P:NLog.Targets.NetworkTarget.OnOverflow action is activated.
+
+
+
+
+ Encoding to be used.
+
+
+
+
+ End of line value if a newline is appended at the end of log message P:NLog.Targets.NetworkTarget.NewLine.
+
+
+
+
+ Indicates whether to append newline at the end of log message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+ Indicates whether to perform layout calculation.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Default filter to be applied when no specific rule matches.
+
+
+
+
+
+
+
+
+
+
+
+
+ Condition to be tested.
+
+
+
+
+ Resulting filter to be applied when the condition matches.
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Number of times to repeat each log message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Whether to enable batching, and only apply single delay when a whole batch fails
+
+
+
+
+ Number of retries that should be attempted on the wrapped target in case of a failure.
+
+
+
+
+ Time to wait between retries in milliseconds.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Forward F:NLog.LogLevel.Fatal to M:System.Diagnostics.Trace.Fail(System.String) (Instead of M:System.Diagnostics.Trace.TraceError(System.String))
+
+
+
+
+ Force use M:System.Diagnostics.Trace.WriteLine(System.String) independent of T:NLog.LogLevel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Indicates whether to pre-authenticate the HttpWebRequest (Requires 'Authorization' in P:NLog.Targets.WebServiceTarget.Headers parameters)
+
+
+
+
+ Value whether escaping be done according to Rfc3986 (Supports Internationalized Resource Identifiers - IRIs)
+
+
+
+
+ Value whether escaping be done according to the old NLog style (Very non-standard)
+
+
+
+
+ Value of the User-agent HTTP header.
+
+
+
+
+ Web service URL.
+
+
+
+
+ Proxy configuration when calling web service
+
+
+
+
+ Custom proxy address, include port separated by a colon
+
+
+
+
+ Protocol to be used when calling web service.
+
+
+
+
+ Web service namespace. Only used with Soap.
+
+
+
+
+ Web service method name. Only used with Soap.
+
+
+
+
+ Should we include the BOM (Byte-order-mark) for UTF? Influences the P:NLog.Targets.WebServiceTarget.Encoding property. This will only work for UTF-8.
+
+
+
+
+ Encoding.
+
+
+
+
+ Name of the root XML element, if POST of XML document chosen. If so, this property must not be null. (see P:NLog.Targets.WebServiceTarget.Protocol and F:NLog.Targets.WebServiceProtocol.XmlPost).
+
+
+
+
+ (optional) root namespace of the XML document, if POST of XML document chosen. (see P:NLog.Targets.WebServiceTarget.Protocol and F:NLog.Targets.WebServiceProtocol.XmlPost).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom').
+
+
+
+
+ Column delimiter.
+
+
+
+
+ Footer layout.
+
+
+
+
+ Header layout.
+
+
+
+
+ Body layout (can be repeated multiple times).
+
+
+
+
+ Quote Character.
+
+
+
+
+ Quoting mode.
+
+
+
+
+ Indicates whether CVS should include header.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the column.
+
+
+
+
+ Layout of the column.
+
+
+
+
+ Override of Quoting mode
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Option to render the empty object value {}
+
+
+
+
+ Option to suppress the extra spaces in the output json
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Option to include all properties from the log event (as JSON)
+
+
+
+
+ Indicates whether to include contents of the T:NLog.GlobalDiagnosticsContext dictionary.
+
+
+
+
+ Whether to include the contents of the T:NLog.ScopeContext dictionary.
+
+
+
+
+ Should forward slashes be escaped? If true, / will be converted to \/
+
+
+
+
+ Option to exclude null/empty properties from the log event (as JSON)
+
+
+
+
+ List of property names to exclude when P:NLog.Layouts.JsonLayout.IncludeAllProperties is true
+
+
+
+
+ How far should the JSON serializer follow object references before backing off
+
+
+
+
+ Option to render the empty object value {}
+
+
+
+
+ Option to suppress the extra spaces in the output json
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the attribute.
+
+
+
+
+ Layout that will be rendered as the attribute's value.
+
+
+
+
+ Fallback value when result value is not available
+
+
+
+
+ Determines whether or not this attribute will be Json encoded.
+
+
+
+
+ Should forward slashes be escaped? If true, / will be converted to \/
+
+
+
+
+ Indicates whether to escape non-ascii characters
+
+
+
+
+ Whether an attribute with empty value should be included in the output
+
+
+
+
+ Result value type, for conversion of layout rendering output
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Footer layout.
+
+
+
+
+ Header layout.
+
+
+
+
+ Body layout (can be repeated multiple times).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Option to include all properties from the log events
+
+
+
+
+ Whether to include log4j:NDC in output from T:NLog.ScopeContext nested context.
+
+
+
+
+ Whether to include log4j:NDC in output from T:NLog.ScopeContext nested context.
+
+
+
+
+ Whether to include the contents of the T:NLog.ScopeContext properties-dictionary.
+
+
+
+
+ AppInfo field. By default it's the friendly name of the current AppDomain.
+
+
+
+
+ Indicates whether to include call site (class and method name) in the information sent over the network.
+
+
+
+
+ Indicates whether to include source info (file name and line number) in the information sent over the network.
+
+
+
+
+ Log4j:event logger-xml-attribute (Default ${logger})
+
+
+
+
+ Whether the log4j:throwable xml-element should be written as CDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the root XML element
+
+
+
+
+ Value inside the root XML element
+
+
+
+
+ Whether to include the contents of the T:NLog.ScopeContext dictionary.
+
+
+
+
+ Determines whether or not this attribute will be Xml encoded.
+
+
+
+
+ List of property names to exclude when P:NLog.Layouts.XmlElementBase.IncludeAllProperties is true
+
+
+
+
+ Whether a ElementValue with empty value should be included in the output
+
+
+
+
+ Auto indent and create new lines
+
+
+
+
+ How far should the XML serializer follow object references before backing off
+
+
+
+
+ XML element name to use for rendering IList-collections items
+
+
+
+
+ XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included
+
+
+
+
+ XML element name to use when rendering properties
+
+
+
+
+ XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value
+
+
+
+
+ Option to include all properties from the log event (as XML)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the attribute.
+
+
+
+
+ Layout that will be rendered as the attribute's value.
+
+
+
+
+ Fallback value when result value is not available
+
+
+
+
+ Determines whether or not this attribute will be Xml encoded.
+
+
+
+
+ Whether an attribute with empty value should be included in the output
+
+
+
+
+ Result value type, for conversion of layout rendering output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the element
+
+
+
+
+ Whether to include the contents of the T:NLog.ScopeContext dictionary.
+
+
+
+
+ Value inside the element
+
+
+
+
+ Determines whether or not this attribute will be Xml encoded.
+
+
+
+
+ List of property names to exclude when P:NLog.Layouts.XmlElementBase.IncludeAllProperties is true
+
+
+
+
+ Whether a ElementValue with empty value should be included in the output
+
+
+
+
+ Auto indent and create new lines
+
+
+
+
+ How far should the XML serializer follow object references before backing off
+
+
+
+
+ XML element name to use for rendering IList-collections items
+
+
+
+
+ XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included
+
+
+
+
+ XML element name to use when rendering properties
+
+
+
+
+ XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value
+
+
+
+
+ Option to include all properties from the log event (as XML)
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ Condition expression.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+ Substring to be matched.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ String to compare the layout to.
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+ Substring to be matched.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ String to compare the layout to.
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ Append FilterCount to the P:NLog.LogEventInfo.Message when an event is no longer filtered
+
+
+
+
+ Insert FilterCount value into P:NLog.LogEventInfo.Properties when an event is no longer filtered
+
+
+
+
+ Applies the configured action to the initial logevent that starts the timeout period. Used to configure that it should ignore all events until timeout.
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+ Max length of filter values, will truncate if above limit
+
+
+
+
+ How long before a filter expires, and logging is accepted again
+
+
+
+
+ Default number of unique filter values to expect, will automatically increase if needed
+
+
+
+
+ Max number of unique filter values to expect simultaneously
+
+
+
+
+ Default buffer size for the internal buffers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/instat/UserControl/ucrOutputPage.vb b/instat/UserControl/ucrOutputPage.vb
index 5972b2b9fba..96188967e12 100644
--- a/instat/UserControl/ucrOutputPage.vb
+++ b/instat/UserControl/ucrOutputPage.vb
@@ -15,6 +15,7 @@
' along with this program. If not, see .
Imports System.Runtime.InteropServices
+Imports RScript
'''
''' Output page for R outputs
'''
@@ -128,20 +129,177 @@ Public Class ucrOutputPage
'''
'''
Public Sub AddNewOutput(outputElement As clsOutputElement)
- Select Case outputElement.OutputType
- Case OutputType.Script
- AddNewScript(outputElement)
- Case OutputType.TextOutput
- AddNewTextOutput(outputElement)
- Case OutputType.ImageOutput
- AddNewImageOutput(outputElement)
- Case OutputType.HtmlOutput
- AddNewHtmlOutput(outputElement)
- End Select
+ 'add the script first. This applies to whether the output has an output or not or
+ 'whether it's just a script output
+ AddNewScript(outputElement)
+
+ 'then add the output of the script. If the output element is just a script, ignore it since it's already been added above
+ If Not String.IsNullOrEmpty(outputElement.Output) Then
+ Select Case outputElement.OutputType
+ Case OutputType.TextOutput
+ AddNewTextOutput(outputElement)
+ Case OutputType.ImageOutput
+ AddNewImageOutput(outputElement)
+ Case OutputType.HtmlOutput
+ AddNewHtmlOutput(outputElement)
+ End Select
+ End If
+
pnlMain.VerticalScroll.Value = pnlMain.VerticalScroll.Maximum
pnlMain.PerformLayout()
End Sub
+ Private Sub AddNewScript(outputElement As clsOutputElement)
+ Dim richTextBox As New RichTextBox With {
+ .Dock = DockStyle.Top,
+ .BorderStyle = BorderStyle.None
+ }
+
+ 'if settings are not available or both show commands and comments settings are enabled then just show the whole script
+ If frmMain.clsInstatOptions Is Nothing OrElse (frmMain.clsInstatOptions.bIncludeCommentDefault AndAlso frmMain.clsInstatOptions.bCommandsinOutput) Then
+ FillRichTextBoxWithFormatedRScript(richTextBox, outputElement.FormattedRScript)
+ Else
+
+ 'if either show commands or comments settings is enabled show the script that corresponds to either
+ If frmMain.clsInstatOptions.bIncludeCommentDefault Then
+ 'show comments only
+ For Each line As clsRScriptElement In outputElement.FormattedRScript
+ If line.Type = clsRToken.typToken.RComment Then
+ AddFormatedTextToRichTextBox(richTextBox, line.Text, OutputFont.GetFontForScriptType(line.Type), OutputFont.GetColourForScriptType(line.Type))
+ End If
+ Next
+
+ ElseIf frmMain.clsInstatOptions.bCommandsinOutput Then
+ 'show command lines that are not comments
+ For Each line As clsRScriptElement In outputElement.FormattedRScript
+ If Not (line.Type = clsRToken.typToken.RComment) Then
+ AddFormatedTextToRichTextBox(richTextBox, line.Text, OutputFont.GetFontForScriptType(line.Type), OutputFont.GetColourForScriptType(line.Type))
+ End If
+ Next
+ End If
+ End If
+
+ 'if no contents added just exit sub
+ If richTextBox.TextLength = 0 Then
+ Exit Sub
+ End If
+
+ Dim panel As Panel = AddElementPanel(outputElement)
+ panel.Controls.Add(richTextBox)
+ panel.Controls.SetChildIndex(richTextBox, 0)
+ SetRichTextBoxHeight(richTextBox)
+ AddHandler richTextBox.KeyUp, AddressOf richTextBox_CopySelectedText
+ AddHandler richTextBox.MouseLeave, AddressOf panelContents_MouseLeave
+ End Sub
+
+ Private Sub AddNewTextOutput(outputElement As clsOutputElement)
+ Dim panel As Panel = AddElementPanel(outputElement)
+
+ If outputElement.IsFile Then
+ Dim linkLabel As New LinkLabel
+ Dim ucrTextViewer As New ucrTextViewer
+
+ linkLabel.Text = "Maximise"
+ AddHandler linkLabel.Click, Sub()
+ Dim frmMaximiseOutput As New frmMaximiseOutput
+ frmMaximiseOutput.Show(strFileName:=outputElement.Output)
+ End Sub
+
+ ucrTextViewer.LoadTextFile(strFileName:=outputElement.Output)
+ ucrTextViewer.FormatText(OutputFont.ROutputFont, OutputFont.ROutputColour)
+
+ AddHandler ucrTextViewer.richTextBox.MouseLeave, AddressOf panelContents_MouseLeave
+
+ panel.Controls.Add(linkLabel)
+ panel.Controls.Add(ucrTextViewer)
+ panel.Controls.SetChildIndex(linkLabel, 0)
+ panel.Controls.SetChildIndex(ucrTextViewer, 0)
+ linkLabel.Dock = DockStyle.Top
+ ucrTextViewer.Dock = DockStyle.Top
+ Else
+ Dim richTextBox As New RichTextBox With {
+ .Dock = DockStyle.Top,
+ .BorderStyle = BorderStyle.None
+ }
+ AddFormatedTextToRichTextBox(richTextBox, outputElement.Output, OutputFont.ROutputFont, OutputFont.ROutputColour)
+ panel.Controls.Add(richTextBox)
+ panel.Controls.SetChildIndex(richTextBox, 0)
+ SetRichTextBoxHeight(richTextBox)
+ AddHandler richTextBox.KeyUp, AddressOf richTextBox_CopySelectedText
+ AddHandler richTextBox.MouseLeave, AddressOf panelContents_MouseLeave
+
+ End If
+ End Sub
+
+ Private Sub AddNewImageOutput(outputElement As clsOutputElement)
+ Dim panel As Panel = AddElementPanel(outputElement)
+ Dim linkLabel As New LinkLabel
+ Dim pictureBox As New PictureBox
+
+ linkLabel.Text = "Maximise"
+
+ pictureBox.Load(outputElement.Output)
+ panel.Controls.Add(linkLabel)
+ panel.Controls.Add(pictureBox)
+ panel.Controls.SetChildIndex(linkLabel, 0)
+ panel.Controls.SetChildIndex(pictureBox, 0)
+ linkLabel.Dock = DockStyle.Top
+ pictureBox.Dock = DockStyle.Top
+ pictureBox.SizeMode = PictureBoxSizeMode.Zoom
+ SetPictureBoxHeight(pictureBox)
+
+ AddHandler linkLabel.Click, Sub()
+ Dim frmMaximiseOutput As New frmMaximiseOutput
+ frmMaximiseOutput.Show(strFileName:=outputElement.Output)
+ End Sub
+ End Sub
+
+ Private Sub AddNewHtmlOutput(outputElement As clsOutputElement)
+ Dim panel As Panel = AddElementPanel(outputElement)
+ Dim linkLabel As New LinkLabel
+
+ If RuntimeInformation.IsOSPlatform(OSPlatform.Windows) AndAlso CefRuntimeWrapper.IsCefInitilised Then
+ Dim ucrWebview As New ucrWebViewer()
+ linkLabel.Text = "Maximise"
+ AddHandler linkLabel.Click, Sub()
+ Dim frmMaximiseOutput As New frmMaximiseOutput
+ frmMaximiseOutput.Show(strFileName:=outputElement.Output)
+ End Sub
+
+ ucrWebview.LoadHtmlFile(outputElement.Output)
+
+ panel.Controls.Add(linkLabel)
+ panel.Controls.Add(ucrWebview)
+ panel.Controls.SetChildIndex(linkLabel, 0)
+ panel.Controls.SetChildIndex(ucrWebview, 0)
+
+ linkLabel.Dock = DockStyle.Top
+ ucrWebview.Dock = DockStyle.Top
+ Else
+
+ linkLabel.Text = "View html file"
+ AddHandler linkLabel.Click, Sub()
+ 'display the html output in default browser
+ Cursor = Cursors.WaitCursor
+ Process.Start(outputElement.Output)
+ Cursor = Cursors.Default
+ End Sub
+
+ panel.Controls.Add(linkLabel)
+ panel.Controls.SetChildIndex(linkLabel, 0)
+
+ linkLabel.Dock = DockStyle.Top
+
+ 'display the html output in default browser
+ Cursor = Cursors.WaitCursor
+ Process.Start(outputElement.Output)
+ Cursor = Cursors.Default
+ End If
+
+ End Sub
+
+
+
'''
''' Copies selected elements to clipboard
'''
@@ -208,25 +366,12 @@ Public Class ucrOutputPage
AddHandler checkBox.MouseLeave, AddressOf panelContents_MouseLeave
End Sub
- Private Sub AddNewScript(outputElement As clsOutputElement)
- Dim richTextBox As New RichTextBox With {
- .Dock = DockStyle.Top,
- .BorderStyle = BorderStyle.None
- }
- FillRichTextBoxWithFormatedRScript(richTextBox, outputElement.FormattedRScript)
- Dim panel As Panel = AddElementPanel(outputElement)
- panel.Controls.Add(richTextBox)
- panel.Controls.SetChildIndex(richTextBox, 0)
- SetRichTextBoxHeight(richTextBox)
- AddHandler richTextBox.KeyUp, AddressOf richTextBox_CopySelectedText
- AddHandler richTextBox.MouseLeave, AddressOf panelContents_MouseLeave
- End Sub
Private Function CopyOneImageOnly() As Boolean
If SelectedElements.Count = 1 AndAlso SelectedElements(0).OutputType = OutputType.ImageOutput Then
Dim element As clsOutputElement = SelectedElements(0)
Clipboard.Clear()
- Clipboard.SetImage(GetBitmapFromFile(element.ImageOutput))
+ Clipboard.SetImage(GetBitmapFromFile(element.Output))
Return True
End If
Return False
@@ -237,11 +382,12 @@ Public Class ucrOutputPage
Case OutputType.Script
FillRichTextBoxWithFormatedRScript(richText, element.FormattedRScript)
Case OutputType.TextOutput
- AddFormatedTextToRichTextBox(richText, element.StringOutput, OutputFont.ROutputFont, OutputFont.ROutputColour)
+ 'todo. check if output is file or not. if file, read the contents of the file
+ AddFormatedTextToRichTextBox(richText, element.Output, OutputFont.ROutputFont, OutputFont.ROutputColour)
Case OutputType.ImageOutput
Clipboard.Clear()
'todo. instead of copy paste, add image to rtf directly from file?
- Clipboard.SetImage(GetBitmapFromFile(element.ImageOutput))
+ Clipboard.SetImage(GetBitmapFromFile(element.Output))
richText.Paste()
End Select
richText.AppendText(Environment.NewLine)
@@ -279,110 +425,6 @@ Public Class ucrOutputPage
Next
End Sub
- Private Sub AddNewTextOutput(outputElement As clsOutputElement)
- Dim panel As Panel = AddElementPanel(outputElement)
-
- If outputElement.StringOutput IsNot Nothing Then
- Dim richTextBox As New RichTextBox With {
- .Dock = DockStyle.Top,
- .BorderStyle = BorderStyle.None
- }
- AddFormatedTextToRichTextBox(richTextBox, outputElement.StringOutput, OutputFont.ROutputFont, OutputFont.ROutputColour)
- panel.Controls.Add(richTextBox)
- panel.Controls.SetChildIndex(richTextBox, 0)
- SetRichTextBoxHeight(richTextBox)
- AddHandler richTextBox.KeyUp, AddressOf richTextBox_CopySelectedText
- AddHandler richTextBox.MouseLeave, AddressOf panelContents_MouseLeave
- Else
- Dim linkLabel As New LinkLabel
- Dim ucrTextViewer As New ucrTextViewer
-
- linkLabel.Text = "Maximise"
- AddHandler linkLabel.Click, Sub()
- Dim frmMaximiseOutput As New frmMaximiseOutput
- frmMaximiseOutput.Show(strFileName:=outputElement.TextOutput)
- End Sub
-
- ucrTextViewer.LoadTextFile(strFileName:=outputElement.TextOutput)
- ucrTextViewer.FormatText(OutputFont.ROutputFont, OutputFont.ROutputColour)
-
- AddHandler ucrTextViewer.richTextBox.MouseLeave, AddressOf panelContents_MouseLeave
-
- panel.Controls.Add(linkLabel)
- panel.Controls.Add(ucrTextViewer)
- panel.Controls.SetChildIndex(linkLabel, 0)
- panel.Controls.SetChildIndex(ucrTextViewer, 0)
- linkLabel.Dock = DockStyle.Top
- ucrTextViewer.Dock = DockStyle.Top
- End If
- End Sub
-
- Private Sub AddNewImageOutput(outputElement As clsOutputElement)
- Dim panel As Panel = AddElementPanel(outputElement)
- Dim linkLabel As New LinkLabel
- Dim pictureBox As New PictureBox
-
- linkLabel.Text = "Maximise"
-
- pictureBox.Load(outputElement.ImageOutput)
- panel.Controls.Add(linkLabel)
- panel.Controls.Add(pictureBox)
- panel.Controls.SetChildIndex(linkLabel, 0)
- panel.Controls.SetChildIndex(pictureBox, 0)
- linkLabel.Dock = DockStyle.Top
- pictureBox.Dock = DockStyle.Top
- pictureBox.SizeMode = PictureBoxSizeMode.Zoom
- SetPictureBoxHeight(pictureBox)
-
- AddHandler linkLabel.Click, Sub()
- Dim frmMaximiseOutput As New frmMaximiseOutput
- frmMaximiseOutput.Show(strFileName:=outputElement.ImageOutput)
- End Sub
- End Sub
-
- Private Sub AddNewHtmlOutput(outputElement As clsOutputElement)
- Dim panel As Panel = AddElementPanel(outputElement)
- Dim linkLabel As New LinkLabel
-
- If RuntimeInformation.IsOSPlatform(OSPlatform.Windows) AndAlso CefRuntimeWrapper.isCefInitilised Then
- Dim ucrWebview As New ucrWebViewer()
- linkLabel.Text = "Maximise"
- AddHandler linkLabel.Click, Sub()
- Dim frmMaximiseOutput As New frmMaximiseOutput
- frmMaximiseOutput.Show(strFileName:=outputElement.HtmlOutput)
- End Sub
-
- ucrWebview.LoadHtmlFile(outputElement.HtmlOutput)
-
- panel.Controls.Add(linkLabel)
- panel.Controls.Add(ucrWebview)
- panel.Controls.SetChildIndex(linkLabel, 0)
- panel.Controls.SetChildIndex(ucrWebview, 0)
-
- linkLabel.Dock = DockStyle.Top
- ucrWebview.Dock = DockStyle.Top
- Else
-
- linkLabel.Text = "View html file"
- AddHandler linkLabel.Click, Sub()
- 'display the html output in default browser
- Cursor = Cursors.WaitCursor
- Process.Start(outputElement.HtmlOutput)
- Cursor = Cursors.Default
- End Sub
-
- panel.Controls.Add(linkLabel)
- panel.Controls.SetChildIndex(linkLabel, 0)
-
- linkLabel.Dock = DockStyle.Top
-
- 'display the html output in default browser
- Cursor = Cursors.WaitCursor
- Process.Start(outputElement.HtmlOutput)
- Cursor = Cursors.Default
- End If
-
- End Sub
Private Sub SetRichTextBoxHeight(richTextBox As RichTextBox)
richTextBox.Height = (richTextBox.GetLineFromCharIndex(richTextBox.Text.Length) + 1) * (richTextBox.Font.Height + richTextBox.Margin.Vertical) + 5
diff --git a/instat/UserControl/ucrOutputPages.vb b/instat/UserControl/ucrOutputPages.vb
index bb94d673be4..ef44609f511 100644
--- a/instat/UserControl/ucrOutputPages.vb
+++ b/instat/UserControl/ucrOutputPages.vb
@@ -223,7 +223,7 @@ Public Class ucrOutputPages
_outputLogger.DeleteOutputFromMainList(element)
Next
_selectedOutputPage.ClearAllOutputs()
- For Each output In _outputLogger.Output
+ For Each output In _outputLogger.OutputElements
_selectedOutputPage.AddNewOutput(output)
Next
EnableDisableTopButtons()
@@ -244,8 +244,8 @@ Public Class ucrOutputPages
'''
Public Sub ClearOutputWindow()
tabControl.SelectedIndex = 0
- For i = _outputLogger.Output.Count - 1 To 0 Step -1
- _outputLogger.DeleteOutputFromMainList(_outputLogger.Output(i))
+ For i = _outputLogger.OutputElements.Count - 1 To 0 Step -1
+ _outputLogger.DeleteOutputFromMainList(_outputLogger.OutputElements(i))
Next
_selectedOutputPage.ClearAllOutputs()
EnableDisableTopButtons()
diff --git a/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb b/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb
index 245fa1234f2..2b34c3d76f3 100644
--- a/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb
+++ b/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb
@@ -82,7 +82,10 @@ Public MustInherit Class ucrLinuxGrid
Return New clsWorksheetAdapter(tab)
End Function
- Private Sub ReOrderWorksheets() Implements IGrid.ReOrderWorksheets
+ '''
+ ''' Reorder the worksheets
+ '''
+ Private Sub ReOrderWorksheets(strCurrWorksheet As String) Implements IGrid.ReOrderWorksheets
'assuming the databook will always have all the data frames
'and the grid may not have all the data frame worksheets equivalent
'and all data frames in the data book have changed their order positions
@@ -95,12 +98,18 @@ Public MustInherit Class ucrLinuxGrid
lstWorkSheetsFound.Add(fillWorkSheet)
End If
Next
- If lstWorkSheetsFound.Count > 1 Then
+
+ 'in the second condition we check if all data frames in the data book
+ 'have the same order positions with all data frame sheets in the grid
+ 'if not this check will return False which means the data frames in the data book are reordered
+ If lstWorkSheetsFound.Count > 1 AndAlso Not _clsDataBook.DataFrames.Select(Function(x) x.strName).ToList().
+ SequenceEqual(tcTabs.Controls.OfType(Of TabPage).Select(Function(x) x.Text).ToList) Then
'reorder the worksheets based on the filled list
For i As Integer = 0 To lstWorkSheetsFound.Count - 1
tcTabs.TabPages.Remove(lstWorkSheetsFound(i))
tcTabs.TabPages.Insert(i, lstWorkSheetsFound(i))
Next
+ tcTabs.SelectedTab = GetTabPage(strCurrWorksheet) 'set the selected sheet back active before reordering
End If
End Sub
diff --git a/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb b/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb
index 22eeacacc92..daac4bcfb7e 100644
--- a/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb
+++ b/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb
@@ -71,7 +71,10 @@ Public MustInherit Class ucrReoGrid
Return New clsWorksheetAdapter(fillWorkSheet)
End Function
- Private Sub ReOrderWorksheets() Implements IGrid.ReOrderWorksheets
+ '''
+ ''' Reorder the worksheets
+ '''
+ Private Sub ReOrderWorksheets(strCurrWorksheet As String) Implements IGrid.ReOrderWorksheets
'assuming the databook will always have all the data frames
'and the grid may not have all the data frame worksheets equivalent
'and all data frames in the data book have changed their order positions
@@ -84,12 +87,17 @@ Public MustInherit Class ucrReoGrid
lstWorkSheetsFound.Add(fillWorkSheet)
End If
Next
- If lstWorkSheetsFound.Count > 1 Then
+
+ 'in the second condition we check if all data frames in the data book
+ 'have the same order positions with all data frame sheets in the grid
+ 'if not this check will return False which means the data frames in the data book are reordered
+ If lstWorkSheetsFound.Count > 1 AndAlso Not _clsDataBook.DataFrames.Select(Function(x) x.strName).ToList().
+ SequenceEqual(grdData.Worksheets.Select(Function(x) x.Name).ToList()) Then
'reorder the worksheets based on the filled list
For i As Integer = 0 To lstWorkSheetsFound.Count - 1
grdData.MoveWorksheet(lstWorkSheetsFound(i), i)
- grdData.CurrentWorksheet = lstWorkSheetsFound(i)
Next
+ grdData.CurrentWorksheet = grdData.GetWorksheetByName(strCurrWorksheet) 'set the selected sheet back active before reordering
End If
End Sub
diff --git a/instat/clsInstatOptions.vb b/instat/clsInstatOptions.vb
index 563a5bce9e4..8cb44ad1af4 100644
--- a/instat/clsInstatOptions.vb
+++ b/instat/clsInstatOptions.vb
@@ -282,11 +282,13 @@ Imports RDotNet
End If
- If iMaxOutputsHeight IsNot Nothing Then
- SetMaximumOutputsHeight(iMaxOutputsHeight)
- Else
- SetMaximumOutputsHeight(clsInstatOptionsDefaults.DEFAULTiMaxOutputsHeight)
- End If
+ 'todo. Temporarily disabled
+ 'If iMaxOutputsHeight IsNot Nothing Then
+ ' SetMaximumOutputsHeight(iMaxOutputsHeight)
+ 'Else
+ ' SetMaximumOutputsHeight(clsInstatOptionsDefaults.DEFAULTiMaxOutputsHeight)
+ 'End If
+ SetMaximumOutputsHeight(-1)
End Sub
Public Sub SetMaxRows(iRows As Integer)
diff --git a/instat/clsInstatOptionsDefaults.vb b/instat/clsInstatOptionsDefaults.vb
index cf6f04d66a1..08626ded9b9 100644
--- a/instat/clsInstatOptionsDefaults.vb
+++ b/instat/clsInstatOptionsDefaults.vb
@@ -16,7 +16,7 @@
Public Class clsInstatOptionsDefaults
Public Shared ReadOnly DEFAULTbIncludeRDefaultParameters As Boolean = False
- Public Shared ReadOnly DEFAULTbCommandsinOutput As Boolean = True
+ Public Shared ReadOnly DEFAULTbCommandsinOutput As Boolean = False
Public Shared ReadOnly DEFAULTbIncludeCommentDefault As Boolean = True
Public Shared ReadOnly DEFAULTbShowProcurementMenu As Boolean = True
Public Shared ReadOnly DEFAULTbShowClimaticMenu As Boolean = True
@@ -53,5 +53,5 @@ Public Class clsInstatOptionsDefaults
Public Shared ReadOnly DEFAULTstrClimsoftHost As String = "127.0.0.1"
Public Shared ReadOnly DEFAULTstrClimsoftPort As String = "3308"
Public Shared ReadOnly DEFAULTstrClimsoftUsername As String = "root"
- Public Shared ReadOnly DEFAULTiMaxOutputsHeight As Integer = 300
+ Public Shared ReadOnly DEFAULTiMaxOutputsHeight As Integer = -1 'todo. temporarily disabled
End Class
diff --git a/instat/clsRCodeStructure.vb b/instat/clsRCodeStructure.vb
index ae8a393323e..26ba9545ee8 100644
--- a/instat/clsRCodeStructure.vb
+++ b/instat/clsRCodeStructure.vb
@@ -175,13 +175,6 @@ Public Class RCodeStructure
' bExcludeAssignedFunctionOutput which it uses for the base code. Eventually migrate these out of RSyntax.
End Sub
- Public Function GetRObjectToAssignTo() As String
- Return _strAssignToObject
- End Function
-
- Public Function IsAssigned()
- Return Not String.IsNullOrEmpty(_strAssignToObject)
- End Function
'''--------------------------------------------------------------------------------------------
''' Deprecated.
@@ -294,6 +287,42 @@ Public Class RCodeStructure
End Sub
+
+ '''
+ ''' Gets the assign to variable
+ '''
+ ''' assign to value
+ Public Function GetRObjectToAssignTo() As String
+ Return _strAssignToObject
+ End Function
+
+ Public Function IsAssigned()
+ Return Not String.IsNullOrEmpty(_strAssignToObject)
+ End Function
+
+ '''
+ ''' Sets the assign to variable for objects that will not be added in the data book and displayed in the output viewer.
+ ''' For instance objects used as input parameters for other R funtions
+ '''
+ ''' The new value for the R object assignment string
+ Public Sub SetAssignToObject(strRObjectToAssignTo As String)
+ Me._strAssignToObject = strRObjectToAssignTo
+ Me._strAssignToObjectTypeLabel = ""
+ Me._strAssignToObjectFormat = ""
+ Me._strDataFrameNameToAddAssignToObject = ""
+ Me._strAssignToName = ""
+ End Sub
+
+ '''
+ ''' Sets the assign to variables for objects that will be added to the databook and possibly displayed in the output viewer.
+ ''' To prevent the object from being diplayed in the output viewer,
+ ''' set bExcludeAssignedFunctionOutput = False (Not recommended, use the SetAssignToObject subroutine to get similar functionality).
+ '''
+ ''' The new value for the R object assignment string
+ ''' The new value for the object type label
+ ''' The new value for the object format
+ ''' The new value for the data frame name that the object will be added to.
+ ''' The new value for the object name
Public Sub SetAssignToOutputObject(strRObjectToAssignTo As String,
strRObjectTypeLabelToAssignTo As String,
strRObjectFormatToAssignTo As String,
@@ -507,12 +536,20 @@ Public Class RCodeStructure
clsGetRObject.AddParameter("data_name", Chr(34) & _strDataFrameNameToAddAssignToObject & Chr(34))
End If
+ clsGetRObject.AddParameter("object_name", Chr(34) & _strAssignToName & Chr(34))
+
clsAddRObject.AddParameter("object_name", Chr(34) & _strAssignToName & Chr(34))
clsAddRObject.AddParameter("object_type_label", Chr(34) & _strAssignToObjectTypeLabel & Chr(34))
clsAddRObject.AddParameter("object_format", Chr(34) & _strAssignToObjectFormat & Chr(34))
- clsAddRObject.AddParameter("object", _strAssignToObject)
- clsGetRObject.AddParameter("object_name", Chr(34) & _strAssignToName & Chr(34))
+ If _strAssignToObjectTypeLabel = RObjectTypeLabel.Graph Then
+ Dim clsCheckGraphRFunction As New RFunction
+ clsCheckGraphRFunction.SetRCommand("check_graph")
+ clsCheckGraphRFunction.AddParameter("graph_object", _strAssignToObject)
+ clsAddRObject.AddParameter("object", clsRFunctionParameter:=clsCheckGraphRFunction)
+ Else
+ clsAddRObject.AddParameter("object", strParameterValue:=_strAssignToObject)
+ End If
'construct the scripts
strScript = strScript & clsAddRObject.ToScript() & Environment.NewLine
diff --git a/instat/clsRLink.vb b/instat/clsRLink.vb
index 94ecf356ab4..28380d7c9f8 100644
--- a/instat/clsRLink.vb
+++ b/instat/clsRLink.vb
@@ -107,13 +107,6 @@ Public Class RLink
'''
Public bLogRScripts As Boolean = False
- '''
- ''' Is set to True when the R output window is defined.
- ''' If set to False, R scripts will not be shouwn in the output viewer
- '''
- Public bOutputRscripts As Boolean = True
-
-
''' True to climate object exists.
Public bClimateObjectExists As Boolean = False 'TODO SJL 23/04/20 Not used. Delete?
@@ -747,6 +740,7 @@ Public Class RLink
'''
''' This method executes the R script and displays the output. The
''' output may be displayed as text, graph or html (see ).
+ ''' Any R script that is necessary for reproducibility has to be run through this subroutine.
'''
''' is the R script to execute.
''' defines how to display the R output. todo deprecate this.
@@ -787,7 +781,7 @@ Public Class RLink
''' .
''' if false and an exception is raised then open a message box that
''' displays the exception message.
- ''' if true and the script produces and output, the output will be added
+ ''' if true and the script produces and output, the output will be added
''' in the output viewer, if false, the output will be displayed in a different viewer.
''' displays the exception message.
'''--------------------------------------------------------------------------------------------
@@ -798,41 +792,20 @@ Public Class RLink
Optional bShowWaitDialogOverride As Nullable(Of Boolean) = Nothing,
Optional bUpdateGrids As Boolean = True,
Optional bSilent As Boolean = False,
- Optional bAddOutputInViewer As Boolean = True)
- Dim strCapturedScript As String
- Dim expTemp As RDotNet.SymbolicExpression
- Dim strTemp As String = ""
- Dim strOutput As String = ""
- Dim strScriptWithComment As String
- Dim strSplitScript As String
- Dim strTempGraphsDirectory As String
- Dim clsPNGFunction As New RFunction
- Dim strTempAssignTo As String = ".temp_val"
- Dim bSuccess As Boolean
- Dim bError As Boolean = False
-
- ' set temp folder for graphs, e.g. to "C:\Users\myName\Temp\R_Instat_Temp_Graphs"
- strTempGraphsDirectory = System.IO.Path.Combine(System.IO.Path.GetTempPath() & "R_Instat_Temp_Graphs")
- 'Need to create directory as R unable to create the directory in linux
- If Not Directory.Exists(strTempGraphsDirectory) Then
- Directory.CreateDirectory(strTempGraphsDirectory)
- End If
+ Optional bAddOutputInInternalViewer As Boolean = True)
- ' if comment provided
- If strComment <> "" Then
- ' Prefix comment to script, e.g. "# Code generated by the dialog, Import Dataset" & vbCrLf & "new_RDS <- readRDS(file=""C:/Users/myName ...
- strScriptWithComment = GetFormattedComment(strComment) & Environment.NewLine & strScript
- Else
- strScriptWithComment = strScript
+ 'if there is no script to run then just ignore and exit sub
+ If String.IsNullOrWhiteSpace(strScript) Then
+ Exit Sub
End If
+ 'If comment provided
+ 'Prefix comment to script, e.g. "# Code generated by the dialog, Import Dataset" & vbCrLf & "new_RDS <- readRDS(file=""C:/Users/myName ...
+ Dim strScriptWithComment As String = If(String.IsNullOrEmpty(strComment), strScript, GetFormattedComment(strComment) & Environment.NewLine & strScript)
+
If bLogRScripts Then
txtLog.Text = txtLog.Text & strScriptWithComment & Environment.NewLine
End If
- ' if the output window is defined then output comments (if exists) and script (if 'bShowCommands' is true).
- If bOutputRscripts Then
- clsOutputLogger.AddRScript(strScriptWithComment)
- End If
'TODO SJL 20/04/20 - is the commented out check below needed?
'If strScript.Length > 2000 Then
@@ -842,106 +815,99 @@ Public Class RLink
'get the last R script command. todo, this should eventually use the RScript library functions to identify the last R script command
Dim strLastScript As String = GetRunnableCommandLines(strScript).LastOrDefault
- If strLastScript IsNot Nothing AndAlso (strLastScript.Contains("get_object") OrElse strLastScript.Contains("get_last_object") OrElse strLastScript.Contains("view_object")) Then
- Try
- 'if object output should be returned as a file do the following.
- Dim strNewAssignedToScript As String = ConstructAssignTo(strTempAssignTo, strScript)
- Evaluate(strNewAssignedToScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
- expTemp = GetSymbol(strTempAssignTo)
- If expTemp IsNot Nothing Then
- 'get the file path name
- strTemp = String.Join(Environment.NewLine, expTemp.AsCharacter())
- If File.Exists(strTemp) Then
- If bAddOutputInViewer Then
- clsOutputLogger.AddFileOutput(strTemp)
- Else
- Dim frmMaximiseOutput As New frmMaximiseOutput
- frmMaximiseOutput.Show(strFileName:=strTemp)
- End If
- End If
- End If
- 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)")
- End Try
- ElseIf iCallType = 0 Then 'if script output should be ignored. to do. deprecated
+ If strLastScript.Contains("get_object") OrElse strLastScript.Contains("get_last_object") OrElse strLastScript.Contains("view_object") Then
+
+ Dim strFilePathName As String = GetFileOutput(strScript, bSilent, bSeparateThread, bShowWaitDialogOverride)
+ If Not String.IsNullOrEmpty(strFilePathName) Then
+ clsOutputLogger.AddOutput(strScriptWithComment, strFilePathName, True, bAddOutputInInternalViewer)
+ End If
+
+ ElseIf iCallType = 0 Then
+ 'if script output should be ignored. todo. deprecate this block after implementing correctly
Evaluate(strScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
- ElseIf iCallType = 1 OrElse iCallType = 4 Then 'else if script output should be stored in a temp variable
- ' TODO SJL In RInstat, iCallType only seems to be 0, 2 or 3. Are call types 1 and 4 used?
- Try
- 'TODO check this is valid syntax in all cases
- ' i.e. this is potentially: x <- y <- 1
- Evaluate(strTempAssignTo & " <- " & strScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
- expTemp = GetSymbol(strTempAssignTo)
- If expTemp IsNot Nothing Then
- strTemp = String.Join(Environment.NewLine, expTemp.AsCharacter())
- strOutput = strOutput & strTemp & Environment.NewLine
- End If
- 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)")
- End Try
- Else ' else if script output should not be ignored, not stored in a graph and not stored in a variable
- 'if script comes from script window, or else script is a single line
- If iCallType = 5 OrElse strScript.Trim(Environment.NewLine.ToCharArray).LastIndexOf(Environment.NewLine.ToCharArray) = -1 Then
- 'wrap the whole script in 'capture.output'
- ' 'capture.output' returns the result of the R command as a string.
- ' This string can be displayed later in the output window.
- strCapturedScript = "capture.output(" & strScript & ")"
- Else 'else if script is multi-line
- 'execute all lines apart from the final line
- strSplitScript = Left(strScript, strScript.Trim(Environment.NewLine.ToCharArray).LastIndexOf(Environment.NewLine.ToCharArray))
- If strSplitScript <> "" Then
- Try
- bError = Not Evaluate(strSplitScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
- 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)")
- End Try
+ clsOutputLogger.AddOutput(strScriptWithComment, "", False, bAddOutputInInternalViewer)
+ ElseIf iCallType = 1 OrElse iCallType = 4 Then
+ 'todo. icall types 1 and 4 seem not to be used anywhere? remove this block?
+ 'else if script output should be stored in a temp variable
+ ' TODO SJL In RInstat, iCallType only seems to be 0, 2 or 3. Are icall types 1 and 4 used?
+
+ Dim strTempAssignTo As String = ".temp_val"
+ 'TODO check this is valid syntax in all cases
+ ' i.e. this is potentially: x <- y <- 1
+ Evaluate(strTempAssignTo & " <- " & strScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
+ Dim expTemp As RDotNet.SymbolicExpression = GetSymbol(strTempAssignTo)
+ If expTemp IsNot Nothing Then
+ Dim strOutput As String = String.Join(Environment.NewLine, expTemp.AsCharacter()) & Environment.NewLine
+ ' if there's something to output
+ If strOutput IsNot Nothing AndAlso strOutput <> "" Then
+ clsOutputLogger.AddOutput(strScriptWithComment, strOutput, False, bAddOutputInInternalViewer)
End If
- 'ensure that the final line of the script will be executed next
- strSplitScript = Right(strScript, strScript.Length - strScript.Trim(Environment.NewLine.ToCharArray).LastIndexOf(Environment.NewLine.ToCharArray) - 2)
- 'wrap the final line in 'capture.output' so that when it's executed, the result can be displayed in the output window
- strCapturedScript = "capture.output(" & strSplitScript & ")"
End If
- Try
- If Not bError Then
- 'execute the script and assign the result to a temporary variable
- If Evaluate(strTempAssignTo & " <- " & strCapturedScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride) Then
- expTemp = GetSymbol(strTempAssignTo)
- Evaluate("rm(" & strTempAssignTo & ")", bSilent:=True)
- If expTemp IsNot Nothing Then
- strTemp = String.Join(Environment.NewLine, expTemp.AsCharacter())
- If strTemp <> "" Then
- 'ensure that the data returned from the script will be displayed in the output window
- strOutput = strOutput & strTemp & Environment.NewLine
- End If
- End If
+
+ Else
+ 'else if script output should not be ignored or not stored as an object or variable
+
+ Dim arrRScriptLines() As String = GetRunnableCommandLines(strScript)
+
+ 'if output should be stored as a variable just execute the script
+ If arrRScriptLines.Last().Contains("<-") Then
+ Evaluate(strScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
+ Else
+ 'else capture the output as plain text
+ Dim bSuccess As Boolean = True
+ If arrRScriptLines.Length > 1 Then
+ Dim strScriptWithoutLastLine As String = String.Join(Environment.NewLine, arrRScriptLines, 0, arrRScriptLines.Length - 1)
+ bSuccess = Evaluate(strScriptWithoutLastLine, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
+ End If
+
+ If bSuccess Then
+ Dim strFilePathName As String = GetFileOutput("view_object(object = " & arrRScriptLines.Last() & " , object_format = 'text' )", bSilent, bSeparateThread, bShowWaitDialogOverride)
+ If Not String.IsNullOrEmpty(strFilePathName) Then
+ clsOutputLogger.AddOutput(strScriptWithComment, strFilePathName, True, bAddOutputInInternalViewer)
End If
End If
- 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)")
- End Try
+ End If
+
End If
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)")
End Try
- ' if output window is defined, and there's something to output
- If bOutputRscripts AndAlso strOutput IsNot Nothing AndAlso strOutput <> "" Then
- ' if output should be sent to web browser
- 'If iCallType = 4 Then
- ' ' rtbOutput.AddIntoWebBrowser(strHtmlCode:=strOutput)
- ' 'TODO Add to web browser
- 'Else
- ' clsOutputLogger.AddStringOutput(strOutput)
- 'End If
- clsOutputLogger.AddStringOutput(strOutput)
- End If
+
AppendToAutoSaveLog(strScriptWithComment & Environment.NewLine)
If bUpdateGrids Then
frmMain.UpdateAllGrids()
End If
End Sub
+ '''
+ ''' Gets the file path name if file is available and has contents, else returns an empty string
+ '''
+ ''' Script that produces a file output
+ '''
+ '''
+ '''
+ ''' 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 strTempAssignTo As String = ".temp_val"
+ Dim expTemp As RDotNet.SymbolicExpression
+ Dim strNewAssignedToScript As String = ConstructAssignTo(strTempAssignTo, strScript)
+ Evaluate(strNewAssignedToScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
+ expTemp = GetSymbol(strTempAssignTo, bSilent:=bSilent)
+ 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
+ End If
+ Return strFilePath
+ End Function
+
'''--------------------------------------------------------------------------------------------
''' This method executes the R script and displays
''' the output as text or graph (determined by ).
@@ -1027,16 +993,14 @@ Public Class RLink
clsLastGraph.SetRCommand(strInstatDataObject & "$get_last_graph")
clsLastGraph.AddParameter("print_graph", "FALSE", iPosition:=0)
-
Dim strGlobalGraphDisplayOption As String
- 'store the current set graph display option, to restore after display
- strGlobalGraphDisplayOption = Me.strGraphDisplayOption
- Me.strGraphDisplayOption = "view_R_viewer"
- clsLastGraph.AddParameter("print_graph", "TRUE", iPosition:=0)
- RunScript(clsLastGraph.ToScript(), iCallType:=3, bAddOutputInViewer:=False, strComment:="View last graph", bSeparateThread:=False)
- 'restore the graph display option
- Me.strGraphDisplayOption = strGlobalGraphDisplayOption
-
+ 'store the current set graph display option, to restore after display
+ strGlobalGraphDisplayOption = Me.strGraphDisplayOption
+ Me.strGraphDisplayOption = "view_R_viewer"
+ clsLastGraph.AddParameter("print_graph", "TRUE", iPosition:=0)
+ RunScript(clsLastGraph.ToScript(), iCallType:=3, bAddOutputInInternalViewer:=False, strComment:="View last graph", bSeparateThread:=False)
+ 'restore the graph display option
+ Me.strGraphDisplayOption = strGlobalGraphDisplayOption
End Sub
'''--------------------------------------------------------------------------------------------
diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb
index 2e1203f7f9d..ca4d8a68d32 100644
--- a/instat/dlgCalculator.vb
+++ b/instat/dlgCalculator.vb
@@ -27,8 +27,7 @@ Public Class dlgCalculator
Private iBasicWidth As Integer
Private strDefaultKeyboard As String
' Note: This list needs to be updated when a new keyboard is added.
- Private strKeyboards() As String = {"Maths", "Logical and Symbols", "Summary", "Text/Strings (Character Columns)", "Factor", "Probability", "Dates/Times", "Transform", "Circular", "Wakefield", "Modifier", "Symbols", "HydroGOF", "Integer"}
-
+ Private strKeyboards() As String = {"Maths", "Logical and Symbols", "Summary", "Text/Strings (Character Columns)", "Factor", "Probability", "Dates/Times", "Transform", "Circular", "Wakefield", "Modifier", "Symbols", "HydroGOF", "Integer", "Complex"}
Private Sub dlgCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
@@ -189,6 +188,8 @@ Public Class dlgCalculator
ucrBase.iHelpTopicID = 598
Case "Integer"
Me.Width = iBasicWidth * 1.5
+ Case "Complex"
+ Me.Width = iBasicWidth * 1.5
Case Else
Me.Width = iBasicWidth
End Select
diff --git a/instat/dlgColumnStructures.vb b/instat/dlgColumnStructures.vb
index 1d82ba63cf9..b3647b84cd0 100644
--- a/instat/dlgColumnStructures.vb
+++ b/instat/dlgColumnStructures.vb
@@ -31,7 +31,6 @@ Public Class dlgColumnStructure
End If
SetRCodeForControls(bReset)
bReset = False
- SetColumnStructureInReceiver()
TestOKEnabled()
autoTranslate(Me)
End Sub
diff --git a/instat/dlgDescribeTwoVarGraph.Designer.vb b/instat/dlgDescribeTwoVarGraph.Designer.vb
index cac687f3ed6..f8bd1fbf831 100644
--- a/instat/dlgDescribeTwoVarGraph.Designer.vb
+++ b/instat/dlgDescribeTwoVarGraph.Designer.vb
@@ -103,6 +103,7 @@ Partial Class dlgDescribeTwoVarGraph
Me.ucrChkAddLabelsText = New instat.ucrCheck()
Me.lblLabelPosition = New System.Windows.Forms.Label()
Me.ucrInputLabelColour = New instat.ucrInputComboBox()
+ Me.cmdPairOptions = New System.Windows.Forms.Button()
Me.grpSummaries.SuspendLayout()
Me.grpOptions.SuspendLayout()
Me.grpTypeOfDispaly.SuspendLayout()
@@ -747,7 +748,7 @@ Partial Class dlgDescribeTwoVarGraph
Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.ucrBase.Location = New System.Drawing.Point(10, 460)
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 = 8
'
'ucrReceiverFirstVars
@@ -835,12 +836,24 @@ Partial Class dlgDescribeTwoVarGraph
Me.ucrInputLabelColour.Size = New System.Drawing.Size(57, 21)
Me.ucrInputLabelColour.TabIndex = 63
'
+ 'cmdPairOptions
+ '
+ Me.cmdPairOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdPairOptions.Location = New System.Drawing.Point(11, 226)
+ Me.cmdPairOptions.Name = "cmdPairOptions"
+ Me.cmdPairOptions.Size = New System.Drawing.Size(119, 23)
+ Me.cmdPairOptions.TabIndex = 66
+ Me.cmdPairOptions.Tag = "Options..."
+ Me.cmdPairOptions.Text = "Pair Plot Options"
+ Me.cmdPairOptions.UseVisualStyleBackColor = True
+ '
'dlgDescribeTwoVarGraph
'
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(438, 516)
+ Me.Controls.Add(Me.cmdPairOptions)
Me.Controls.Add(Me.ucrInputLabelSize)
Me.Controls.Add(Me.lblLabelColour)
Me.Controls.Add(Me.lblLabelSize)
@@ -946,4 +959,5 @@ Partial Class dlgDescribeTwoVarGraph
Friend WithEvents ucrChkAddLabelsText As ucrCheck
Friend WithEvents lblLabelPosition As Label
Friend WithEvents ucrInputLabelColour As ucrInputComboBox
+ Friend WithEvents cmdPairOptions As Button
End Class
\ No newline at end of file
diff --git a/instat/dlgDescribeTwoVarGraph.vb b/instat/dlgDescribeTwoVarGraph.vb
index 10b5185322d..4b7340e7178 100644
--- a/instat/dlgDescribeTwoVarGraph.vb
+++ b/instat/dlgDescribeTwoVarGraph.vb
@@ -17,12 +17,12 @@
Imports instat.Translations
Public Class dlgDescribeTwoVarGraph
- Private clsBaseOperator, clsCoordPolarStartOperator As New ROperator
+ Private clsBaseOperator, clsPairOperator, clsCoordPolarStartOperator As New ROperator
Private clsRGGplotFunction, clsMosaicGgplotFunction, clsRFacet, clsThemeFunction,
clsGlobalAes, clsLabsFunction, clsXlabsFunction, clsYlabFunction,
clsXScaleContinuousFunction, clsYScaleContinuousFunction, clsCoordPolarFunction,
clsXScaleDateFunction, clsYScaleDateFunction, clsScaleFillViridisFunction,
- clsScaleColourViridisFunction As New RFunction
+ clsScaleColourViridisFunction, clsPairThemesFunction As New RFunction
'Geoms
Private clsGeomJitter, clsGeomViolin, clsGeomBar, clsGeomMosaic, clsGeomBoxplot,
clsGeomPoint, clsGeomLine, clsStatSummaryHline, clsStatSummaryCrossbar,
@@ -52,6 +52,7 @@ Public Class dlgDescribeTwoVarGraph
Private strGeomParameterNames() As String = {"geom_jitter", "geom_violin", "geom_bar", "geom_mosaic", "geom_boxplot", "geom_point", "geom_line", "stat_summary_hline", "stat_summary_crossline", "geom_freqpoly", "geom_histogram", "geom_density"}
Private strFirstVariablesType, strSecondVariableType As String
+
Private dctThemeFunctions As Dictionary(Of String, RFunction)
Private bFirstLoad As Boolean = True
Private bReset As Boolean = True
@@ -274,8 +275,10 @@ Public Class dlgDescribeTwoVarGraph
Private Sub SetDefaults()
clsGGpairsFunction = New RFunction
clsRGGplotFunction = New RFunction
+ clsPairThemesFunction = New RFunction
clsMosaicGgplotFunction = New RFunction
clsDummyFunction = New RFunction
+ clsPairOperator = New ROperator
clsRFacet = New RFunction
clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction.Clone()
dctThemeFunctions = New Dictionary(Of String, RFunction)(GgplotDefaults.dctThemeFunctions)
@@ -329,7 +332,6 @@ Public Class dlgDescribeTwoVarGraph
ucrSaveGraph.Reset()
ucrSelectorTwoVarGraph.Reset()
- cmdOptions.Enabled = False
ucrReceiverFirstVars.SetMeAsReceiver()
clsDummyFunction.AddParameter("checked", "pair", iPosition:=0)
@@ -369,6 +371,13 @@ Public Class dlgDescribeTwoVarGraph
clsGGpairsFunction.SetPackageName("GGally")
clsGGpairsFunction.SetRCommand("ggpairs")
+ clsPairThemesFunction.SetPackageName("ggplot2")
+ clsPairThemesFunction.SetRCommand("theme")
+ clsPairThemesFunction.AddParameter("legend.position", Chr(34) & "none" & Chr(34), iPosition:=0)
+
+ clsPairOperator.SetOperation("+")
+ clsPairOperator.AddParameter("left", clsRFunctionParameter:=clsGGpairsFunction, iPosition:=0)
+
clsBaseOperator.SetOperation("+")
clsRGGplotFunction.SetPackageName("ggplot2")
@@ -482,9 +491,11 @@ Public Class dlgDescribeTwoVarGraph
clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRGGplotFunction, iPosition:=0)
clsBaseOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorTwoVarGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph")
- ucrBase.clsRsyntax.SetBaseRFunction(clsGGpairsFunction)
+ clsPairOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorTwoVarGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph")
+
+ ucrBase.clsRsyntax.SetBaseROperator(clsPairOperator)
+
AddDataFrame()
- ' bResetSubdialog = True
End Sub
Private Sub SetRCodeForControls(bReset As Boolean)
@@ -495,7 +506,7 @@ Public Class dlgDescribeTwoVarGraph
ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsAesCategoricalByNumericXNumeric, New RParameter("x", 0), iAdditionalPairNo:=4)
ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsAesNumericByNumeric, New RParameter("x", 0), iAdditionalPairNo:=5)
ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsAesStatSummaryHlineCategoricalByNumeric, New RParameter("y", 1), iAdditionalPairNo:=6)
- ucrSaveGraph.AddAdditionalRCode(clsGGpairsFunction, bReset)
+ ucrSaveGraph.AddAdditionalRCode(clsPairOperator, bReset)
ucrSelectorTwoVarGraph.SetRCode(clsRGGplotFunction, bReset)
ucrReceiverSecondVar.SetRCode(clsAesCategoricalByCategoricalBarChart, bReset)
@@ -532,12 +543,10 @@ Public Class dlgDescribeTwoVarGraph
End Sub
Private Sub TestOkEnabled()
- If rdoBy.Checked AndAlso Not ucrReceiverFirstVars.IsEmpty AndAlso Not ucrReceiverSecondVar.IsEmpty AndAlso ucrSaveGraph.IsComplete Then
- ucrBase.OKEnabled(True)
- ElseIf rdoPairs.Checked AndAlso Not ucrReceiverFirstVars.IsEmpty Then
- ucrBase.OKEnabled(True)
+ If rdoBy.Checked Then
+ ucrBase.OKEnabled(Not ucrReceiverFirstVars.IsEmpty AndAlso Not ucrReceiverSecondVar.IsEmpty AndAlso ucrSaveGraph.IsComplete)
Else
- ucrBase.OKEnabled(False)
+ ucrBase.OKEnabled(Not ucrReceiverFirstVars.IsEmpty)
End If
End Sub
@@ -810,7 +819,9 @@ Public Class dlgDescribeTwoVarGraph
ChangeGeomToMosaicAndFacet()
End Sub
- Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSecondVar.ControlContentsChanged, ucrReceiverFirstVars.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged, ucrPnlByPairs.ControlContentsChanged
+ Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSecondVar.ControlContentsChanged,
+ ucrReceiverFirstVars.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged,
+ ucrPnlByPairs.ControlContentsChanged, ucrReceiverColour.ControlContentsChanged
TestOkEnabled()
End Sub
@@ -844,11 +855,17 @@ Public Class dlgDescribeTwoVarGraph
sdgPlots.tbpFacet.Enabled = False
sdgPlots.ShowDialog()
sdgPlots.tbpFacet.Enabled = True
- ' Readd as may get removed by subdialog
clsRFacet.AddParameter("facets", "~variable", iPosition:=0)
bResetSubdialog = False
End Sub
+ Private Sub cmdPairOptions_Click(sender As Object, e As EventArgs) Handles cmdPairOptions.Click
+ sdgPairPlotOptions.SetRCode(clsNewPairOperator:=clsPairOperator, clsNewPairThemesFunction:=clsPairThemesFunction, clsNewGGpairAesFunction:=clsGGpairsFunction, bReset:=bResetSubdialog)
+
+ sdgPairPlotOptions.ShowDialog()
+ bResetSubdialog = False
+ End Sub
+
Private Sub SetFreeYAxis()
Dim clsScaleParam As RParameter
Dim strXName As String
@@ -898,7 +915,6 @@ Public Class dlgDescribeTwoVarGraph
strXName = "x"
strYName = "y"
End If
-
If bAdd Then
If clsRFacet.ContainsParameter("scales") Then
clsScaleParam = clsRFacet.GetParameter("scales")
@@ -952,10 +968,8 @@ Public Class dlgDescribeTwoVarGraph
ucrReceiverFirstVars.ucrMultipleVariables.Clear()
ucrReceiverFirstVars.SetMeAsReceiver()
If rdoBy.Checked Then
- cmdOptions.Enabled = True
ucrReceiverFirstVars.ucrMultipleVariables.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True)
Else
- cmdOptions.Enabled = False
ucrReceiverFirstVars.ucrMultipleVariables.SetSingleTypeStatus(False)
End If
If bRCodeSet Then
@@ -963,13 +977,14 @@ Public Class dlgDescribeTwoVarGraph
ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator)
clsDummyFunction.AddParameter("checked", "by", iPosition:=0)
Else
- ucrBase.clsRsyntax.SetBaseRFunction(clsGGpairsFunction)
+ ucrBase.clsRsyntax.SetBaseROperator(clsPairOperator)
clsDummyFunction.AddParameter("checked", "pair", iPosition:=0)
End If
End If
EnableVisibleLabelControls()
AddRemoveColourParameter()
ChangeGeomToMosaicAndFacet()
+ HideShowOptions()
End Sub
Private Sub ucrSelectorTwoVarGraph_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorTwoVarGraph.ControlValueChanged
@@ -985,6 +1000,13 @@ Public Class dlgDescribeTwoVarGraph
Private Sub ucrReceiverColour_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverColour.ControlValueChanged
AddRemoveColourParameter()
+ HideShowOptions()
+ End Sub
+
+ Private Sub HideShowOptions()
+ cmdOptions.Visible = Not rdoPairs.Checked
+ cmdPairOptions.Visible = rdoPairs.Checked
+ cmdPairOptions.Enabled = cmdPairOptions.Visible AndAlso Not ucrReceiverColour.IsEmpty
End Sub
Private Sub AddRemoveColourParameter()
diff --git a/instat/dlgExtremes.vb b/instat/dlgExtremes.vb
index 4ab00f7da98..cc0ad564449 100644
--- a/instat/dlgExtremes.vb
+++ b/instat/dlgExtremes.vb
@@ -121,9 +121,6 @@ clsInitialListFunction, clsOmitMissingFunction As New RFunction
clsLocationParamOperator.AddParameter(strParameterValue:="", iPosition:=0, bIncludeArgumentName:=False)
clsLocationParamOperator.bSpaceAroundOperation = False
- clsPlotsFunction.SetRCommand("plot")
- clsPlotsFunction.iCallType = 3
- clsPlotsFunction.bExcludeAssignedFunctionOutput = False
clsPriorParamListFunction.SetRCommand("list")
clsPriorParamListFunction.AddParameter("v", clsRFunctionParameter:=clsConcatenateFunction, iPosition:=5)
@@ -133,37 +130,56 @@ clsInitialListFunction, clsOmitMissingFunction As New RFunction
clsInitialListFunction.AddParameter("scale", "0.1", iPosition:=1)
clsInitialListFunction.AddParameter("shape", "-0.5", iPosition:=2)
+ 'todo. What's the use of this RFunction?
clsConfidenceIntervalFunction.SetPackageName("extRemes")
clsConfidenceIntervalFunction.SetRCommand("ci.fevd")
clsFevdFunction.SetPackageName("extRemes")
clsFevdFunction.SetRCommand("fevd")
-
clsFevdFunction.AddParameter("type", Chr(34) & "GEV" & Chr(34), iPosition:=0)
clsFevdFunction.AddParameter("method", Chr(34) & "MLE" & Chr(34), iPosition:=1)
clsFevdFunction.AddParameter("na.action", "na.omit", iPosition:=3)
+ clsFevdFunction.bExcludeAssignedFunctionOutput = False
+ clsFevdFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorExtremes.strCurrentDataFrame,
+ strObjectName:="last_model")
- clsFevdFunction.SetAssignTo(ucrSaveExtremes.GetText(), strTempDataframe:=ucrSelectorExtremes.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model", bAssignToIsPrefix:=True)
- clsPlotsFunction.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorExtremes.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph")
- clsPlotsFunction.AddParameter("x", clsRFunctionParameter:=clsFevdFunction, iPosition:=0)
+
+ clsPlotsFunction.SetRCommand("plot")
+ clsPlotsFunction.bExcludeAssignedFunctionOutput = False
clsOmitMissingFunction.SetRCommand("na.omit")
clsOmitMissingFunction.SetPackageName("stats")
clsOmitMissingFunction.AddParameter("object", clsRFunctionParameter:=ucrSelectorExtremes.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
- clsAttachFunction.SetRCommand("attach")
- clsDetachFunction.SetRCommand("detach")
- clsAttachFunction.AddParameter("what", clsRFunctionParameter:=clsOmitMissingFunction, iPosition:=0)
- clsDetachFunction.AddParameter("name", clsRFunctionParameter:=clsOmitMissingFunction, iPosition:=0)
- clsDetachFunction.AddParameter("unload", "TRUE", iPosition:=2)
+ 'todo. are they needed?
+ 'clsAttachFunction.SetRCommand("attach")
+ 'clsAttachFunction.AddParameter("what", clsRFunctionParameter:=clsOmitMissingFunction, iPosition:=0)
+
+ 'clsDetachFunction.SetRCommand("detach")
+ 'clsDetachFunction.AddParameter("name", clsRFunctionParameter:=clsOmitMissingFunction, iPosition:=0)
+ 'clsDetachFunction.AddParameter("unload", "TRUE", iPosition:=2)
- ucrBase.clsRsyntax.AddToBeforeCodes(clsAttachFunction)
- ucrBase.clsRsyntax.AddToAfterCodes(clsDetachFunction, iPosition:=1)
+ 'ucrBase.clsRsyntax.AddToBeforeCodes(clsAttachFunction)
+ 'ucrBase.clsRsyntax.AddToAfterCodes(clsDetachFunction, iPosition:=1)
ucrBase.clsRsyntax.SetBaseRFunction(clsFevdFunction)
ucrTryModelling.SetRSyntax(ucrBase.clsRsyntax)
End Sub
+
+ Private Sub assignToControlsChanged(ucrChangedControl As ucrCore) Handles ucrSaveExtremes.ControlValueChanged
+ 'model plot output
+ clsPlotsFunction.AddParameter("x", strParameterValue:=clsFevdFunction.GetRObjectToAssignTo(), iPosition:=0)
+ clsPlotsFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorExtremes.strCurrentDataFrame,
+ strObjectName:="last_graph")
+ End Sub
+
Private Sub SetRCodeForControls(bReset As Boolean)
ucrInputExtremes.SetRCode(clsFevdFunction, bReset)
ucrReceiverVariable.SetRCode(clsFevdFunction, bReset)
diff --git a/instat/dlgFitModel.vb b/instat/dlgFitModel.vb
index 94192efccd8..70b4aab911c 100644
--- a/instat/dlgFitModel.vb
+++ b/instat/dlgFitModel.vb
@@ -125,61 +125,93 @@ Public Class dlgFitModel
ucrInputModelPreview.SetName("")
ucrInputModelPreview.IsReadOnly = True
+ clsLM = clsRegressionDefaults.clsDefaultLmFunction.Clone
+ clsLM.AddParameter("formula", clsROperatorParameter:=clsFormulaOperator, iPosition:=1)
+ clsLM.AddParameter("na.action", "na.exclude", iPosition:=4)
+ clsLM.bExcludeAssignedFunctionOutput = False
+ clsLM.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_model")
+
+ 'todo. where is clsGLM used?
clsGLM = clsRegressionDefaults.clsDefaultGlmFunction.Clone()
clsGLM.AddParameter("formula", clsROperatorParameter:=clsFormulaOperator, iPosition:=0)
clsFamilyFunction = ucrFamily.clsCurrRFunction
clsGLM.AddParameter("family", clsRFunctionParameter:=clsFamilyFunction)
clsGLM.AddParameter("na.action", "na.exclude", iPosition:=4)
+ clsGLM.bExcludeAssignedFunctionOutput = False
+ clsGLM.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_model")
- clsLM = clsRegressionDefaults.clsDefaultLmFunction.Clone
- clsLM.AddParameter("formula", clsROperatorParameter:=clsFormulaOperator, iPosition:=1)
- clsLM.AddParameter("na.action", "na.exclude", iPosition:=4)
- clsLM.SetAssignTo("last_model", strTempDataframe:=ucrSelectorByDataFrameAddRemoveForFitModel.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model", bAssignToIsPrefix:=True)
clsGLMNB = clsRegressionDefaults.clsDefaultGLmNBFunction.Clone
clsGLMNB.AddParameter("formula", clsROperatorParameter:=clsFormulaOperator, iPosition:=1)
- clsGLMNB.SetAssignTo("last_model", strTempDataframe:=ucrSelectorByDataFrameAddRemoveForFitModel.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model", bAssignToIsPrefix:=True)
+ clsGLMNB.bExcludeAssignedFunctionOutput = False
+ clsGLMNB.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_model")
+
clsGLMPolr = clsRegressionDefaults.clsDefaultGLmPolrFunction.Clone
clsGLMPolr.AddParameter("formula", clsROperatorParameter:=clsFormulaOperator, iPosition:=1)
- clsGLMPolr.SetAssignTo("last_model", strTempDataframe:=ucrSelectorByDataFrameAddRemoveForFitModel.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model", bAssignToIsPrefix:=True)
+ clsGLMPolr.bExcludeAssignedFunctionOutput = False
+ clsGLMPolr.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_model")
+
clsGLMMultinom = clsRegressionDefaults.clsDefaultGLmMultinomFunction.Clone
clsGLMMultinom.AddParameter("formula", clsROperatorParameter:=clsFormulaOperator, iPosition:=1)
- clsGLMMultinom.SetAssignTo("last_model", strTempDataframe:=ucrSelectorByDataFrameAddRemoveForFitModel.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model", bAssignToIsPrefix:=True)
+ clsGLMMultinom.bExcludeAssignedFunctionOutput = False
+ clsGLMMultinom.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_model")
+
'Residual Plots
dctPlotFunctions = New Dictionary(Of String, RFunction)(clsRegressionDefaults.dctModelPlotFunctions)
'Model
clsFormulaFunction = clsRegressionDefaults.clsDefaultFormulaFunction.Clone
- clsFormulaFunction.iCallType = 2
+ clsFormulaFunction.bExcludeAssignedFunctionOutput = False
'Summary
clsSummaryFunction = clsRegressionDefaults.clsDefaultSummary.Clone
- clsSummaryFunction.iCallType = 2
+ clsSummaryFunction.bExcludeAssignedFunctionOutput = False
'ANOVA
clsAnovaFunction = clsRegressionDefaults.clsDefaultAnovaFunction.Clone
- clsAnovaFunction.iCallType = 2
+ clsAnovaFunction.bExcludeAssignedFunctionOutput = False
'ANOVA II
clsAnovaIIFunction = clsRegressionDefaults.clsDefaultAnovaIIFunction.Clone
- clsAnovaIIFunction.iCallType = 2
+ clsAnovaIIFunction.bExcludeAssignedFunctionOutput = False
'FitModel
clsVisReg.SetPackageName("visreg")
clsVisReg.SetRCommand("visreg")
clsVisReg.AddParameter("type", Chr(34) & "conditional" & Chr(34))
clsVisReg.AddParameter("gg", "FALSE")
- clsVisReg.iCallType = 3
clsVisReg.bExcludeAssignedFunctionOutput = False
'Confidence Interval
clsConfint = clsRegressionDefaults.clsDefaultConfint.Clone
- clsConfint.iCallType = 2
+ clsConfint.bExcludeAssignedFunctionOutput = False
+
+ 'todo. where is this used
'Anova + Pvalue
clsRestpvalFunction = clsRegressionDefaults.clsDefaultRaovPValueFunction.Clone
clsRestpvalFunction.iCallType = 2
@@ -210,6 +242,80 @@ Public Class dlgFitModel
ucrTryModelling.SetRSyntax(ucrBase.clsRsyntax)
End Sub
+ Private Sub assignToControlsChanged(ucrChangedControl As ucrCore) Handles ucrModelName.ControlValueChanged
+
+ '---------------------------------------------------------------------
+ 'model summaries outputs
+
+ 'stats output formula for the model
+ clsFormulaFunction.AddParameter("x", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsFormulaFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ 'anova output summary for the model
+ clsAnovaFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsAnovaFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ clsAnovaIIFunction.AddParameter("mod", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+
+ 'estimates output for the model
+ clsSummaryFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsSummaryFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+
+ 'confidence output limits for the model
+ clsConfint.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsConfint.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ '---------------------------------------------------------------------
+ 'column outputs
+ 'note set assign has not been set here because it's done at the sub dialog level
+ 'through individual save controls linked to this dialog data frame selector
+
+ clsResidualFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsFittedValuesFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsRstandardFunction.AddParameter("model", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsHatvaluesFunction.AddParameter("model", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+
+ '---------------------------------------------------------------------
+ 'graphical outputs
+
+ 'model plot output
+ clsVisReg.AddParameter("fit", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsVisReg.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_graph")
+
+ 'residual plots outputs
+ For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
+ kvp.Value.AddParameter("x", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ kvp.Value.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorByDataFrameAddRemoveForFitModel.strCurrentDataFrame,
+ strObjectName:="last_graph")
+ Next
+
+ End Sub
+
+
Private Sub SetRCodeForControls(bReset As Boolean)
bRCodeSet = False
ucrModelName.AddAdditionalRCode(clsGLMMultinom, bReset)
@@ -332,7 +438,6 @@ Public Class dlgFitModel
Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) Handles cmdDisplayOptions.Click
sdgSimpleRegOptions.SetRCode(clsNewRSyntax:=ucrBase.clsRsyntax, clsNewFormulaFunction:=clsFormulaFunction, clsNewAnovaFunction:=clsAnovaFunction, clsNewRSummaryFunction:=clsSummaryFunction, clsNewConfint:=clsConfint, clsNewVisReg:=clsVisReg, clsNewResidualFunction:=clsResidualFunction, clsNewFittedValuesFunction:=clsFittedValuesFunction, clsNewRstandardFunction:=clsRstandardFunction, clsNewHatvaluesFunction:=clsHatvaluesFunction, dctNewPlot:=dctPlotFunctions, ucrNewAvailableDatafrane:=ucrSelectorByDataFrameAddRemoveForFitModel.ucrAvailableDataFrames, bReset:=bResetOptionsSubDialog)
sdgSimpleRegOptions.ShowDialog()
- GraphAssignTo()
bResetOptionsSubDialog = False
End Sub
@@ -402,22 +507,6 @@ Public Class dlgFitModel
clsLMOrGLM = clsGLM
End If
- 'Update display functions to contain correct model
- clsFormulaFunction.AddParameter("x", clsRFunctionParameter:=clsLMOrGLM)
- clsAnovaFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsAnovaIIFunction.AddParameter("mod", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsSummaryFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsConfint.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsVisReg.AddParameter("fit", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
-
- For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
- kvp.Value.AddParameter("x", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- Next
-
- clsResidualFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsFittedValuesFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsRstandardFunction.AddParameter("model", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsHatvaluesFunction.AddParameter("model", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
ucrBase.clsRsyntax.SetBaseRFunction(clsLMOrGLM)
End If
End Sub
@@ -469,7 +558,6 @@ Public Class dlgFitModel
Private Sub ucrSelectorByDataFrameAddRemoveForFitModel_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorByDataFrameAddRemoveForFitModel.ControlValueChanged
ChooseRFunction()
ChooseAnovaFunction()
- GraphAssignTo()
End Sub
Public Sub ResponseVariableType()
@@ -504,21 +592,6 @@ Public Class dlgFitModel
autoTranslate(Me)
End Sub
- Private Sub GraphAssignTo()
- 'Dim lstPlotNames As New List(Of String)
- 'Dim i As Integer = 0
-
- 'lstPlotNames = New List(Of String)({"last_residplot", "last_qqplot", "last_scaleloc", "last_cooksdist", "last_residlev", "last_cookslev"})
-
- 'temp fix for graph display problem with RDotNet
- clsVisReg.SetAssignTo("last_visreg", strTempDataframe:=ucrSelectorByDataFrameAddRemoveForFitModel.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_visreg")
-
- 'For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
- ' kvp.Value.SetAssignTo(lstPlotNames(index:=i), strTempDataframe:=ucrSelectorByDataFrameAddRemoveForFitModel.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:=lstPlotNames(index:=i))
- ' i = i + 1
- 'Next
- End Sub
-
Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk
ucrReceiverExpressionFitModel.AddtoCombobox(ucrReceiverExpressionFitModel.GetText)
End Sub
diff --git a/instat/dlgHypothesisTestsCalculator.vb b/instat/dlgHypothesisTestsCalculator.vb
index 8c38fe7cb6f..1e6c3c194ae 100644
--- a/instat/dlgHypothesisTestsCalculator.vb
+++ b/instat/dlgHypothesisTestsCalculator.vb
@@ -87,27 +87,46 @@ Public Class dlgHypothesisTestsCalculator
End Sub
Private Sub SetDefaults()
- ucrSelectorColumn.Reset()
- ucrReceiverForTestColumn.SetMeAsReceiver()
- ucrSaveResult.Reset()
- ucrSaveResult.ucrChkSave.Checked = False
- ucrBase.clsRsyntax.SetAssignTo("Last_Test", strTempModel:="Last_Test", strTempDataframe:=ucrSelectorColumn.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem)
+
+ ucrBase.clsRsyntax.clsBaseCommandString.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorColumn.strCurrentDataFrame,
+ strObjectName:="last_model")
+
ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False
- ucrBase.clsRsyntax.iCallType = 2
- ucrChkDisplayModel.Checked = True
- ucrChkIncludeArguments.Checked = False
- ucrChkSummaryModel.AddRSyntaxContainsFunctionNamesCondition(True, {"summary"}, bNewIsPositive:=True)
- ucrInputComboRPackage.SetName("Stats1")
- clsAttach.SetRCommand("attach")
- clsDetach.SetRCommand("detach")
+
clsSummary.SetRCommand("summary")
+ clsSummary.bExcludeAssignedFunctionOutput = False
+
+ clsAttach.SetRCommand("attach")
clsAttach.AddParameter("what", clsRFunctionParameter:=ucrSelectorColumn.ucrAvailableDataFrames.clsCurrDataFrame)
+ clsDetach.SetRCommand("detach")
clsDetach.AddParameter("name", clsRFunctionParameter:=ucrSelectorColumn.ucrAvailableDataFrames.clsCurrDataFrame)
- clsSummary.AddParameter("object", clsRCodeStructureParameter:=ucrBase.clsRsyntax.clsBaseCommandString, iPosition:=0)
clsDetach.AddParameter("unload", "TRUE")
ucrBase.clsRsyntax.AddToBeforeCodes(clsAttach)
ucrBase.clsRsyntax.AddToAfterCodes(clsDetach)
+
+ ucrChkDisplayModel.Checked = True
+ ucrChkIncludeArguments.Checked = False
+ ucrChkSummaryModel.AddRSyntaxContainsFunctionNamesCondition(True, {"summary"}, bNewIsPositive:=True)
+ ucrInputComboRPackage.SetName("Stats1")
+ ucrSelectorColumn.Reset()
+ ucrReceiverForTestColumn.SetMeAsReceiver()
+ ucrSaveResult.Reset()
+ ucrSaveResult.ucrChkSave.Checked = False
ucrTryModelling.SetRSyntax(ucrBase.clsRsyntax)
+
+ End Sub
+
+ Private Sub assignToControlsChanged(ucrChangedControl As ucrCore) Handles ucrSaveResult.ControlValueChanged
+ clsSummary.AddParameter("object", strParameterValue:=ucrBase.clsRsyntax.clsBaseCommandString.GetRObjectToAssignTo(), iPosition:=0)
+ clsSummary.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorColumn.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
End Sub
Private Sub SetRcodeForControls(bReset As Boolean)
diff --git a/instat/dlgLinePlot.designer.vb b/instat/dlgLinePlot.designer.vb
index f8840caa6e3..82ca7756958 100644
--- a/instat/dlgLinePlot.designer.vb
+++ b/instat/dlgLinePlot.designer.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
@@ -14,30 +14,30 @@
' You should have received a copy of the GNU General Public License
' along with this program. If not, see .
-
-Partial Class dlgLinePlot
- Inherits System.Windows.Forms.Form
-
- 'Form overrides dispose to clean up the component list.
-
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
-
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
-
- 'NOTE: The following procedure is required by the Windows Form Designer
- 'It can be modified using the Windows Form Designer.
- 'Do not modify it using the code editor.
-
- Private Sub InitializeComponent()
+
+Partial Class dlgLinePlot
+ Inherits System.Windows.Forms.Form
+
+ 'Form overrides dispose to clean up the component list.
+
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
+
+ 'Required by the Windows Form Designer
+ Private components As System.ComponentModel.IContainer
+
+ 'NOTE: The following procedure is required by the Windows Form Designer
+ 'It can be modified using the Windows Form Designer.
+ 'Do not modify it using the code editor.
+
+ Private Sub InitializeComponent()
Me.lblXVariable = New System.Windows.Forms.Label()
Me.lblAvailable = New System.Windows.Forms.Label()
Me.cmdOptions = New System.Windows.Forms.Button()
@@ -317,9 +317,9 @@ Partial Class dlgLinePlot
'
Me.ucrChkAddSE.AutoSize = True
Me.ucrChkAddSE.Checked = False
- Me.ucrChkAddSE.Location = New System.Drawing.Point(195, 49)
- Me.ucrChkAddSE.Name = "ucrChkAddSE"
- Me.ucrChkAddSE.Size = New System.Drawing.Size(75, 23)
+ Me.ucrChkAddSE.Location = New System.Drawing.Point(185, 51)
+ Me.ucrChkAddSE.Name = "ucrChkAddSE"
+ Me.ucrChkAddSE.Size = New System.Drawing.Size(82, 23)
Me.ucrChkAddSE.TabIndex = 8
'
'ucrNudSpan
@@ -818,7 +818,7 @@ Partial Class dlgLinePlot
'
Me.ucrChkValley.AutoSize = True
Me.ucrChkValley.Checked = False
- Me.ucrChkValley.Location = New System.Drawing.Point(161, 385)
+ Me.ucrChkValley.Location = New System.Drawing.Point(161, 389)
Me.ucrChkValley.Name = "ucrChkValley"
Me.ucrChkValley.Size = New System.Drawing.Size(146, 23)
Me.ucrChkValley.TabIndex = 27
@@ -856,7 +856,7 @@ Partial Class dlgLinePlot
Me.ucrSave.Location = New System.Drawing.Point(9, 442)
Me.ucrSave.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.ucrSave.Name = "ucrSave"
- Me.ucrSave.Size = New System.Drawing.Size(346, 24)
+ Me.ucrSave.Size = New System.Drawing.Size(401, 24)
Me.ucrSave.TabIndex = 31
'
'ucrVariablesAsFactorForLinePlot
@@ -1104,20 +1104,20 @@ Partial Class dlgLinePlot
Me.ResumeLayout(False)
Me.PerformLayout()
- End Sub
- Friend WithEvents lblXVariable As Label
- Friend WithEvents lblAvailable As Label
- Friend WithEvents ucrReceiverX As ucrReceiverSingle
- Friend WithEvents ucrBase As ucrButtons
- Friend WithEvents ucrLinePlotSelector As ucrSelectorByDataFrameAddRemove
- Friend WithEvents cmdOptions As Button
- Friend WithEvents cmdLinePathStepSmoothOptions As Button
- Friend WithEvents lblFactorOptional As Label
- Friend WithEvents ucrFactorOptionalReceiver As ucrReceiverSingle
- Friend WithEvents ucrVariablesAsFactorForLinePlot As ucrVariablesAsFactor
- Friend WithEvents ucrChkAddPoints As ucrCheck
- Friend WithEvents ucrSave As ucrSave
- Friend WithEvents ucrChkLineofBestFit As ucrCheck
+ End Sub
+ Friend WithEvents lblXVariable As Label
+ Friend WithEvents lblAvailable As Label
+ Friend WithEvents ucrReceiverX As ucrReceiverSingle
+ Friend WithEvents ucrBase As ucrButtons
+ Friend WithEvents ucrLinePlotSelector As ucrSelectorByDataFrameAddRemove
+ Friend WithEvents cmdOptions As Button
+ Friend WithEvents cmdLinePathStepSmoothOptions As Button
+ Friend WithEvents lblFactorOptional As Label
+ Friend WithEvents ucrFactorOptionalReceiver As ucrReceiverSingle
+ Friend WithEvents ucrVariablesAsFactorForLinePlot As ucrVariablesAsFactor
+ Friend WithEvents ucrChkAddPoints As ucrCheck
+ Friend WithEvents ucrSave As ucrSave
+ Friend WithEvents ucrChkLineofBestFit As ucrCheck
Friend WithEvents ucrChkWithSE As ucrCheck
Friend WithEvents ucrReceiverGroup As ucrReceiverSingle
Friend WithEvents ucrChkValley As ucrCheck
@@ -1185,4 +1185,4 @@ Partial Class dlgLinePlot
Friend WithEvents ucrNudSlopeLabelSize As ucrNud
Friend WithEvents ucrChkSlopeLabelOptions As ucrCheck
Friend WithEvents ucrChkSlopeTextOptions As ucrCheck
-End Class
+End Class
diff --git a/instat/dlgLinePlot.vb b/instat/dlgLinePlot.vb
index 6a561b14e82..f7596042d26 100644
--- a/instat/dlgLinePlot.vb
+++ b/instat/dlgLinePlot.vb
@@ -210,7 +210,7 @@ Public Class dlgLinePlot
ucrPnlStepOrPath.AddFunctionNamesCondition(rdoStep, "geom_step")
ucrChkPathOrStep.AddToLinkedControls(ucrPnlStepOrPath, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
- ucrChkPathOrStep.SetText("Use path or step")
+ ucrChkPathOrStep.SetText("Path or Step")
ucrChkPathOrStep.AddFunctionNamesCondition(True, {"geom_step", "geom_path"})
ucrChkPathOrStep.AddFunctionNamesCondition(False, {"geom_step", "geom_path"}, False)
diff --git a/instat/dlgMakeDate.vb b/instat/dlgMakeDate.vb
index da052b3e780..f03019ea06e 100644
--- a/instat/dlgMakeDate.vb
+++ b/instat/dlgMakeDate.vb
@@ -335,8 +335,6 @@ Public Class dlgMakeDate
ucrSaveDate.SetRCode(clsDateFunction, bReset)
- ucrSaveDate.SetRCode(clsDateFunction, bReset)
-
ucrInputUnits.SetRCode(clsMultiplicationOperator, bReset)
ucrReceiverForDate.SetRCode(clsDivisionOperator, bReset)
ucrInputFormat.SetRCode(clsDateFunction, bReset)
@@ -481,7 +479,8 @@ Public Class dlgMakeDate
SelectorHeader()
End Sub
- Private Sub AllControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDate.ControlValueChanged
+ Private Sub AllControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDate.ControlValueChanged, ucrReceiverForDate.ControlValueChanged,
+ ucrReceiverDayTwo.ControlValueChanged, ucrReceiverDayTwo.ControlValueChanged, ucrReceiverYearThree.ControlValueChanged, ucrReceiverMonthThree.ControlValueChanged, ucrReceiverDayThree.ControlValueChanged
GroupBoxSettings()
End Sub
@@ -490,6 +489,7 @@ Public Class dlgMakeDate
ucrBase.clsRsyntax.SetBaseRFunction(clsDateFunction)
ucrReceiverForDate.SetMeAsReceiver()
ucrSaveDate.setLinkedReceiver(ucrReceiverForDate)
+ ucrSaveDate.SetAssignToBooleans(bTempInsertColumnBefore:=False)
grpSingleColumn.Show()
grpTwoColumns.Hide()
grpThreeColumns.Hide()
@@ -498,6 +498,7 @@ Public Class dlgMakeDate
ElseIf rdoTwoColumns.Checked Then
ucrBase.clsRsyntax.SetBaseRFunction(clsMakeYearDay)
ucrSaveDate.setLinkedReceiver(ucrReceiverYearTwo)
+ ucrSaveDate.SetAssignToBooleans(bTempInsertColumnBefore:=True)
ucrReceiverYearTwo.SetMeAsReceiver()
ucrReceiverYearTwo.SetIncludedDataTypes({"numeric"})
ucrReceiverDayTwo.SetIncludedDataTypes({"numeric"})
@@ -520,6 +521,7 @@ Public Class dlgMakeDate
ucrReceiverDayThree.SetMeAsReceiver()
ucrSaveDate.setLinkedReceiver(ucrReceiverDayThree)
End If
+ ucrSaveDate.SetAssignToBooleans(bTempInsertColumnBefore:=True)
grpSingleColumn.Hide()
grpTwoColumns.Hide()
grpThreeColumns.Show()
diff --git a/instat/dlgModelling.vb b/instat/dlgModelling.vb
index 80afd5edd59..f4b10b919ba 100644
--- a/instat/dlgModelling.vb
+++ b/instat/dlgModelling.vb
@@ -25,7 +25,7 @@ Public Class dlgModelling
Public clsRModelFunction As New RFunction
Public clsRYVariable, clsRXVariable As String
Private ucrAvailableDataframe As ucrDataFrame
- Public clsRAovFunction, clsRAovPValFunction, clsREstPValFunction, clsRgeom_point, clsRPredFunction, clsRDFFunction, clsRFittedValues, clsRWriteFitted, clsRResiduals, clsRWriteResiduals, clsRStdResiduals, clsRWriteStdResiduals, clsRLeverage, clsRWriteLeverage As New RFunction
+ 'Public clsRAovFunction, clsRAovPValFunction, clsREstPValFunction, clsRgeom_point, clsRPredFunction, clsRDFFunction, clsRFittedValues, clsRWriteFitted, clsRResiduals, clsRWriteResiduals, clsRStdResiduals, clsRWriteStdResiduals, clsRLeverage, clsRWriteLeverage As New RFunction
Public clsVisReg, clsRaesFunction, clsRStat_smooth, clsR_ribbon, clsRaes_ribbon As New RFunction
Public clsWhichFunction As New RFunction
Public bUpdating As Boolean = False
@@ -76,44 +76,38 @@ Public Class dlgModelling
Private Sub SetDefaults()
clsAttach = New RFunction
clsDetach = New RFunction
-
clsFormulaFunction = New RFunction
clsRModelFunction = New RFunction
- clsRAovFunction = New RFunction
- clsRAovPValFunction = New RFunction
clsConfint = New RFunction
- clsREstPValFunction = New RFunction
- clsRFittedValues = New RFunction
- clsRResiduals = New RFunction
- clsRStdResiduals = New RFunction
- clsRWriteResiduals = New RFunction
- clsRWriteLeverage = New RFunction
- clsRLeverage = New RFunction
- clsRWriteStdResiduals = New RFunction
- clsRWriteFitted = New RFunction
clsSummaryFunction = New RFunction
clsAnovaFunction = New RFunction
- clsRgeom_point = New RFunction
clsVisReg = New RFunction
clsRstandardFunction = New RFunction
clsHatvaluesFunction = New RFunction
clsResidualFunction = New RFunction
clsFittedValuesFunction = New RFunction
+ '---------------------------------------------------------
+ 'todo. what was the purpose of these RFunctions? delete?
+ 'clsRAovFunction = New RFunction
+ 'clsRAovPValFunction = New RFunction
+ 'clsREstPValFunction = New RFunction
+ 'clsRFittedValues = New RFunction
+ 'clsRResiduals = New RFunction
+ 'clsRStdResiduals = New RFunction
+
+ 'clsRWriteResiduals = New RFunction
+ 'clsRWriteLeverage = New RFunction
+ 'clsRLeverage = New RFunction
+ 'clsRWriteStdResiduals = New RFunction
+ 'clsRWriteFitted = New RFunction
+ ' clsRgeom_point = New RFunction
+ '---------------------------------------------------------
+
ucrBase.clsRsyntax.ClearCodes()
bUpdating = True
- ucrSelectorModelling.Reset()
-
- ucrReceiverForTestColumn.SetMeAsReceiver()
-
- ucrBase.clsRsyntax.SetCommandString("")
- ucrReceiverForTestColumn.AddToReceiverAtCursorPosition("lm(, na.action = na.exclude)", 25)
-
-
- ucrSaveResult.Reset()
-
clsAttach.SetRCommand("attach")
clsAttach.AddParameter("what", clsRFunctionParameter:=ucrSelectorModelling.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
@@ -121,91 +115,169 @@ Public Class dlgModelling
clsDetach.AddParameter("name", clsRFunctionParameter:=ucrSelectorModelling.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0)
clsDetach.AddParameter("unload", "TRUE", iPosition:=1)
-
- ucrBase.clsRsyntax.SetAssignTo("last_model", strTempModel:="last_model", strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem)
+ ucrBase.clsRsyntax.SetCommandString("")
+ ucrBase.clsRsyntax.clsBaseCommandString.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorModelling.strCurrentDataFrame)
ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False
- ucrBase.clsRsyntax.iCallType = 2
-
- ucrChkIncludeArguments.Checked = False
- ucrInputComboRPackage.SetName("stats")
'Residual Plots
dctPlotFunctions = New Dictionary(Of String, RFunction)(clsRegressionDefaults.dctModelPlotFunctions)
- clsRgeom_point = clsRegressionDefaults.clsDefaultRgeom_pointFunction.Clone
-
- clsRAovFunction.SetPackageName("stats")
- clsRAovFunction.SetRCommand("anova")
- clsRAovFunction.iCallType = 2
-
'FitModel
clsVisReg.SetPackageName("visreg")
clsVisReg.SetRCommand("visreg")
clsVisReg.AddParameter("type", Chr(34) & "conditional" & Chr(34))
clsVisReg.AddParameter("gg", "TRUE")
- clsVisReg.iCallType = 3
clsVisReg.bExcludeAssignedFunctionOutput = False
'Model
clsFormulaFunction = clsRegressionDefaults.clsDefaultFormulaFunction.Clone
- clsFormulaFunction.iCallType = 2
+ clsFormulaFunction.bExcludeAssignedFunctionOutput = False
'Summary
clsSummaryFunction = clsRegressionDefaults.clsDefaultSummary.Clone
- clsSummaryFunction.iCallType = 2
+ clsSummaryFunction.bExcludeAssignedFunctionOutput = False
'ANOVA
clsAnovaFunction = clsRegressionDefaults.clsDefaultAnovaFunction.Clone
- clsAnovaFunction.iCallType = 2
+ clsAnovaFunction.bExcludeAssignedFunctionOutput = False
'Confidence Interval
clsConfint = clsRegressionDefaults.clsDefaultConfint.Clone
- clsConfint.iCallType = 2
+ clsConfint.bExcludeAssignedFunctionOutput = False
+
+ '--------------------------------------------------------------------
+ 'todo. what was the purpose of these RFunctions? Delete
+ 'clsRgeom_point = clsRegressionDefaults.clsDefaultRgeom_pointFunction.Clone
+
+ 'clsRAovFunction.SetPackageName("stats")
+ 'clsRAovFunction.SetRCommand("anova")
+ 'clsRAovFunction.iCallType = 2
'Anova +Pvalue
- clsREstPValFunction = clsRegressionDefaults.clsDefaultRaovPValueFunction.Clone
- ' clsRaovpvalFunction.AddParameter("", clsRFunctionParameter:=clsRLmOrGLM)
- clsREstPValFunction.iCallType = 2
+ 'clsREstPValFunction = clsRegressionDefaults.clsDefaultRaovPValueFunction.Clone
+ 'clsRaovpvalFunction.AddParameter("", clsRFunctionParameter:=clsRLmOrGLM)
+ 'clsREstPValFunction.iCallType = 2
+ 'todo. where is it used?
'ucrSave (sdgSimpleRegOptions) Fitted Values
- clsRWriteFitted = clsRegressionDefaults.clsDefaultAddColumnsToData.Clone
- clsRWriteFitted.SetAssignTo(sdgSimpleRegOptions.ucrSaveFittedColumnName.GetText, strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=sdgSimpleRegOptions.ucrSaveFittedColumnName.GetText, bAssignToIsPrefix:=True)
- ' clsRWriteFitted.iCallType = 3
+ 'clsRWriteFitted = clsRegressionDefaults.clsDefaultAddColumnsToData.Clone
+ 'clsRWriteFitted.SetAssignTo(sdgSimpleRegOptions.ucrSaveFittedColumnName.GetText, strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=sdgSimpleRegOptions.ucrSaveFittedColumnName.GetText, bAssignToIsPrefix:=True)
+ 'clsRWriteFitted.iCallType = 3
'ucrSave (sdgSimpleRegOptions) Residuals
- clsRWriteResiduals = clsRegressionDefaults.clsDefaultAddColumnsToData.Clone
- clsRWriteResiduals.SetAssignTo(sdgSimpleRegOptions.ucrSaveResidualsColumnName.GetText, strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=sdgSimpleRegOptions.ucrSaveResidualsColumnName.GetText, bAssignToIsPrefix:=True)
- ' clsRWriteResiduals.iCallType = 3
+ 'clsRWriteResiduals = clsRegressionDefaults.clsDefaultAddColumnsToData.Clone
+ 'clsRWriteResiduals.SetAssignTo(sdgSimpleRegOptions.ucrSaveResidualsColumnName.GetText, strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=sdgSimpleRegOptions.ucrSaveResidualsColumnName.GetText, bAssignToIsPrefix:=True)
+ 'clsRWriteResiduals.iCallType = 3
'ucrSave (sdgSimpleRegOptions) StdResiduals
- clsRWriteStdResiduals = clsRegressionDefaults.clsDefaultAddColumnsToData.Clone
- clsRWriteStdResiduals.SetAssignTo(sdgSimpleRegOptions.ucrSaveStdResidualsColumnName.GetText, strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=sdgSimpleRegOptions.ucrSaveStdResidualsColumnName.GetText, bAssignToIsPrefix:=True)
- ' clsRWriteStdResiduals.iCallType = 3
+ 'clsRWriteStdResiduals = clsRegressionDefaults.clsDefaultAddColumnsToData.Clone
+ 'clsRWriteStdResiduals.SetAssignTo(sdgSimpleRegOptions.ucrSaveStdResidualsColumnName.GetText, strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=sdgSimpleRegOptions.ucrSaveStdResidualsColumnName.GetText, bAssignToIsPrefix:=True)
+ 'clsRWriteStdResiduals.iCallType = 3
'ucrSave (sdgSimpleRegOptions) Leverage
- clsRWriteLeverage = clsRegressionDefaults.clsDefaultAddColumnsToData.Clone
- clsRWriteLeverage.SetAssignTo(sdgSimpleRegOptions.ucrSaveLeverageColumnName.GetText, strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=sdgSimpleRegOptions.ucrSaveLeverageColumnName.GetText, bAssignToIsPrefix:=True)
+ 'clsRWriteLeverage = clsRegressionDefaults.clsDefaultAddColumnsToData.Clone
+ 'clsRWriteLeverage.SetAssignTo(sdgSimpleRegOptions.ucrSaveLeverageColumnName.GetText, strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=sdgSimpleRegOptions.ucrSaveLeverageColumnName.GetText, bAssignToIsPrefix:=True)
'clsRWriteLeverage.iCallType = 3
+ '--------------------------------------------------------------------
clsResidualFunction.SetRCommand("residuals")
-
clsFittedValuesFunction.SetRCommand("fitted.values")
-
clsRstandardFunction.SetRCommand("rstandard")
-
clsHatvaluesFunction.SetRCommand("hatvalues")
ucrBase.clsRsyntax.AddToBeforeCodes(clsAttach, 1)
ucrBase.clsRsyntax.AddToAfterCodes(clsDetach, 1000)
ucrBase.clsRsyntax.AddToAfterCodes(clsSummaryFunction, 2)
+ ucrSelectorModelling.Reset()
+ ucrChkIncludeArguments.Checked = False
+ ucrInputComboRPackage.SetName("stats")
+ ucrReceiverForTestColumn.SetMeAsReceiver()
+ ucrReceiverForTestColumn.AddToReceiverAtCursorPosition("lm(, na.action = na.exclude)", 25)
+ ucrSaveResult.Reset()
ucrTryModelling.SetRSyntax(ucrBase.clsRsyntax)
-
bResetDisplayOptions = True
bUpdating = False
End Sub
+ Private Sub assignToControlsChanged(ucrChangedControl As ucrCore) Handles ucrSaveResult.ControlValueChanged
+
+ Dim strAssginTo As String
+ strAssginTo = ucrBase.clsRsyntax.GetstrAssignTo()
+
+ '---------------------------------------------------------------------
+ 'model summaries outputs
+
+ 'stats output formula for the model
+ clsFormulaFunction.AddParameter("x", strParameterValue:=strAssginTo, iPosition:=0)
+ clsFormulaFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorModelling.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ 'anova output summary for the model
+ clsAnovaFunction.AddParameter("object", strParameterValue:=strAssginTo, iPosition:=0)
+ clsAnovaFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorModelling.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ 'estimates output for the model
+ clsSummaryFunction.AddParameter("object", strParameterValue:=strAssginTo, iPosition:=0)
+ clsSummaryFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorModelling.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+
+ 'confidence output limits for the model
+ clsConfint.AddParameter("object", strParameterValue:=strAssginTo, iPosition:=0)
+ clsConfint.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorModelling.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ '---------------------------------------------------------------------
+ 'column outputs
+ 'note set assign has not been set here because it's done at the sub dialog level
+ 'through individual save controls linked to this dialog data frame selector
+
+ clsResidualFunction.AddParameter("object", strParameterValue:=strAssginTo, iPosition:=0)
+ clsFittedValuesFunction.AddParameter("object", strParameterValue:=strAssginTo, iPosition:=0)
+ clsRstandardFunction.AddParameter("model", strParameterValue:=strAssginTo, iPosition:=0)
+ clsHatvaluesFunction.AddParameter("model", strParameterValue:=strAssginTo, iPosition:=0)
+
+ '---------------------------------------------------------------------
+ 'graphical outputs
+
+ 'model plot output
+ clsVisReg.AddParameter("fit", strParameterValue:=strAssginTo, iPosition:=0)
+ clsVisReg.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorModelling.strCurrentDataFrame,
+ strObjectName:="last_graph")
+
+ 'residual plots outputs
+ For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
+ kvp.Value.AddParameter("x", strParameterValue:=strAssginTo, iPosition:=0)
+ kvp.Value.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorModelling.strCurrentDataFrame,
+ strObjectName:="last_graph")
+ Next
+
+ End Sub
+
Private Sub TestOkEnabled()
If ucrSaveResult.IsComplete AndAlso Not ucrReceiverForTestColumn.IsEmpty Then
ucrBase.OKEnabled(True)
@@ -505,7 +577,6 @@ Public Class dlgModelling
Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) Handles cmdDisplayOptions.Click
sdgSimpleRegOptions.SetRCode(clsNewRSyntax:=ucrBase.clsRsyntax, clsNewFormulaFunction:=clsFormulaFunction, clsNewAnovaFunction:=clsAnovaFunction, clsNewRSummaryFunction:=clsSummaryFunction, clsNewConfint:=clsConfint, clsNewVisReg:=clsVisReg, dctNewPlot:=dctPlotFunctions, clsNewResidualFunction:=clsResidualFunction, clsNewFittedValuesFunction:=clsFittedValuesFunction, clsNewRstandardFunction:=clsRstandardFunction, clsNewHatvaluesFunction:=clsHatvaluesFunction, ucrNewAvailableDatafrane:=ucrSelectorModelling.ucrAvailableDataFrames, bReset:=bResetDisplayOptions)
sdgSimpleRegOptions.ShowDialog()
- GraphAssignTo()
bResetDisplayOptions = False
End Sub
@@ -530,7 +601,6 @@ Public Class dlgModelling
bUpdating = True
ucrSaveResult.SetRCode(ucrBase.clsRsyntax.clsBaseCommandString, bReset)
bUpdating = False
- SetObjectInFunctions()
End Sub
@@ -539,50 +609,10 @@ Public Class dlgModelling
TestOkEnabled()
End Sub
- Private Sub GraphAssignTo()
- 'Dim lstPlotNames As New List(Of String)
- 'Dim i As Integer = 0
-
- 'lstPlotNames = New List(Of String)({"last_residplot", "last_qqplot", "last_scaleloc", "last_cooksdist", "last_residlev", "last_cookslev"})
-
- clsVisReg.SetAssignTo("last_visreg", strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_visreg")
- 'For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
- ' kvp.Value.SetAssignTo(lstPlotNames(index:=i), strTempDataframe:=ucrSelectorModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:=lstPlotNames(index:=i))
- ' i = i + 1
- 'Next
- End Sub
-
Private Sub ucrSaveResult_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveResult.ControlContentsChanged, ucrReceiverForTestColumn.ControlContentsChanged
TestOkEnabled()
End Sub
- Private Sub ucrSaveResult_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveResult.ControlValueChanged
- If Not bUpdating Then
- SetObjectInFunctions()
- End If
- End Sub
-
- Private Sub SetObjectInFunctions()
- Dim strAssginTo As String
-
- strAssginTo = ucrBase.clsRsyntax.GetstrAssignTo()
-
- clsFormulaFunction.AddParameter("x", strAssginTo)
- clsAnovaFunction.AddParameter("object", strAssginTo)
- clsSummaryFunction.AddParameter("object", strAssginTo)
- clsConfint.AddParameter("object", strAssginTo)
- clsVisReg.AddParameter("fit", strAssginTo)
-
- For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
- kvp.Value.AddParameter("x", strAssginTo, iPosition:=0)
- Next
-
- clsResidualFunction.AddParameter("object", strAssginTo)
- clsFittedValuesFunction.AddParameter("object", strAssginTo)
- clsRstandardFunction.AddParameter("model", strAssginTo)
- clsHatvaluesFunction.AddParameter("model", strAssginTo)
- End Sub
-
Private Sub ucrInputComboRPackage_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboRPackage.ControlValueChanged
Select Case ucrInputComboRPackage.GetText
Case "stats"
diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb
index 99d8be5f124..473f3368c3c 100644
--- a/instat/dlgOneVarFitModel.vb
+++ b/instat/dlgOneVarFitModel.vb
@@ -320,6 +320,11 @@ Public Class dlgOneVarFitModel
clsROneVarFitModelFunction.SetRCommand("fitdist")
clsROneVarFitModelFunction.AddParameter("method", Chr(34) & "mle" & Chr(34), iPosition:=1)
clsROneVarFitModelFunction.AddParameter("data", clsRFunctionParameter:=clsRConvertIntegerFunction, iPosition:=0)
+ clsROneVarFitModelFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorOneVarFitMod.strCurrentDataFrame,
+ strObjectName:="last_model")
clsNaExcludeFunction.SetPackageName("stats")
clsNaExcludeFunction.SetRCommand("na.exclude")
@@ -340,42 +345,51 @@ Public Class dlgOneVarFitModel
'Display Options/Functions
clsRplotFunction.SetPackageName("graphics")
clsRplotFunction.SetRCommand("plot")
- clsRplotFunction.AddParameter("x", clsRFunctionParameter:=clsROneVarFitModelFunction, iPosition:=0)
clsRplotFunction.iCallType = 3
clsRplotFunction.bExcludeAssignedFunctionOutput = False
+ clsRplotFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorOneVarFitMod.strCurrentDataFrame,
+ strObjectName:="last_graph")
clsRplotPPCompFunction.SetPackageName("fitdistrplus")
clsRplotPPCompFunction.SetRCommand("ppcomp")
clsRplotPPCompFunction.bExcludeAssignedFunctionOutput = False
clsRplotPPCompFunction.iCallType = 3
clsRplotPPCompFunction.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0)
- clsRplotPPCompFunction.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModelFunction, iPosition:=1)
+ 'clsRplotPPCompFunction.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModelFunction, iPosition:=1)
clsRplotCdfCompFunction.SetPackageName("fitdistrplus")
clsRplotCdfCompFunction.SetRCommand("cdfcomp")
clsRplotCdfCompFunction.bExcludeAssignedFunctionOutput = False
clsRplotCdfCompFunction.iCallType = 3
clsRplotCdfCompFunction.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0)
- clsRplotCdfCompFunction.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModelFunction, iPosition:=1)
+ 'clsRplotCdfCompFunction.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModelFunction, iPosition:=1)
clsRplotQqCompFunction.SetPackageName("fitdistrplus")
clsRplotQqCompFunction.SetRCommand("qqcomp")
clsRplotQqCompFunction.bExcludeAssignedFunctionOutput = False
clsRplotQqCompFunction.iCallType = 3
clsRplotQqCompFunction.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0)
- clsRplotQqCompFunction.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModelFunction, iPosition:=1)
+ 'clsRplotQqCompFunction.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModelFunction, iPosition:=1)
clsRplotDensCompFunction.SetPackageName("fitdistrplus")
clsRplotDensCompFunction.SetRCommand("denscomp")
clsRplotDensCompFunction.bExcludeAssignedFunctionOutput = False
clsRplotDensCompFunction.iCallType = 3
clsRplotDensCompFunction.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0)
- clsRplotDensCompFunction.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModelFunction, iPosition:=1)
+ 'clsRplotDensCompFunction.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModelFunction, iPosition:=1)
clsRLogLikFunction.SetPackageName("fitdistrplus")
clsRLogLikFunction.SetRCommand("llplot")
clsRLogLikFunction.iCallType = 3
clsRLogLikFunction.AddParameter("mlefit", clsRFunctionParameter:=clsROneVarFitModelFunction, iPosition:=0)
+ clsRLogLikFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorOneVarFitMod.strCurrentDataFrame,
+ strObjectName:="last_graph")
'Test
clsBionomialFunction.SetPackageName("mosaic")
@@ -447,7 +461,6 @@ Public Class dlgOneVarFitModel
clsMeanCIFunction.AddParameter("conf.level", "0.95", iPosition:=1)
clsMeanCIFunction.AddParameter("method", Chr(34) & "classic" & Chr(34), iPosition:=2)
-
clsMedianCIFunction.SetPackageName("DescTools")
clsMedianCIFunction.SetRCommand("MedianCI ")
clsMedianCIFunction.AddParameter("method", Chr(34) & "exact" & Chr(34), iPosition:=2)
@@ -469,8 +482,6 @@ Public Class dlgOneVarFitModel
clsQuantileCIFunction.AddParameter("minLength", "FALSE", iPosition:=6)
clsQuantileCIFunction.AddParameter("bootci.type", Chr(34) & "norm" & Chr(34), iPosition:=5)
-
-
clsSdCIFunction.SetPackageName("MKinfer")
clsSdCIFunction.SetRCommand("sdCI")
clsSdCIFunction.AddParameter("boot", "FALSE", iPosition:=2)
@@ -482,16 +493,20 @@ Public Class dlgOneVarFitModel
clsVarCIFunction.SetRCommand("VarCI")
clsVarCIFunction.AddParameter("method", Chr(34) & "classic" & Chr(34), iPosition:=1)
- clsROneVarFitModelFunction.SetAssignTo("last_model", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model")
- clsRLogLikFunction.SetAssignTo("last_likelihood", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_likelihood")
- clsRplotFunction.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph")
-
ucrBase.clsRsyntax.ClearCodes()
ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModelFunction)
bResetFittingOptions = True
bResetFitModDisplay = True
End Sub
+ Private Sub assignToControlsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlValueChanged
+ clsRplotFunction.AddParameter("x", strParameterValue:=clsROneVarFitModelFunction.GetRObjectToAssignTo(), iPosition:=0)
+ clsRplotPPCompFunction.AddParameter("ft", strParameterValue:=clsROneVarFitModelFunction.GetRObjectToAssignTo(), iPosition:=1)
+ clsRplotCdfCompFunction.AddParameter("ft", strParameterValue:=clsROneVarFitModelFunction.GetRObjectToAssignTo(), iPosition:=1)
+ clsRplotQqCompFunction.AddParameter("ft", strParameterValue:=clsROneVarFitModelFunction.GetRObjectToAssignTo(), iPosition:=1)
+ clsRplotDensCompFunction.AddParameter("ft", strParameterValue:=clsROneVarFitModelFunction.GetRObjectToAssignTo(), iPosition:=1)
+ End Sub
+
Private Sub SetRCodeForControls(bReset As Boolean)
ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("x", 0), iAdditionalPairNo:=1)
ucrReceiverVariable.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("x", 0), iAdditionalPairNo:=2)
diff --git a/instat/dlgOneVariableSummarise.vb b/instat/dlgOneVariableSummarise.vb
index 1a812f48b7e..aada418233a 100644
--- a/instat/dlgOneVariableSummarise.vb
+++ b/instat/dlgOneVariableSummarise.vb
@@ -172,11 +172,11 @@ Public Class dlgOneVariableSummarise
clsSummaryFunction.SetRCommand("summary")
clsSummaryFunction.AddParameter("maxsum", iMaxSum)
clsSummaryFunction.AddParameter("na.rm", "FALSE", iPosition:=3)
- clsSummaryFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
- strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table,
- strRObjectFormatToAssignTo:=RObjectFormat.Text,
- strRDataFrameNameToAddObjectTo:=ucrSelectorOneVarSummarise.strCurrentDataFrame,
- strObjectName:="last_summary")
+ clsSummaryFunction.SetAssignToOutputObject("last_summary",
+ RObjectTypeLabel.Summary,
+ RObjectFormat.Text,
+ ucrSelectorOneVarSummarise.strCurrentDataFrame,
+ "last_summary")
clsSummaryTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table")
clsSummaryTableFunction.AddParameter("treat_columns_as_factor", "TRUE", iPosition:=0)
diff --git a/instat/dlgOptions.vb b/instat/dlgOptions.vb
index ff4bc1c9b40..2c4ed9a818b 100644
--- a/instat/dlgOptions.vb
+++ b/instat/dlgOptions.vb
@@ -86,10 +86,14 @@ Public Class dlgOptions
ucrInputLanguage.SetLinkedDisplayControl(lblLanguage)
ucrInputLanguage.SetItems({"English", "French", "Kiswahili", "Portuguese", "Russian", "Spanish"})
ucrInputLanguage.SetDropDownStyleAsNonEditable()
+ ucrChkShowWaitDialog.SetText("Show waiting dialog when command takes longer than")
- ucrChkShowWaitDialog.SetText("Set maximum height for outputs")
+ ucrChkMaximumOutputsHeight.SetText("Set maximum height for outputs")
ucrChkMaximumOutputsHeight.AddToLinkedControls(ucrNudMaximumOutputsHeight, {True})
ucrNudMaximumOutputsHeight.Maximum = 1000
+ 'todo. temporarily disabled
+ ucrChkMaximumOutputsHeight.Visible = False
+ ucrNudMaximumOutputsHeight.Visible = False
SetVisibleLanButton()
End Sub
@@ -122,10 +126,12 @@ Public Class dlgOptions
ucrInputHost.SetName(frmMain.clsInstatOptions.strClimsoftHost)
ucrInputPort.SetName(frmMain.clsInstatOptions.strClimsoftPort)
ucrInputUserName.SetName(frmMain.clsInstatOptions.strClimsoftUsername)
- ucrChkMaximumOutputsHeight.Checked = frmMain.clsInstatOptions.iMaxOutputsHeight > 0
- ucrNudMaximumOutputsHeight.Value = If(frmMain.clsInstatOptions.iMaxOutputsHeight > 0,
- frmMain.clsInstatOptions.iMaxOutputsHeight,
- clsInstatOptionsDefaults.DEFAULTiMaxOutputsHeight)
+
+ 'todo. temporarily disabled
+ 'ucrChkMaximumOutputsHeight.Checked = frmMain.clsInstatOptions.iMaxOutputsHeight > 0
+ 'ucrNudMaximumOutputsHeight.Value = If(frmMain.clsInstatOptions.iMaxOutputsHeight > 0,
+ ' frmMain.clsInstatOptions.iMaxOutputsHeight,
+ ' clsInstatOptionsDefaults.DEFAULTiMaxOutputsHeight)
Select Case frmMain.clsInstatOptions.strLanguageCultureCode
Case "en-GB"
@@ -183,8 +189,9 @@ Public Class dlgOptions
frmMain.clsInstatOptions.SetClimsoftHost(ucrInputHost.GetText())
frmMain.clsInstatOptions.SetClimsoftPort(ucrInputPort.GetText())
frmMain.clsInstatOptions.SetClimsoftUsername(ucrInputUserName.GetText())
- frmMain.clsInstatOptions.SetMaximumOutputsHeight(If(ucrChkMaximumOutputsHeight.Checked,
- ucrNudMaximumOutputsHeight.Value, -1))
+ 'todo. temporarily disabled
+ 'frmMain.clsInstatOptions.SetMaximumOutputsHeight(If(ucrChkMaximumOutputsHeight.Checked,
+ ' ucrNudMaximumOutputsHeight.Value, -1))
End Sub
Private Sub SetView()
diff --git a/instat/dlgRandomSample.designer.vb b/instat/dlgRandomSample.designer.vb
index 7ee509bd3cf..608a2b01ff3 100644
--- a/instat/dlgRandomSample.designer.vb
+++ b/instat/dlgRandomSample.designer.vb
@@ -49,7 +49,7 @@ Partial Class dlgRandomSample
Me.ucrNudSeed = New instat.ucrNud()
Me.ucrChkSetSeed = New instat.ucrCheck()
Me.ucrSampleSize = New instat.ucrDataFrameLength()
- Me.ucrSelectorRandomSamples = New instat.ucrDataFrame()
+ Me.ucrDataFrameRandomSamples = New instat.ucrDataFrame()
Me.ucrDistWithParameters = New instat.ucrDistributionsWithParameters()
Me.ucrBase = New instat.ucrButtons()
Me.SuspendLayout()
@@ -140,22 +140,25 @@ Partial Class dlgRandomSample
'
'ucrSampleSize
'
+ Me.ucrSampleSize.AddQuotesIfUnrecognised = True
Me.ucrSampleSize.AutoSize = True
+ Me.ucrSampleSize.IsMultiline = False
+ Me.ucrSampleSize.IsReadOnly = True
Me.ucrSampleSize.Location = New System.Drawing.Point(359, 152)
Me.ucrSampleSize.Name = "ucrSampleSize"
Me.ucrSampleSize.Size = New System.Drawing.Size(55, 23)
Me.ucrSampleSize.TabIndex = 7
'
- 'ucrSelectorRandomSamples
+ 'ucrDataFrameRandomSamples
'
- Me.ucrSelectorRandomSamples.AutoSize = True
- Me.ucrSelectorRandomSamples.bDropUnusedFilterLevels = False
- Me.ucrSelectorRandomSamples.bUseCurrentFilter = True
- Me.ucrSelectorRandomSamples.Location = New System.Drawing.Point(10, 10)
- Me.ucrSelectorRandomSamples.Margin = New System.Windows.Forms.Padding(0)
- Me.ucrSelectorRandomSamples.Name = "ucrSelectorRandomSamples"
- Me.ucrSelectorRandomSamples.Size = New System.Drawing.Size(153, 43)
- Me.ucrSelectorRandomSamples.TabIndex = 0
+ Me.ucrDataFrameRandomSamples.AutoSize = True
+ Me.ucrDataFrameRandomSamples.bDropUnusedFilterLevels = False
+ Me.ucrDataFrameRandomSamples.bUseCurrentFilter = True
+ Me.ucrDataFrameRandomSamples.Location = New System.Drawing.Point(10, 10)
+ Me.ucrDataFrameRandomSamples.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrDataFrameRandomSamples.Name = "ucrDataFrameRandomSamples"
+ Me.ucrDataFrameRandomSamples.Size = New System.Drawing.Size(153, 43)
+ Me.ucrDataFrameRandomSamples.TabIndex = 0
'
'ucrDistWithParameters
'
@@ -171,7 +174,7 @@ Partial Class dlgRandomSample
Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.ucrBase.Location = New System.Drawing.Point(10, 262)
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 = 9
'
'dlgRandomSample
@@ -188,7 +191,7 @@ Partial Class dlgRandomSample
Me.Controls.Add(Me.ucrSampleSize)
Me.Controls.Add(Me.lblNumberofSamples)
Me.Controls.Add(Me.lblSampleSize)
- Me.Controls.Add(Me.ucrSelectorRandomSamples)
+ Me.Controls.Add(Me.ucrDataFrameRandomSamples)
Me.Controls.Add(Me.ucrDistWithParameters)
Me.Controls.Add(Me.ucrBase)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
@@ -204,7 +207,7 @@ Partial Class dlgRandomSample
Friend WithEvents ucrBase As ucrButtons
Friend WithEvents ucrDistWithParameters As ucrDistributionsWithParameters
- Friend WithEvents ucrSelectorRandomSamples As ucrDataFrame
+ Friend WithEvents ucrDataFrameRandomSamples As ucrDataFrame
Friend WithEvents lblSampleSize As Label
Friend WithEvents lblNumberofSamples As Label
Friend WithEvents ucrSampleSize As ucrDataFrameLength
diff --git a/instat/dlgRandomSample.vb b/instat/dlgRandomSample.vb
index bd9515c9759..15a63ca32c6 100644
--- a/instat/dlgRandomSample.vb
+++ b/instat/dlgRandomSample.vb
@@ -46,9 +46,9 @@ Public Class dlgRandomSample
ucrNudNumberOfSamples.SetParameter(New RParameter("n", 0))
ucrNudNumberOfSamples.SetMinMax(1, Integer.MaxValue)
- ucrSampleSize.SetDataFrameSelector(ucrSelectorRandomSamples)
+ ucrSampleSize.SetDataFrameSelector(ucrDataFrameRandomSamples)
- ucrSelectorRandomSamples.bUseCurrentFilter = False
+ ucrDataFrameRandomSamples.bUseCurrentFilter = False
ucrChkSetSeed.SetText("Set Seed")
ucrChkSetSeed.AddRSyntaxContainsFunctionNamesCondition(True, {"set.seed"})
@@ -78,7 +78,7 @@ Public Class dlgRandomSample
ttRngKind.SetToolTip(ucrChkRngKind.chkCheck, "Chooses a different Random Number Generator. Can usually be ignored.")
ucrSaveRandomSample.SetSaveTypeAsColumn()
- ucrSaveRandomSample.SetDataFrameSelector(ucrSelectorRandomSamples)
+ ucrSaveRandomSample.SetDataFrameSelector(ucrDataFrameRandomSamples)
ucrSaveRandomSample.SetIsComboBox()
End Sub
@@ -89,7 +89,7 @@ Public Class dlgRandomSample
clsRNGKindFunction = New RFunction
ucrBase.clsRsyntax.ClearCodes()
- ucrSelectorRandomSamples.Reset()
+ ucrDataFrameRandomSamples.Reset()
ucrSaveRandomSample.Reset()
SetNewColumName()
@@ -107,8 +107,12 @@ Public Class dlgRandomSample
clsMultipleSamplesFunction.AddParameter("expr", clsRFunctionParameter:=clsDistributionFunction, iPosition:=1)
+ clsMultipleSamplesFunction.SetAssignToColumnObject(ucrSaveRandomSample.GetText(),
+ ucrSaveRandomSample.GetText,
+ ucrDataFrameRandomSamples.cboAvailableDataFrames.Text,
+ bAssignToIsPrefix:=True)
+
ucrBase.clsRsyntax.SetBaseRFunction(clsMultipleSamplesFunction)
- ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrSaveRandomSample.GetText, strTempDataframe:=ucrSelectorRandomSamples.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveRandomSample.GetText, bAssignToIsPrefix:=True)
SetDataFrameAndDistributionParameters()
End Sub
@@ -158,10 +162,10 @@ Public Class dlgRandomSample
Private Sub SetDataFrameAndDistributionParameters()
If ucrDistWithParameters.clsCurrDistribution.strRName = "hyper" Then
- clsDistributionFunction.AddParameter("nn", ucrSelectorRandomSamples.iDataFrameLength)
+ clsDistributionFunction.AddParameter("nn", ucrDataFrameRandomSamples.iDataFrameLength)
Else
clsDistributionFunction.RemoveParameterByName("nn")
- clsDistributionFunction.AddParameter("n", ucrSelectorRandomSamples.iDataFrameLength)
+ clsDistributionFunction.AddParameter("n", ucrDataFrameRandomSamples.iDataFrameLength)
End If
End Sub
@@ -174,13 +178,13 @@ Public Class dlgRandomSample
SetNewColumName()
End Sub
- Private Sub ucrSaveRandomSample_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveRandomSample.ControlContentsChanged, ucrSelectorRandomSamples.ControlContentsChanged,
+ Private Sub ucrSaveRandomSample_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveRandomSample.ControlContentsChanged, ucrDataFrameRandomSamples.ControlContentsChanged,
ucrChkSetSeed.ControlContentsChanged, ucrNudSeed.ControlContentsChanged, ucrSampleSize.ControlContentsChanged, ucrInputRngKind.ControlContentsChanged,
ucrChkRngKind.ControlContentsChanged
TestOKEnabled()
End Sub
- Private Sub ucrSelectorRandomSamples_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorRandomSamples.ControlValueChanged
+ Private Sub ucrSelectorRandomSamples_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDataFrameRandomSamples.ControlValueChanged
SetDataFrameAndDistributionParameters()
End Sub
diff --git a/instat/dlgReorderDataFrame.vb b/instat/dlgReorderDataFrame.vb
index b018f7030e2..4b06a36e683 100644
--- a/instat/dlgReorderDataFrame.vb
+++ b/instat/dlgReorderDataFrame.vb
@@ -77,8 +77,4 @@ Public Class dlgReorderDataFrame
Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrDataFrameToReorder.ControlContentsChanged
TestOkEnabled()
End Sub
-
- Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk
- frmMain.ReOrderWorkSheets()
- End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgShowModel.vb b/instat/dlgShowModel.vb
index b581ccd1c62..476f8b47c2f 100644
--- a/instat/dlgShowModel.vb
+++ b/instat/dlgShowModel.vb
@@ -182,16 +182,31 @@ Public Class dlgShowModel
Private Sub SwitchBetweenSaveGraphOrColumn()
clsPipeOperator.RemoveAssignTo()
If rdoValues.Checked AndAlso ucrReceiverProbabilitiesOrValues.Visible Then
- ucrBase.clsRsyntax.iCallType = 0
- clsPipeOperator.SetAssignTo(ucrSaveNewColumn.GetText(), strTempDataframe:=ucrSelectorShowModel.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveNewColumn.GetText)
+ clsPipeOperator.SetAssignToColumnObject(ucrSaveNewColumn.GetText(),
+ ucrSaveNewColumn.GetText,
+ ucrSelectorShowModel.strCurrentDataFrame,
+ bAssignToIsPrefix:=True)
+
ElseIf rdoGraph.Checked AndAlso ucrSaveGraph.ucrChkSave.Checked Then
- ucrBase.clsRsyntax.iCallType = 3
- clsPipeOperator.SetAssignTo(ucrSaveGraph.GetText(), strTempDataframe:=ucrSelectorShowModel.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:=ucrSaveGraph.GetText)
+ clsPipeOperator.SetAssignToOutputObject(ucrSaveGraph.GetText(),
+ RObjectTypeLabel.Graph,
+ RObjectFormat.Image,
+ ucrSelectorShowModel.strCurrentDataFrame,
+ ucrSaveGraph.GetText())
+
ElseIf rdoGraph.Checked AndAlso Not ucrSaveGraph.ucrChkSave.Checked Then
- ucrBase.clsRsyntax.iCallType = 3
- clsPipeOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorShowModel.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph", bAssignToIsPrefix:=True)
+ clsPipeOperator.SetAssignToOutputObject("last_graph",
+ RObjectTypeLabel.Graph,
+ RObjectFormat.Image,
+ ucrSelectorShowModel.strCurrentDataFrame,
+ "last_graph")
+
Else
- ucrBase.clsRsyntax.iCallType = 2
+ clsPipeOperator.SetAssignToOutputObject("last_summary",
+ RObjectTypeLabel.Summary,
+ RObjectFormat.Text,
+ ucrSelectorShowModel.strCurrentDataFrame,
+ "last_summary")
End If
End Sub
diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb
index fc4c0529ad1..1ac32deb8a1 100644
--- a/instat/dlgSummaryTables.Designer.vb
+++ b/instat/dlgSummaryTables.Designer.vb
@@ -38,49 +38,52 @@ Partial Class dlgSummaryTables
'Do not modify it using the code editor.
Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container()
Me.lblFactors = New System.Windows.Forms.Label()
Me.cmdSummaries = New System.Windows.Forms.Button()
Me.lblSigFigs = New System.Windows.Forms.Label()
Me.grpDisplay = New System.Windows.Forms.GroupBox()
+ Me.ucrNudColumnFactors = New instat.ucrNud()
Me.lblColumnFactors = New System.Windows.Forms.Label()
+ Me.ucrChkDisplaySummaryVariablesAsRow = New instat.ucrCheck()
+ Me.ucrChkDisplayVariablesAsRows = New instat.ucrCheck()
+ Me.ucrChkDisplaySummariesAsRow = New instat.ucrCheck()
+ Me.ucrNudSigFigs = New instat.ucrNud()
Me.grpMargin = New System.Windows.Forms.GroupBox()
Me.rdoBoth = New System.Windows.Forms.RadioButton()
Me.rdoSummary = New System.Windows.Forms.RadioButton()
Me.rdoOuter = New System.Windows.Forms.RadioButton()
+ Me.ucrPnlMargin = New instat.UcrPanel()
Me.lblMarginName = New System.Windows.Forms.Label()
Me.lblVariables = New System.Windows.Forms.Label()
Me.cmdFormatTable = New System.Windows.Forms.Button()
Me.rdoFrequencyTable = New System.Windows.Forms.RadioButton()
Me.rdoSummaryTable = New System.Windows.Forms.RadioButton()
Me.grpPercentages = New System.Windows.Forms.GroupBox()
+ Me.ucrReceiverPercentages = New instat.ucrReceiverSingle()
Me.lblFactorsAsPercentage = New System.Windows.Forms.Label()
+ Me.ucrChkPercentageProportion = New instat.ucrCheck()
+ Me.ucrChkDisplayAsPercentage = New instat.ucrCheck()
Me.lblFrequencyMarginName = New System.Windows.Forms.Label()
Me.cmdMissingOptions = New System.Windows.Forms.Button()
Me.ucrChkFrequencyDisplayMargins = New instat.ucrCheck()
- Me.ucrReceiverPercentages = New instat.ucrReceiverSingle()
- Me.ucrChkPercentageProportion = New instat.ucrCheck()
- Me.ucrChkDisplayAsPercentage = New instat.ucrCheck()
Me.ucrPnlSummaryFrequencyTables = New instat.UcrPanel()
- Me.ucrReorderSummary = New instat.ucrReorder()
Me.ucrInputMarginName = New instat.ucrInputTextBox()
Me.ucrSaveTable = New instat.ucrSave()
Me.ucrChkOmitMissing = New instat.ucrCheck()
Me.ucrChkStoreResults = New instat.ucrCheck()
Me.ucrChkDisplayMargins = New instat.ucrCheck()
- Me.ucrNudColumnFactors = New instat.ucrNud()
- Me.ucrChkDisplaySummaryVariablesAsRow = New instat.ucrCheck()
- Me.ucrChkDisplayVariablesAsRows = New instat.ucrCheck()
- Me.ucrChkDisplaySummariesAsRow = New instat.ucrCheck()
- Me.ucrNudSigFigs = New instat.ucrNud()
Me.ucrChkSummaries = New instat.ucrCheck()
Me.ucrBase = New instat.ucrButtons()
Me.ucrReceiverSummaryCols = New instat.ucrReceiverMultiple()
Me.ucrReceiverFactors = New instat.ucrReceiverMultiple()
Me.ucrReceiverWeights = New instat.ucrReceiverSingle()
Me.ucrChkWeight = New instat.ucrCheck()
- Me.ucrSelectorSummaryTables = New instat.ucrSelectorByDataFrameAddRemove()
- Me.ucrPnlMargin = New instat.UcrPanel()
Me.ucrInputFrequencyMarginName = New instat.ucrInputTextBox()
+ Me.rdoMultipleResponse = New System.Windows.Forms.RadioButton()
+ Me.ttMultipleResponse = New System.Windows.Forms.ToolTip(Me.components)
+ Me.ucrReorderSummary = New instat.ucrReorder()
+ Me.ucrSelectorSummaryTables = New instat.ucrSelectorByDataFrameAddRemove()
Me.grpDisplay.SuspendLayout()
Me.grpMargin.SuspendLayout()
Me.grpPercentages.SuspendLayout()
@@ -134,6 +137,19 @@ Partial Class dlgSummaryTables
Me.grpDisplay.TabStop = False
Me.grpDisplay.Text = "Display"
'
+ 'ucrNudColumnFactors
+ '
+ Me.ucrNudColumnFactors.AutoSize = True
+ Me.ucrNudColumnFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudColumnFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.ucrNudColumnFactors.Location = New System.Drawing.Point(111, 49)
+ Me.ucrNudColumnFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
+ Me.ucrNudColumnFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudColumnFactors.Name = "ucrNudColumnFactors"
+ Me.ucrNudColumnFactors.Size = New System.Drawing.Size(50, 20)
+ Me.ucrNudColumnFactors.TabIndex = 19
+ Me.ucrNudColumnFactors.Value = New Decimal(New Integer() {0, 0, 0, 0})
+ '
'lblColumnFactors
'
Me.lblColumnFactors.AutoSize = True
@@ -145,6 +161,46 @@ Partial Class dlgSummaryTables
Me.lblColumnFactors.Tag = ""
Me.lblColumnFactors.Text = "Column Factors :"
'
+ 'ucrChkDisplaySummaryVariablesAsRow
+ '
+ Me.ucrChkDisplaySummaryVariablesAsRow.AutoSize = True
+ Me.ucrChkDisplaySummaryVariablesAsRow.Checked = False
+ Me.ucrChkDisplaySummaryVariablesAsRow.Location = New System.Drawing.Point(11, 73)
+ Me.ucrChkDisplaySummaryVariablesAsRow.Name = "ucrChkDisplaySummaryVariablesAsRow"
+ Me.ucrChkDisplaySummaryVariablesAsRow.Size = New System.Drawing.Size(231, 23)
+ Me.ucrChkDisplaySummaryVariablesAsRow.TabIndex = 17
+ '
+ 'ucrChkDisplayVariablesAsRows
+ '
+ Me.ucrChkDisplayVariablesAsRows.AutoSize = True
+ Me.ucrChkDisplayVariablesAsRows.Checked = False
+ Me.ucrChkDisplayVariablesAsRows.Location = New System.Drawing.Point(11, 97)
+ Me.ucrChkDisplayVariablesAsRows.Name = "ucrChkDisplayVariablesAsRows"
+ Me.ucrChkDisplayVariablesAsRows.Size = New System.Drawing.Size(186, 23)
+ Me.ucrChkDisplayVariablesAsRows.TabIndex = 11
+ '
+ 'ucrChkDisplaySummariesAsRow
+ '
+ Me.ucrChkDisplaySummariesAsRow.AutoSize = True
+ Me.ucrChkDisplaySummariesAsRow.Checked = False
+ Me.ucrChkDisplaySummariesAsRow.Location = New System.Drawing.Point(11, 73)
+ Me.ucrChkDisplaySummariesAsRow.Name = "ucrChkDisplaySummariesAsRow"
+ Me.ucrChkDisplaySummariesAsRow.Size = New System.Drawing.Size(175, 23)
+ Me.ucrChkDisplaySummariesAsRow.TabIndex = 10
+ '
+ 'ucrNudSigFigs
+ '
+ Me.ucrNudSigFigs.AutoSize = True
+ Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.ucrNudSigFigs.Location = New System.Drawing.Point(111, 23)
+ Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
+ Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
+ Me.ucrNudSigFigs.Name = "ucrNudSigFigs"
+ Me.ucrNudSigFigs.Size = New System.Drawing.Size(50, 20)
+ Me.ucrNudSigFigs.TabIndex = 5
+ Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0})
+ '
'grpMargin
'
Me.grpMargin.Controls.Add(Me.rdoBoth)
@@ -193,6 +249,15 @@ Partial Class dlgSummaryTables
Me.rdoOuter.Text = "Outer"
Me.rdoOuter.UseVisualStyleBackColor = True
'
+ 'ucrPnlMargin
+ '
+ Me.ucrPnlMargin.AutoSize = True
+ Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
+ Me.ucrPnlMargin.Location = New System.Drawing.Point(6, 14)
+ Me.ucrPnlMargin.Name = "ucrPnlMargin"
+ Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0)
+ Me.ucrPnlMargin.TabIndex = 13
+ '
'lblMarginName
'
Me.lblMarginName.AutoSize = True
@@ -232,12 +297,12 @@ Partial Class dlgSummaryTables
Me.rdoFrequencyTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
Me.rdoFrequencyTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.rdoFrequencyTable.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoFrequencyTable.Location = New System.Drawing.Point(107, 7)
+ Me.rdoFrequencyTable.Location = New System.Drawing.Point(51, 7)
Me.rdoFrequencyTable.Name = "rdoFrequencyTable"
Me.rdoFrequencyTable.Size = New System.Drawing.Size(129, 27)
Me.rdoFrequencyTable.TabIndex = 22
Me.rdoFrequencyTable.TabStop = True
- Me.rdoFrequencyTable.Text = "Frequency Table"
+ Me.rdoFrequencyTable.Text = "Frequency"
Me.rdoFrequencyTable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.rdoFrequencyTable.UseVisualStyleBackColor = True
'
@@ -249,12 +314,12 @@ Partial Class dlgSummaryTables
Me.rdoSummaryTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
Me.rdoSummaryTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.rdoSummaryTable.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.rdoSummaryTable.Location = New System.Drawing.Point(235, 7)
+ Me.rdoSummaryTable.Location = New System.Drawing.Point(178, 7)
Me.rdoSummaryTable.Name = "rdoSummaryTable"
Me.rdoSummaryTable.Size = New System.Drawing.Size(133, 27)
Me.rdoSummaryTable.TabIndex = 21
Me.rdoSummaryTable.TabStop = True
- Me.rdoSummaryTable.Text = "Summary Table"
+ Me.rdoSummaryTable.Text = "Summary"
Me.rdoSummaryTable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.rdoSummaryTable.UseVisualStyleBackColor = True
'
@@ -271,6 +336,19 @@ Partial Class dlgSummaryTables
Me.grpPercentages.TabStop = False
Me.grpPercentages.Text = "Percentages"
'
+ 'ucrReceiverPercentages
+ '
+ Me.ucrReceiverPercentages.AutoSize = True
+ Me.ucrReceiverPercentages.frmParent = Me
+ Me.ucrReceiverPercentages.Location = New System.Drawing.Point(16, 60)
+ Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages"
+ Me.ucrReceiverPercentages.Selector = Nothing
+ Me.ucrReceiverPercentages.Size = New System.Drawing.Size(120, 20)
+ Me.ucrReceiverPercentages.strNcFilePath = ""
+ Me.ucrReceiverPercentages.TabIndex = 4
+ Me.ucrReceiverPercentages.ucrSelector = Nothing
+ '
'lblFactorsAsPercentage
'
Me.lblFactorsAsPercentage.AutoSize = True
@@ -282,6 +360,24 @@ Partial Class dlgSummaryTables
Me.lblFactorsAsPercentage.Tag = "Factors as Percentage:"
Me.lblFactorsAsPercentage.Text = "Of Factor (Optional):"
'
+ 'ucrChkPercentageProportion
+ '
+ Me.ucrChkPercentageProportion.AutoSize = True
+ Me.ucrChkPercentageProportion.Checked = False
+ Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(5, 171)
+ Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion"
+ Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(160, 23)
+ Me.ucrChkPercentageProportion.TabIndex = 3
+ '
+ 'ucrChkDisplayAsPercentage
+ '
+ Me.ucrChkDisplayAsPercentage.AutoSize = True
+ Me.ucrChkDisplayAsPercentage.Checked = False
+ Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19)
+ Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage"
+ Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23)
+ Me.ucrChkDisplayAsPercentage.TabIndex = 0
+ '
'lblFrequencyMarginName
'
Me.lblFrequencyMarginName.AutoSize = True
@@ -311,55 +407,14 @@ Partial Class dlgSummaryTables
Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(213, 23)
Me.ucrChkFrequencyDisplayMargins.TabIndex = 24
'
- 'ucrReceiverPercentages
- '
- Me.ucrReceiverPercentages.AutoSize = True
- Me.ucrReceiverPercentages.frmParent = Nothing
- Me.ucrReceiverPercentages.Location = New System.Drawing.Point(16, 60)
- Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0)
- Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages"
- Me.ucrReceiverPercentages.Selector = Nothing
- Me.ucrReceiverPercentages.Size = New System.Drawing.Size(120, 20)
- Me.ucrReceiverPercentages.strNcFilePath = ""
- Me.ucrReceiverPercentages.TabIndex = 4
- Me.ucrReceiverPercentages.ucrSelector = Nothing
- '
- 'ucrChkPercentageProportion
- '
- Me.ucrChkPercentageProportion.AutoSize = True
- Me.ucrChkPercentageProportion.Checked = False
- Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(5, 171)
- Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion"
- Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(160, 23)
- Me.ucrChkPercentageProportion.TabIndex = 3
- '
- 'ucrChkDisplayAsPercentage
- '
- Me.ucrChkDisplayAsPercentage.AutoSize = True
- Me.ucrChkDisplayAsPercentage.Checked = False
- Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19)
- Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage"
- Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23)
- Me.ucrChkDisplayAsPercentage.TabIndex = 0
- '
'ucrPnlSummaryFrequencyTables
'
Me.ucrPnlSummaryFrequencyTables.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(107, 3)
+ Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(44, 3)
Me.ucrPnlSummaryFrequencyTables.Name = "ucrPnlSummaryFrequencyTables"
- Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(260, 33)
+ Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(407, 33)
Me.ucrPnlSummaryFrequencyTables.TabIndex = 20
'
- 'ucrReorderSummary
- '
- Me.ucrReorderSummary.AutoSize = True
- Me.ucrReorderSummary.Location = New System.Drawing.Point(286, 305)
- Me.ucrReorderSummary.Name = "ucrReorderSummary"
- Me.ucrReorderSummary.Size = New System.Drawing.Size(200, 156)
- Me.ucrReorderSummary.TabIndex = 18
- Me.ucrReorderSummary.ucrDataFrameList = Nothing
- Me.ucrReorderSummary.ucrReceiver = Nothing
- '
'ucrInputMarginName
'
Me.ucrInputMarginName.AddQuotesIfUnrecognised = True
@@ -407,59 +462,6 @@ Partial Class dlgSummaryTables
Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(150, 23)
Me.ucrChkDisplayMargins.TabIndex = 10
'
- 'ucrNudColumnFactors
- '
- Me.ucrNudColumnFactors.AutoSize = True
- Me.ucrNudColumnFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
- Me.ucrNudColumnFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0})
- Me.ucrNudColumnFactors.Location = New System.Drawing.Point(111, 49)
- Me.ucrNudColumnFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
- Me.ucrNudColumnFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
- Me.ucrNudColumnFactors.Name = "ucrNudColumnFactors"
- Me.ucrNudColumnFactors.Size = New System.Drawing.Size(50, 20)
- Me.ucrNudColumnFactors.TabIndex = 19
- Me.ucrNudColumnFactors.Value = New Decimal(New Integer() {0, 0, 0, 0})
- '
- 'ucrChkDisplaySummaryVariablesAsRow
- '
- Me.ucrChkDisplaySummaryVariablesAsRow.AutoSize = True
- Me.ucrChkDisplaySummaryVariablesAsRow.Checked = False
- Me.ucrChkDisplaySummaryVariablesAsRow.Location = New System.Drawing.Point(11, 73)
- Me.ucrChkDisplaySummaryVariablesAsRow.Name = "ucrChkDisplaySummaryVariablesAsRow"
- Me.ucrChkDisplaySummaryVariablesAsRow.Size = New System.Drawing.Size(231, 23)
- Me.ucrChkDisplaySummaryVariablesAsRow.TabIndex = 17
- '
- 'ucrChkDisplayVariablesAsRows
- '
- Me.ucrChkDisplayVariablesAsRows.AutoSize = True
- Me.ucrChkDisplayVariablesAsRows.Checked = False
- Me.ucrChkDisplayVariablesAsRows.Location = New System.Drawing.Point(11, 97)
- Me.ucrChkDisplayVariablesAsRows.Name = "ucrChkDisplayVariablesAsRows"
- Me.ucrChkDisplayVariablesAsRows.Size = New System.Drawing.Size(186, 23)
- Me.ucrChkDisplayVariablesAsRows.TabIndex = 11
- '
- 'ucrChkDisplaySummariesAsRow
- '
- Me.ucrChkDisplaySummariesAsRow.AutoSize = True
- Me.ucrChkDisplaySummariesAsRow.Checked = False
- Me.ucrChkDisplaySummariesAsRow.Location = New System.Drawing.Point(11, 73)
- Me.ucrChkDisplaySummariesAsRow.Name = "ucrChkDisplaySummariesAsRow"
- Me.ucrChkDisplaySummariesAsRow.Size = New System.Drawing.Size(175, 23)
- Me.ucrChkDisplaySummariesAsRow.TabIndex = 10
- '
- 'ucrNudSigFigs
- '
- Me.ucrNudSigFigs.AutoSize = True
- Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
- Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0})
- Me.ucrNudSigFigs.Location = New System.Drawing.Point(111, 23)
- Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
- Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
- Me.ucrNudSigFigs.Name = "ucrNudSigFigs"
- Me.ucrNudSigFigs.Size = New System.Drawing.Size(50, 20)
- Me.ucrNudSigFigs.TabIndex = 5
- Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0})
- '
'ucrChkSummaries
'
Me.ucrChkSummaries.AutoSize = True
@@ -526,6 +528,46 @@ Partial Class dlgSummaryTables
Me.ucrChkWeight.Size = New System.Drawing.Size(84, 23)
Me.ucrChkWeight.TabIndex = 5
'
+ 'ucrInputFrequencyMarginName
+ '
+ Me.ucrInputFrequencyMarginName.AddQuotesIfUnrecognised = True
+ Me.ucrInputFrequencyMarginName.AutoSize = True
+ Me.ucrInputFrequencyMarginName.IsMultiline = False
+ Me.ucrInputFrequencyMarginName.IsReadOnly = False
+ Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(92, 271)
+ Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName"
+ Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(70, 21)
+ Me.ucrInputFrequencyMarginName.TabIndex = 26
+ '
+ 'rdoMultipleResponse
+ '
+ Me.rdoMultipleResponse.Appearance = System.Windows.Forms.Appearance.Button
+ Me.rdoMultipleResponse.Enabled = False
+ Me.rdoMultipleResponse.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoMultipleResponse.FlatAppearance.BorderSize = 2
+ Me.rdoMultipleResponse.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoMultipleResponse.Location = New System.Drawing.Point(309, 7)
+ Me.rdoMultipleResponse.Name = "rdoMultipleResponse"
+ Me.rdoMultipleResponse.Size = New System.Drawing.Size(133, 27)
+ Me.rdoMultipleResponse.TabIndex = 28
+ Me.rdoMultipleResponse.TabStop = True
+ Me.rdoMultipleResponse.Text = "Multiple Response"
+ Me.rdoMultipleResponse.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
+ Me.ttMultipleResponse.SetToolTip(Me.rdoMultipleResponse, "Not Yet Available")
+ Me.rdoMultipleResponse.UseVisualStyleBackColor = True
+ '
+ 'ucrReorderSummary
+ '
+ Me.ucrReorderSummary.AutoSize = True
+ Me.ucrReorderSummary.Location = New System.Drawing.Point(286, 305)
+ Me.ucrReorderSummary.Name = "ucrReorderSummary"
+ Me.ucrReorderSummary.Size = New System.Drawing.Size(200, 156)
+ Me.ucrReorderSummary.TabIndex = 18
+ Me.ucrReorderSummary.ucrDataFrameList = Nothing
+ Me.ucrReorderSummary.ucrReceiver = Nothing
+ '
'ucrSelectorSummaryTables
'
Me.ucrSelectorSummaryTables.AutoSize = True
@@ -538,32 +580,13 @@ Partial Class dlgSummaryTables
Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(213, 183)
Me.ucrSelectorSummaryTables.TabIndex = 0
'
- 'ucrPnlMargin
- '
- Me.ucrPnlMargin.AutoSize = True
- Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
- Me.ucrPnlMargin.Location = New System.Drawing.Point(6, 14)
- Me.ucrPnlMargin.Name = "ucrPnlMargin"
- Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0)
- Me.ucrPnlMargin.TabIndex = 13
- '
- 'ucrInputFrequencyMarginName
- '
- Me.ucrInputFrequencyMarginName.AddQuotesIfUnrecognised = True
- Me.ucrInputFrequencyMarginName.AutoSize = True
- Me.ucrInputFrequencyMarginName.IsMultiline = False
- Me.ucrInputFrequencyMarginName.IsReadOnly = False
- Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(92, 271)
- Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName"
- Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(70, 21)
- Me.ucrInputFrequencyMarginName.TabIndex = 26
- '
'dlgSummaryTables
'
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(489, 571)
+ Me.Controls.Add(Me.rdoMultipleResponse)
Me.Controls.Add(Me.cmdMissingOptions)
Me.Controls.Add(Me.ucrChkFrequencyDisplayMargins)
Me.Controls.Add(Me.grpPercentages)
@@ -652,4 +675,6 @@ Partial Class dlgSummaryTables
Friend WithEvents ucrChkFrequencyDisplayMargins As ucrCheck
Friend WithEvents ucrReceiverPercentages As ucrReceiverSingle
Friend WithEvents cmdMissingOptions As Button
+ Friend WithEvents rdoMultipleResponse As RadioButton
+ Friend WithEvents ttMultipleResponse As ToolTip
End Class
\ No newline at end of file
diff --git a/instat/dlgSummaryTables.resx b/instat/dlgSummaryTables.resx
index 1af7de150c9..b1844bc465a 100644
--- a/instat/dlgSummaryTables.resx
+++ b/instat/dlgSummaryTables.resx
@@ -117,4 +117,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 17
+
\ No newline at end of file
diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb
index d96cdf3003d..aabc1a6c966 100644
--- a/instat/dlgSummaryTables.vb
+++ b/instat/dlgSummaryTables.vb
@@ -155,6 +155,7 @@ Public Class dlgSummaryTables
ucrPnlSummaryFrequencyTables.AddRadioButton(rdoSummaryTable)
ucrPnlSummaryFrequencyTables.AddRadioButton(rdoFrequencyTable)
+ ucrPnlSummaryFrequencyTables.AddRadioButton(rdoMultipleResponse)
ucrPnlSummaryFrequencyTables.AddParameterValuesCondition(rdoSummaryTable, "rdo_checked", "rdoSummary")
ucrPnlSummaryFrequencyTables.AddParameterValuesCondition(rdoFrequencyTable, "rdo_checked", "rdoFrequency")
ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrReceiverSummaryCols}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True)
@@ -322,13 +323,13 @@ Public Class dlgSummaryTables
clsSummaryDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table")
clsSummaryDefaultFunction.AddParameter("treat_columns_as_factor", "FALSE", iPosition:=8)
clsSummaryDefaultFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesList, iPosition:=12)
- clsSummaryDefaultFunction.SetAssignTo("summary_table")
+ clsSummaryDefaultFunction.SetAssignToObject("summary_table")
clsFrequencyDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table")
clsFrequencyDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=2)
clsFrequencyDefaultFunction.AddParameter("treat_columns_as_factor", "FALSE", iPosition:=10)
clsFrequencyDefaultFunction.AddParameter("summaries", "count_label", iPosition:=11)
- clsFrequencyDefaultFunction.SetAssignTo("frequency_table")
+ clsFrequencyDefaultFunction.SetAssignToObject("frequency_table")
clsTableTitleFunction.SetPackageName("gt")
clsTableTitleFunction.SetRCommand("tab_header")
@@ -384,9 +385,7 @@ Public Class dlgSummaryTables
clsStyleListFunction.SetRCommand("list")
- ucrBase.clsRsyntax.AddToBeforeCodes(clsFrequencyDefaultFunction, iPosition:=0)
ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator)
-
clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table",
strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table,
strRObjectFormatToAssignTo:=RObjectFormat.Html,
@@ -617,15 +616,11 @@ Public Class dlgSummaryTables
clsDummyFunction.AddParameter("rdo_checked", "rdoSummary", iPosition:=10)
clsMutableFunction.AddParameter("data", clsRFunctionParameter:=clsSummaryDefaultFunction, iPosition:=0)
clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0)
- ucrBase.clsRsyntax.RemoveFromBeforeCodes(clsFrequencyDefaultFunction)
- ucrBase.clsRsyntax.AddToBeforeCodes(clsSummaryDefaultFunction, iPosition:=0)
ucrSaveTable.SetPrefix("summary_table")
Else
clsDummyFunction.AddParameter("rdo_checked", "rdoFrequency", iPosition:=10)
clsMutableFunction.AddParameter("data", clsRFunctionParameter:=clsFrequencyDefaultFunction, iPosition:=0)
clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsFrequencyOperator, iPosition:=0)
- ucrBase.clsRsyntax.RemoveFromBeforeCodes(clsSummaryDefaultFunction)
- ucrBase.clsRsyntax.AddToBeforeCodes(clsFrequencyDefaultFunction, iPosition:=0)
ucrSaveTable.SetPrefix("frequency_table")
End If
End Sub
diff --git a/instat/dlgThreeVariableFrequencies.vb b/instat/dlgThreeVariableFrequencies.vb
index 9df2af1525d..2a7be5fb57a 100644
--- a/instat/dlgThreeVariableFrequencies.vb
+++ b/instat/dlgThreeVariableFrequencies.vb
@@ -47,6 +47,8 @@ Public Class dlgThreeVariableFrequencies
Private Sub InitialiseDialog()
ucrBase.iHelpTopicID = 415
+ ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False
+
ucrChkWeights.Enabled = False ' temporary because of bug in R functions being used
ucrSelectorThreeVariableFrequencies.SetParameter(New RParameter("data", 0))
@@ -122,6 +124,8 @@ Public Class dlgThreeVariableFrequencies
ucrPnlFrequencyDisplay.AddParameterPresentCondition(rdoTable, "sjtab")
ucrPnlFrequencyDisplay.AddParameterPresentCondition(rdoGraph, "sjplot")
'TODO have conditions on multiple functions for both option
+ 'and also requires multiple output support. So for now diesable
+ rdoBoth.Enabled = False
ucrPnlFrequencyDisplay.AddToLinkedControls(ucrChkCount, {rdoTable, rdoBoth}, bNewLinkedHideIfParameterMissing:=True)
ucrPnlFrequencyDisplay.AddToLinkedControls(ucrSaveGraph, {rdoGraph, rdoBoth}, bNewLinkedHideIfParameterMissing:=True)
@@ -172,12 +176,18 @@ Public Class dlgThreeVariableFrequencies
clsTableBaseOperator.AddParameter("select", clsRFunctionParameter:=clsSelectFunction, iPosition:=2)
clsTableBaseOperator.AddParameter("arrange", clsRFunctionParameter:=clsArrangeFunction, iPosition:=3)
clsTableBaseOperator.AddParameter("sjtab", clsRFunctionParameter:=clsSjTabFunction, iPosition:=4)
+ clsTableBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table,
+ strRObjectFormatToAssignTo:=RObjectFormat.Html,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorThreeVariableFrequencies.strCurrentDataFrame,
+ strObjectName:="last_table")
clsGraphBaseOperator.SetOperation("%>%")
+ 'iPosition should follow in the folowing order for this operator
clsGraphBaseOperator.AddParameter("group_by", clsRFunctionParameter:=clsGroupByFunction, iPosition:=1)
clsGraphBaseOperator.AddParameter("select", clsRFunctionParameter:=clsSelectFunction, iPosition:=2)
clsGraphBaseOperator.AddParameter("arrange", clsRFunctionParameter:=clsArrangeFunction, iPosition:=3)
- clsGraphBaseOperator.AddParameter("sjplot", clsRFunctionParameter:=clsSjPlotFunction, iPosition:=3)
+ clsGraphBaseOperator.AddParameter("sjplot", clsRFunctionParameter:=clsSjPlotFunction, iPosition:=4)
clsGroupByFunction.SetPackageName("dplyr")
clsGroupByFunction.SetRCommand("group_by")
@@ -200,10 +210,19 @@ Public Class dlgThreeVariableFrequencies
clsSjPlotFunction.AddParameter("show.n", "TRUE")
clsGridArrangeFunction.SetPackageName("gridExtra")
- clsGridArrangeFunction.SetRCommand("grid.arrange")
+ 'use arrangeGrob() instead of grid.arrange() because arrangeGrob() returns a grob without drawing on the current device.
+ 'read package ocumentation for more information
+ 'clsGridArrangeFunction.SetRCommand("grid.arrange") 'left here for future reference only
+ clsGridArrangeFunction.SetRCommand("arrangeGrob")
clsGridArrangeFunction.AddParameter("grobs", clsROperatorParameter:=clsGraphBaseOperator)
- clsGridArrangeFunction.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorThreeVariableFrequencies.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph")
+ clsGridArrangeFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorThreeVariableFrequencies.strCurrentDataFrame,
+ strObjectName:="last_graph")
+
+
ucrBase.clsRsyntax.SetBaseROperator(clsTableBaseOperator)
clsCurrBaseCode = clsTableBaseOperator
bResetSubdialog = True
@@ -282,18 +301,17 @@ Public Class dlgThreeVariableFrequencies
End If
End Sub
- Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk
- Dim strGraph As String
- Dim strTempScript As String = ""
- 'Dim bIsAssigned As Boolean
- 'Dim bToBeAssigned As Boolean
- 'Dim strAssignTo As String
+ 'todo. Both option disabled
+ 'Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk
+ ' Dim strGraph As String
+ ' Dim strTempScript As String = ""
- If rdoBoth.Checked Then
- strGraph = clsGridArrangeFunction.ToScript(strTempScript)
- frmMain.clsRLink.RunScript(strTempScript & strGraph, iCallType:=3)
- End If
- End Sub
+
+ ' If rdoBoth.Checked Then
+ ' strGraph = clsGridArrangeFunction.ToScript(strTempScript)
+ ' frmMain.clsRLink.RunScript(strTempScript & strGraph, iCallType:=3)
+ ' End If
+ 'End Sub
Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click
sdgTwoWayFrequencies.SetRCode(clsSjTabFunction, clsSjPlotFunction, clsGraphBaseOperator, bResetSubdialog, bNewUseTitle:=False)
diff --git a/instat/dlgThreeVariablesModelling.vb b/instat/dlgThreeVariablesModelling.vb
index 8f0c8e9c686..9594ed22d51 100644
--- a/instat/dlgThreeVariablesModelling.vb
+++ b/instat/dlgThreeVariablesModelling.vb
@@ -148,11 +148,23 @@ Public Class dlgThreeVariableModelling
clsLM = clsRegressionDefaults.clsDefaultLmFunction.Clone()
clsLM.AddParameter("formula", clsROperatorParameter:=clsFormulaOperator, iPosition:=0)
clsLM.AddParameter("na.action", "na.exclude", iPosition:=4)
+ clsLM.bExcludeAssignedFunctionOutput = False
+ clsLM.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorThreeVariableModelling.strCurrentDataFrame,
+ strObjectName:="last_model")
clsGLM = clsRegressionDefaults.clsDefaultGlmFunction.Clone()
clsGLM.AddParameter("formula", clsROperatorParameter:=clsFormulaOperator, iPosition:=0)
clsGLM.AddParameter("na.action", "na.exclude", iPosition:=4)
+ clsGLM.bExcludeAssignedFunctionOutput = False
+ clsGLM.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorThreeVariableModelling.strCurrentDataFrame,
+ strObjectName:="last_model")
clsFamilyFunction = ucrDistributionChoice.clsCurrRFunction
@@ -169,22 +181,21 @@ Public Class dlgThreeVariableModelling
'Residual Plots
dctPlotFunctions = New Dictionary(Of String, RFunction)(clsRegressionDefaults.dctModelPlotFunctions)
-
'Model
clsFormulaFunction = clsRegressionDefaults.clsDefaultFormulaFunction.Clone
- clsFormulaFunction.iCallType = 2
+ clsFormulaFunction.bExcludeAssignedFunctionOutput = False
'Summary
clsSummaryFunction = clsRegressionDefaults.clsDefaultSummary.Clone
- clsSummaryFunction.iCallType = 2
+ clsSummaryFunction.bExcludeAssignedFunctionOutput = False
'ANOVA
clsAnovaFunction = clsRegressionDefaults.clsDefaultAnovaFunction.Clone
- clsAnovaFunction.iCallType = 2
+ clsAnovaFunction.bExcludeAssignedFunctionOutput = False
'Confidence Interval
clsConfint = clsRegressionDefaults.clsDefaultConfint.Clone
- clsConfint.iCallType = 2
+ clsConfint.bExcludeAssignedFunctionOutput = False
'FitModel
clsVisReg.SetPackageName("visreg")
@@ -192,7 +203,6 @@ Public Class dlgThreeVariableModelling
clsVisReg.AddParameter("type", Chr(34) & "conditional" & Chr(34))
'changed gg parameter to FALSE since when TRUE no plot is given (not compatible with ggplot2 package)
clsVisReg.AddParameter("gg", "FALSE")
- clsVisReg.iCallType = 3
clsVisReg.bExcludeAssignedFunctionOutput = False
clsResidualFunction.SetRCommand("residuals")
@@ -200,14 +210,10 @@ Public Class dlgThreeVariableModelling
clsRstandardFunction.SetRCommand("rstandard")
clsHatvaluesFunction.SetRCommand("hatvalues")
- clsLM.SetAssignTo(ucrSaveModel.GetText, strTempDataframe:=ucrSelectorThreeVariableModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:=ucrSaveModel.GetText, bAssignToIsPrefix:=True)
- clsGLM.SetAssignTo(ucrSaveModel.GetText, strTempDataframe:=ucrSelectorThreeVariableModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:=ucrSaveModel.GetText, bAssignToIsPrefix:=True)
+ clsLMOrGLM = clsLM
ucrBase.clsRsyntax.SetBaseRFunction(clsLM)
-
ucrBase.clsRsyntax.AddToAfterCodes(clsAnovaFunction, 1)
ucrBase.clsRsyntax.AddToAfterCodes(clsSummaryFunction, 2)
- clsLMOrGLM = clsLM
-
bResetModelOptions = True
bResetDisplayOptions = True
@@ -215,6 +221,77 @@ Public Class dlgThreeVariableModelling
bResetSecondFunction = True
End Sub
+ Private Sub assignToControlsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlValueChanged
+
+ '---------------------------------------------------------------------
+ 'model summaries outputs
+
+ 'stats output formula for the model
+ clsFormulaFunction.AddParameter("x", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsFormulaFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorThreeVariableModelling.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ 'anova output summary for the model
+ clsAnovaFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsAnovaFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorThreeVariableModelling.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ 'estimates output for the model
+ clsSummaryFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsSummaryFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorThreeVariableModelling.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+
+ 'confidence output limits for the model
+ clsConfint.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsConfint.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorThreeVariableModelling.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ '---------------------------------------------------------------------
+ 'column outputs
+ 'note set assign has not been set here because it's done at the sub dialog level
+ 'through individual save controls linked to this dialog data frame selector
+
+ clsResidualFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsFittedValuesFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsRstandardFunction.AddParameter("model", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsHatvaluesFunction.AddParameter("model", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+
+ '---------------------------------------------------------------------
+ 'graphical outputs
+
+ 'model plot output
+ clsVisReg.AddParameter("fit", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsVisReg.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorThreeVariableModelling.strCurrentDataFrame,
+ strObjectName:="last_graph")
+
+ 'residual plots outputs
+ For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
+ kvp.Value.AddParameter("x", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ kvp.Value.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorThreeVariableModelling.strCurrentDataFrame,
+ strObjectName:="last_graph")
+ Next
+
+ End Sub
+
Private Sub SetRCodeForControls(bReset As Object)
bRCodeSet = False
@@ -307,7 +384,6 @@ Public Class dlgThreeVariableModelling
Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) Handles cmdDisplayOptions.Click
sdgSimpleRegOptions.SetRCode(clsNewRSyntax:=ucrBase.clsRsyntax, clsNewFormulaFunction:=clsFormulaFunction, clsNewAnovaFunction:=clsAnovaFunction, clsNewRSummaryFunction:=clsSummaryFunction, clsNewConfint:=clsConfint, clsNewVisReg:=clsVisReg, dctNewPlot:=dctPlotFunctions, clsNewResidualFunction:=clsResidualFunction, clsNewFittedValuesFunction:=clsFittedValuesFunction, clsNewRstandardFunction:=clsRstandardFunction, clsNewHatvaluesFunction:=clsHatvaluesFunction, ucrNewAvailableDatafrane:=ucrSelectorThreeVariableModelling.ucrAvailableDataFrames, bReset:=bResetDisplayOptions)
sdgSimpleRegOptions.ShowDialog()
- GraphAssignTo()
bResetDisplayOptions = False
End Sub
@@ -323,22 +399,6 @@ Public Class dlgThreeVariableModelling
Else
clsLMOrGLM = clsGLM
End If
-
- 'Update display functions to contain correct model
- clsFormulaFunction.AddParameter("x", clsRFunctionParameter:=clsLMOrGLM)
- clsAnovaFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsSummaryFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsConfint.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsVisReg.AddParameter("fit", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
-
- For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
- kvp.Value.AddParameter("x", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- Next
-
- clsResidualFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsFittedValuesFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsRstandardFunction.AddParameter("model", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsHatvaluesFunction.AddParameter("model", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
ucrBase.clsRsyntax.SetBaseRFunction(clsLMOrGLM)
End If
End Sub
@@ -431,20 +491,7 @@ Public Class dlgThreeVariableModelling
Private Sub ucrSelectorThreeVariableModelling_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorThreeVariableModelling.ControlValueChanged
SetBaseFunction()
- GraphAssignTo()
End Sub
- Private Sub GraphAssignTo()
- 'temp fix for graph display problem with RDotNet
- clsVisReg.SetAssignTo("last_visreg", strTempDataframe:=ucrSelectorThreeVariableModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_visreg")
- 'Dim lstPlotNames As New List(Of String)
- 'Dim i As Integer = 0
- 'lstPlotNames = New List(Of String)({"last_residplot", "last_qqplot", "last_scaleloc", "last_cooksdist", "last_residlev", "last_cookslev"})
-
- 'For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
- ' kvp.Value.SetAssignTo(lstPlotNames(index:=i), strTempDataframe:=ucrSelectorThreeVariableModelling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:=lstPlotNames(index:=i))
- ' i = i + 1
- 'Next
- End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgTwoVariableFitModel.vb b/instat/dlgTwoVariableFitModel.vb
index 37d26b0467b..029f31c2e1d 100644
--- a/instat/dlgTwoVariableFitModel.vb
+++ b/instat/dlgTwoVariableFitModel.vb
@@ -53,7 +53,7 @@ Public Class dlgTwoVariableFitModel
Private clsRstandardFunction, clsHatvaluesFunction, clsResidualFunction, clsFittedValuesFunction As New RFunction
'Display options codes
- Public clsFormulaFunction, clsAnovaFunction, clsSummaryFunction, clsConfint As RFunction
+ Public clsFormulaFunction, clsAnovaFunction, clsSummaryFunction, clsConfint As New RFunction
Private bRCodeSet As Boolean
Private bReset As Boolean = True
@@ -239,10 +239,20 @@ Public Class dlgTwoVariableFitModel
clsLM = clsRegressionDefaults.clsDefaultLmFunction.Clone
clsLM.AddParameter("formula", clsROperatorParameter:=clsFormulaOperator, iPosition:=1)
clsLM.AddParameter("na.action", "na.exclude", iPosition:=4)
+ clsLM.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorSimpleReg.strCurrentDataFrame,
+ strObjectName:="last_model")
clsGLM = clsRegressionDefaults.clsDefaultGlmFunction.Clone
clsGLM.AddParameter("formula", clsROperatorParameter:=clsFormulaOperator, iPosition:=1)
clsGLM.AddParameter("na.action", "na.exclude", iPosition:=4)
+ clsGLM.SetAssignToOutputObject(strRObjectToAssignTo:="last_model",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Model,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorSimpleReg.strCurrentDataFrame,
+ strObjectName:="last_model")
clsPolynomialFunc.SetRCommand("poly")
@@ -254,40 +264,33 @@ Public Class dlgTwoVariableFitModel
clsVisReg.SetRCommand("visreg")
clsVisReg.AddParameter("type", Chr(34) & "conditional" & Chr(34))
clsVisReg.AddParameter("gg", "TRUE")
- clsVisReg.iCallType = 3
clsVisReg.bExcludeAssignedFunctionOutput = False
- 'Model
clsFormulaFunction = clsRegressionDefaults.clsDefaultFormulaFunction.Clone
- clsFormulaFunction.iCallType = 2
'Summary
clsSummaryFunction = clsRegressionDefaults.clsDefaultSummary.Clone
- clsSummaryFunction.iCallType = 2
+ clsSummaryFunction.bExcludeAssignedFunctionOutput = False
'ANOVA
clsAnovaFunction = clsRegressionDefaults.clsDefaultAnovaFunction.Clone
- clsAnovaFunction.iCallType = 2
+ clsAnovaFunction.bExcludeAssignedFunctionOutput = False
'Confidence Interval
clsConfint = clsRegressionDefaults.clsDefaultConfint.Clone
- clsConfint.iCallType = 2
+ clsConfint.bExcludeAssignedFunctionOutput = False
clsAsNumeric.SetRCommand("as.numeric")
clsFamilyFunction = ucrDistributionChoice.clsCurrRFunction
clsGLM.AddParameter("family", clsRFunctionParameter:=clsFamilyFunction)
- clsLM.SetAssignTo(strTemp:=ucrSaveModels.GetText, strTempDataframe:=ucrSelectorSimpleReg.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model", bAssignToIsPrefix:=True)
- clsGLM.SetAssignTo(strTemp:=ucrSaveModels.GetText, strTempDataframe:=ucrSelectorSimpleReg.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model", bAssignToIsPrefix:=True)
+
clsLMOrGLM = clsLM
clsResidualFunction.SetRCommand("residuals")
-
clsFittedValuesFunction.SetRCommand("fitted.values")
-
clsRstandardFunction.SetRCommand("rstandard")
-
clsHatvaluesFunction.SetRCommand("hatvalues")
'Broken stick
@@ -411,6 +414,77 @@ Public Class dlgTwoVariableFitModel
bResetFirstFunction = True
End Sub
+ Private Sub assignToControlsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModels.ControlValueChanged
+
+ '---------------------------------------------------------------------
+ 'model summaries outputs
+
+ 'stats output formula for the model
+ clsFormulaFunction.AddParameter("x", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsFormulaFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorSimpleReg.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ 'anova output summary for the model
+ clsAnovaFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsAnovaFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorSimpleReg.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ 'estimates output for the model
+ clsSummaryFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsSummaryFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorSimpleReg.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+
+ 'confidence output limits for the model
+ clsConfint.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsConfint.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary,
+ strRObjectFormatToAssignTo:=RObjectFormat.Text,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorSimpleReg.strCurrentDataFrame,
+ strObjectName:="last_summary")
+
+ '---------------------------------------------------------------------
+ 'column outputs
+ 'note set assign has not been set here because it's done at the sub dialog level
+ 'through individual save controls linked to this dialog data frame selector
+
+ clsResidualFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsFittedValuesFunction.AddParameter("object", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsRstandardFunction.AddParameter("model", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsHatvaluesFunction.AddParameter("model", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+
+ '---------------------------------------------------------------------
+ 'graphical outputs
+
+ 'model plot output
+ clsVisReg.AddParameter("fit", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ clsVisReg.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorSimpleReg.strCurrentDataFrame,
+ strObjectName:="last_graph")
+
+ 'residual plots outputs
+ For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
+ kvp.Value.AddParameter("x", strParameterValue:=clsLMOrGLM.GetRObjectToAssignTo(), iPosition:=0)
+ kvp.Value.SetAssignToOutputObject(strRObjectToAssignTo:="last_graph",
+ strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Graph,
+ strRObjectFormatToAssignTo:=RObjectFormat.Image,
+ strRDataFrameNameToAddObjectTo:=ucrSelectorSimpleReg.strCurrentDataFrame,
+ strObjectName:="last_graph")
+ Next
+
+ End Sub
+
Private Sub SetRCodeForControls(bReset)
bRCodeSet = False
ucrReceiverExplanatory.AddAdditionalCodeParameterPair(clsBrokenStickGeneralOperator, New RParameter("x", iNewPosition:=0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1)
@@ -545,7 +619,6 @@ Public Class dlgTwoVariableFitModel
Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) Handles cmdDisplayOptions.Click
sdgSimpleRegOptions.SetRCode(clsNewRSyntax:=ucrBase.clsRsyntax, clsNewFormulaFunction:=clsFormulaFunction, clsNewAnovaFunction:=clsAnovaFunction, clsNewRSummaryFunction:=clsSummaryFunction, clsNewConfint:=clsConfint, clsNewVisReg:=clsVisReg, dctNewPlot:=dctPlotFunctions, clsNewResidualFunction:=clsResidualFunction, clsNewFittedValuesFunction:=clsFittedValuesFunction, clsNewRstandardFunction:=clsRstandardFunction, clsNewHatvaluesFunction:=clsHatvaluesFunction, ucrNewAvailableDatafrane:=ucrSelectorSimpleReg.ucrAvailableDataFrames, bReset:=bResetOptionsSubDialog)
sdgSimpleRegOptions.ShowDialog()
- GraphAssignTo()
bResetOptionsSubDialog = False
End Sub
@@ -579,21 +652,6 @@ Public Class dlgTwoVariableFitModel
ucrBase.clsRsyntax.AddToAfterCodes(clsAnovaFunction, 1)
ucrBase.clsRsyntax.AddToAfterCodes(clsSummaryFunction, 2)
ucrBase.clsRsyntax.SetBaseRFunction(clsLMOrGLM)
- 'Update display functions to contain correct model
- clsFormulaFunction.AddParameter("x", clsRFunctionParameter:=clsLMOrGLM)
- clsAnovaFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM)
- clsSummaryFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM)
- clsConfint.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM)
- clsVisReg.AddParameter("fit", clsRFunctionParameter:=clsLMOrGLM)
-
- For Each kvp As KeyValuePair(Of String, RFunction) In dctPlotFunctions
- kvp.Value.AddParameter("x", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- Next
-
- clsResidualFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsFittedValuesFunction.AddParameter("object", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsRstandardFunction.AddParameter("model", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
- clsHatvaluesFunction.AddParameter("model", clsRFunctionParameter:=clsLMOrGLM, iPosition:=0)
ElseIf rdoTest.Checked Then
ucrBase.clsRsyntax.RemoveFromAfterCodes(clsAnovaFunction)
ucrBase.clsRsyntax.RemoveFromAfterCodes(clsSummaryFunction)
@@ -711,15 +769,6 @@ Public Class dlgTwoVariableFitModel
ReceiverColumnType()
End Sub
- Private Sub ucrSelectorSimpleReg_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorSimpleReg.ControlValueChanged
- GraphAssignTo()
- End Sub
-
- 'temp fix for graph display problem with RDotNet
- 'correct solution is to have save controls linked to each graph
- Private Sub GraphAssignTo()
- clsVisReg.SetAssignTo("last_visreg", strTempDataframe:=ucrSelectorSimpleReg.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_visreg")
- End Sub
Private Sub ucrReceiverExplanatory_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverExplanatory.ControlValueChanged
If bRCodeSet Then
diff --git a/instat/dlgTwoWayFrequencies.vb b/instat/dlgTwoWayFrequencies.vb
index f4cfee0920b..393d5460d2b 100644
--- a/instat/dlgTwoWayFrequencies.vb
+++ b/instat/dlgTwoWayFrequencies.vb
@@ -48,8 +48,9 @@ Public Class dlgTwoWayFrequencies
End Sub
Private Sub InitialiseDialog()
- 'HelpID
ucrBase.iHelpTopicID = 415
+ ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False
+
ucrReceiverColumnFactor.Selector = ucrSelectorTwoWayFrequencies
ucrReceiverRowFactor.Selector = ucrSelectorTwoWayFrequencies
ucrReceiverWeights.Selector = ucrSelectorTwoWayFrequencies
@@ -131,6 +132,8 @@ Public Class dlgTwoWayFrequencies
ucrPnlFreqDisplay.AddFunctionNamesCondition(rdoTable, "sjtab")
ucrPnlFreqDisplay.AddFunctionNamesCondition(rdoGraph, "sjplot")
'TODO conditions for both requires checks on multiple functions
+ 'and also requires multiple output support. So for now diesable
+ rdoBoth.Enabled = False
'Setting Display of the group boxes in the dialog
ucrPnlFreqDisplay.AddToLinkedControls(ucrChkCount, {rdoTable, rdoBoth}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
@@ -170,6 +173,13 @@ Public Class dlgTwoWayFrequencies
clsSjTab.AddParameter("title", Chr(34) & "" & Chr(34))
clsSjTab.AddParameter("string.total", Chr(34) & "Total" & Chr(34))
+ clsSjTab.SetAssignToOutputObject("last_table",
+ RObjectTypeLabel.Table,
+ RObjectFormat.Html,
+ ucrSelectorTwoWayFrequencies.strCurrentDataFrame,
+ "last_table")
+
+
'Defining Plot functions and default functions
clsSjPlot.SetPackageName("sjPlot")
clsSjPlot.SetRCommand("sjplot")
@@ -178,7 +188,12 @@ Public Class dlgTwoWayFrequencies
clsSjPlot.AddParameter("show.n", "TRUE")
clsSjPlot.AddParameter("title", Chr(34) & "" & Chr(34))
clsSjPlot.AddParameter("facet.grid", "TRUE")
- clsSjPlot.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorTwoWayFrequencies.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph")
+ clsSjPlot.SetAssignToOutputObject("last_graph",
+ RObjectTypeLabel.Graph,
+ RObjectFormat.Image,
+ ucrSelectorTwoWayFrequencies.strCurrentDataFrame,
+ "last_graph")
+
ucrBase.clsRsyntax.SetBaseRFunction(clsSjTab)
bResetSubdialog = True
End Sub
diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb
index 5bc30dcd43d..11067afaf85 100644
--- a/instat/frmMain.Designer.vb
+++ b/instat/frmMain.Designer.vb
@@ -49,29 +49,28 @@ Partial Class frmMain
Me.mnuDescribeOneVariableFrequencies = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeOneVariableRatingData = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeTwoThreeVariables = New System.Windows.Forms.ToolStripMenuItem()
+ Me.mnuDescribeTwoThreeVariablesPivotTable = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ToolStripSeparator36 = New System.Windows.Forms.ToolStripSeparator()
Me.mnuDescribeTwoVariablesSummarise = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeTwoVariablesGraph = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator34 = New System.Windows.Forms.ToolStripSeparator()
Me.mnuDescribeTwoThreeVariablesCorrelations = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeTwoThreeVariablesTwoWayFrequencies = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeTwoThreeVariablesThreeWayFrequencies = New System.Windows.Forms.ToolStripMenuItem()
- Me.ToolStripSeparator36 = New System.Windows.Forms.ToolStripSeparator()
- Me.mnuDescribeTwoThreeVariablesPivotTable = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeSpecificTablesGraphs = New System.Windows.Forms.ToolStripMenuItem()
- Me.mnuDescribeSpecificSummary = New System.Windows.Forms.ToolStripMenuItem()
- Me.mnuDescribeSpecificMultipleResponse = New System.Windows.Forms.ToolStripMenuItem()
- Me.ToolStripSeparator26 = New System.Windows.Forms.ToolStripSeparator()
Me.mnuDescribeSpecificBarPieChart = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeSpecificBoxplotJitterViolinPlot = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeSpecificHistogramDensityFrequencyPlot = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeSpecificPointPlot = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeSpecificLineSmoothPlot = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ToolStripSeparator26 = New System.Windows.Forms.ToolStripSeparator()
Me.mnuDescribeSpecificMapPlot = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeSpecificDotPlot = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator27 = New System.Windows.Forms.ToolStripSeparator()
Me.mnuDescribeSpecificMosaic = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeSpecificCummulativeDistribution = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeSpecificParallelCoordinatePlot = New System.Windows.Forms.ToolStripMenuItem()
+ Me.mnuDescribeSpecificTables = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeGeneral = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeGeneralColumnSummaries = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuDescribeGeneralTabulation = New System.Windows.Forms.ToolStripMenuItem()
@@ -653,6 +652,7 @@ Partial Class frmMain
Me.mnuOptionsByContextModelFitModel = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuOptionsByContextGeneralFitModel = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuOptionsByContextCropModel = New System.Windows.Forms.ToolStripMenuItem()
+ Me.mnuOptionsByContextCropModelApsimxExamples = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuTools = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuToolsRunRCode = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuToolsRestartR = New System.Windows.Forms.ToolStripMenuItem()
@@ -680,7 +680,6 @@ Partial Class frmMain
Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem()
- Me.mnuOptionsByContextCropModelApsimxExamples = New System.Windows.Forms.ToolStripMenuItem()
Me.stsStrip.SuspendLayout()
Me.Tool_strip.SuspendLayout()
Me.mnuBar.SuspendLayout()
@@ -708,7 +707,7 @@ Partial Class frmMain
'
'mnuDescribe
'
- Me.mnuDescribe.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDescribeOneVariable, Me.mnuDescribeTwoThreeVariables, Me.mnuDescribeSpecificTablesGraphs, Me.mnuDescribeGeneral, Me.ToolStripSeparator9, Me.mnuDescribeMultivariate, Me.ToolStripSeparator13, Me.mnuDescribeUseGraph, Me.mnuDescribeCombineGraph, Me.mnuDescribeThemes, Me.mnuDescribeViewGraph})
+ Me.mnuDescribe.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDescribeOneVariable, Me.mnuDescribeTwoThreeVariables, Me.mnuDescribeSpecificTablesGraphs, Me.mnuDescribeSpecificTables, Me.mnuDescribeGeneral, Me.ToolStripSeparator9, Me.mnuDescribeMultivariate, Me.ToolStripSeparator13, Me.mnuDescribeUseGraph, Me.mnuDescribeCombineGraph, Me.mnuDescribeThemes, Me.mnuDescribeViewGraph})
Me.mnuDescribe.Name = "mnuDescribe"
Me.mnuDescribe.Size = New System.Drawing.Size(64, 22)
Me.mnuDescribe.Tag = "Describe"
@@ -718,7 +717,7 @@ Partial Class frmMain
'
Me.mnuDescribeOneVariable.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDescribeOneVariableVisualiseData, Me.ToolStripSeparator72, Me.mnuDescribeOneVariableSummarise, Me.mnuDescribeOneVariableGraph, Me.ToolStripSeparator33, Me.mnuDescribeOneVariableFrequencies, Me.mnuDescribeOneVariableRatingData})
Me.mnuDescribeOneVariable.Name = "mnuDescribeOneVariable"
- Me.mnuDescribeOneVariable.Size = New System.Drawing.Size(192, 22)
+ Me.mnuDescribeOneVariable.Size = New System.Drawing.Size(180, 22)
Me.mnuDescribeOneVariable.Tag = "One_Variable"
Me.mnuDescribeOneVariable.Text = "One Variable"
'
@@ -766,12 +765,23 @@ Partial Class frmMain
'
'mnuDescribeTwoThreeVariables
'
- Me.mnuDescribeTwoThreeVariables.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDescribeTwoVariablesSummarise, Me.mnuDescribeTwoVariablesGraph, Me.ToolStripSeparator34, Me.mnuDescribeTwoThreeVariablesCorrelations, Me.mnuDescribeTwoThreeVariablesTwoWayFrequencies, Me.mnuDescribeTwoThreeVariablesThreeWayFrequencies, Me.ToolStripSeparator36, Me.mnuDescribeTwoThreeVariablesPivotTable})
+ Me.mnuDescribeTwoThreeVariables.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDescribeTwoThreeVariablesPivotTable, Me.ToolStripSeparator36, Me.mnuDescribeTwoVariablesSummarise, Me.mnuDescribeTwoVariablesGraph, Me.ToolStripSeparator34, Me.mnuDescribeTwoThreeVariablesCorrelations, Me.mnuDescribeTwoThreeVariablesTwoWayFrequencies, Me.mnuDescribeTwoThreeVariablesThreeWayFrequencies})
Me.mnuDescribeTwoThreeVariables.Name = "mnuDescribeTwoThreeVariables"
- Me.mnuDescribeTwoThreeVariables.Size = New System.Drawing.Size(192, 22)
+ Me.mnuDescribeTwoThreeVariables.Size = New System.Drawing.Size(180, 22)
Me.mnuDescribeTwoThreeVariables.Tag = "Two_Variables"
Me.mnuDescribeTwoThreeVariables.Text = "Two/Three Variables"
'
+ 'mnuDescribeTwoThreeVariablesPivotTable
+ '
+ Me.mnuDescribeTwoThreeVariablesPivotTable.Name = "mnuDescribeTwoThreeVariablesPivotTable"
+ Me.mnuDescribeTwoThreeVariablesPivotTable.Size = New System.Drawing.Size(206, 22)
+ Me.mnuDescribeTwoThreeVariablesPivotTable.Text = "Pivot Table..."
+ '
+ 'ToolStripSeparator36
+ '
+ Me.ToolStripSeparator36.Name = "ToolStripSeparator36"
+ Me.ToolStripSeparator36.Size = New System.Drawing.Size(203, 6)
+ '
'mnuDescribeTwoVariablesSummarise
'
Me.mnuDescribeTwoVariablesSummarise.DoubleClickEnabled = True
@@ -811,92 +821,65 @@ Partial Class frmMain
Me.mnuDescribeTwoThreeVariablesThreeWayFrequencies.Size = New System.Drawing.Size(206, 22)
Me.mnuDescribeTwoThreeVariablesThreeWayFrequencies.Text = "Three-Way Frequencies..."
'
- 'ToolStripSeparator36
- '
- Me.ToolStripSeparator36.Name = "ToolStripSeparator36"
- Me.ToolStripSeparator36.Size = New System.Drawing.Size(203, 6)
- '
- 'mnuDescribeTwoThreeVariablesPivotTable
- '
- Me.mnuDescribeTwoThreeVariablesPivotTable.Name = "mnuDescribeTwoThreeVariablesPivotTable"
- Me.mnuDescribeTwoThreeVariablesPivotTable.Size = New System.Drawing.Size(206, 22)
- Me.mnuDescribeTwoThreeVariablesPivotTable.Text = "Pivot Table..."
- '
'mnuDescribeSpecificTablesGraphs
'
- Me.mnuDescribeSpecificTablesGraphs.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDescribeSpecificSummary, Me.mnuDescribeSpecificMultipleResponse, Me.ToolStripSeparator26, Me.mnuDescribeSpecificBarPieChart, Me.mnuDescribeSpecificBoxplotJitterViolinPlot, Me.mnuDescribeSpecificHistogramDensityFrequencyPlot, Me.mnuDescribeSpecificPointPlot, Me.mnuDescribeSpecificLineSmoothPlot, Me.mnuDescribeSpecificMapPlot, Me.mnuDescribeSpecificDotPlot, Me.ToolStripSeparator27, Me.mnuDescribeSpecificMosaic, Me.mnuDescribeSpecificCummulativeDistribution, Me.mnuDescribeSpecificParallelCoordinatePlot})
+ Me.mnuDescribeSpecificTablesGraphs.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDescribeSpecificBarPieChart, Me.mnuDescribeSpecificBoxplotJitterViolinPlot, Me.mnuDescribeSpecificHistogramDensityFrequencyPlot, Me.mnuDescribeSpecificPointPlot, Me.mnuDescribeSpecificLineSmoothPlot, Me.ToolStripSeparator26, Me.mnuDescribeSpecificMapPlot, Me.mnuDescribeSpecificDotPlot, Me.ToolStripSeparator27, Me.mnuDescribeSpecificMosaic, Me.mnuDescribeSpecificCummulativeDistribution, Me.mnuDescribeSpecificParallelCoordinatePlot})
Me.mnuDescribeSpecificTablesGraphs.Name = "mnuDescribeSpecificTablesGraphs"
- Me.mnuDescribeSpecificTablesGraphs.Size = New System.Drawing.Size(192, 22)
- Me.mnuDescribeSpecificTablesGraphs.Tag = "Table_Dialogs"
- Me.mnuDescribeSpecificTablesGraphs.Text = "Specific Tables/Graphs"
- '
- 'mnuDescribeSpecificSummary
- '
- Me.mnuDescribeSpecificSummary.Name = "mnuDescribeSpecificSummary"
- Me.mnuDescribeSpecificSummary.Size = New System.Drawing.Size(299, 22)
- Me.mnuDescribeSpecificSummary.Tag = "Summary..."
- Me.mnuDescribeSpecificSummary.Text = "Frequency/Summary Tables..."
- '
- 'mnuDescribeSpecificMultipleResponse
- '
- Me.mnuDescribeSpecificMultipleResponse.Enabled = False
- Me.mnuDescribeSpecificMultipleResponse.Name = "mnuDescribeSpecificMultipleResponse"
- Me.mnuDescribeSpecificMultipleResponse.Size = New System.Drawing.Size(299, 22)
- Me.mnuDescribeSpecificMultipleResponse.Tag = "Multiple_Response..."
- Me.mnuDescribeSpecificMultipleResponse.Text = "Multiple Response..."
- Me.mnuDescribeSpecificMultipleResponse.Visible = False
- '
- 'ToolStripSeparator26
- '
- Me.ToolStripSeparator26.Name = "ToolStripSeparator26"
- Me.ToolStripSeparator26.Size = New System.Drawing.Size(296, 6)
+ Me.mnuDescribeSpecificTablesGraphs.Size = New System.Drawing.Size(180, 22)
+ Me.mnuDescribeSpecificTablesGraphs.Tag = "Graph_Dialogs"
+ Me.mnuDescribeSpecificTablesGraphs.Text = "Graphs"
'
'mnuDescribeSpecificBarPieChart
'
Me.mnuDescribeSpecificBarPieChart.Name = "mnuDescribeSpecificBarPieChart"
- Me.mnuDescribeSpecificBarPieChart.Size = New System.Drawing.Size(299, 22)
+ Me.mnuDescribeSpecificBarPieChart.Size = New System.Drawing.Size(209, 22)
Me.mnuDescribeSpecificBarPieChart.Tag = "Bar_Chart"
Me.mnuDescribeSpecificBarPieChart.Text = "Bar Chart..."
'
'mnuDescribeSpecificBoxplotJitterViolinPlot
'
Me.mnuDescribeSpecificBoxplotJitterViolinPlot.Name = "mnuDescribeSpecificBoxplotJitterViolinPlot"
- Me.mnuDescribeSpecificBoxplotJitterViolinPlot.Size = New System.Drawing.Size(299, 22)
+ Me.mnuDescribeSpecificBoxplotJitterViolinPlot.Size = New System.Drawing.Size(209, 22)
Me.mnuDescribeSpecificBoxplotJitterViolinPlot.Tag = "Boxplot..."
- Me.mnuDescribeSpecificBoxplotJitterViolinPlot.Text = "Boxplot/Jitter/Violin Plot..."
+ Me.mnuDescribeSpecificBoxplotJitterViolinPlot.Text = "Boxplot..."
'
'mnuDescribeSpecificHistogramDensityFrequencyPlot
'
Me.mnuDescribeSpecificHistogramDensityFrequencyPlot.Name = "mnuDescribeSpecificHistogramDensityFrequencyPlot"
- Me.mnuDescribeSpecificHistogramDensityFrequencyPlot.Size = New System.Drawing.Size(299, 22)
+ Me.mnuDescribeSpecificHistogramDensityFrequencyPlot.Size = New System.Drawing.Size(209, 22)
Me.mnuDescribeSpecificHistogramDensityFrequencyPlot.Tag = "Histogram..."
- Me.mnuDescribeSpecificHistogramDensityFrequencyPlot.Text = "Histogram/Density/Frequency Plot..."
+ Me.mnuDescribeSpecificHistogramDensityFrequencyPlot.Text = "Histogram..."
'
'mnuDescribeSpecificPointPlot
'
Me.mnuDescribeSpecificPointPlot.Name = "mnuDescribeSpecificPointPlot"
- Me.mnuDescribeSpecificPointPlot.Size = New System.Drawing.Size(299, 22)
+ Me.mnuDescribeSpecificPointPlot.Size = New System.Drawing.Size(209, 22)
Me.mnuDescribeSpecificPointPlot.Tag = "Point_Plot..."
- Me.mnuDescribeSpecificPointPlot.Text = "Point (Scatter) Plot..."
+ Me.mnuDescribeSpecificPointPlot.Text = "Scatter Plot..."
'
'mnuDescribeSpecificLineSmoothPlot
'
Me.mnuDescribeSpecificLineSmoothPlot.Name = "mnuDescribeSpecificLineSmoothPlot"
- Me.mnuDescribeSpecificLineSmoothPlot.Size = New System.Drawing.Size(299, 22)
+ Me.mnuDescribeSpecificLineSmoothPlot.Size = New System.Drawing.Size(209, 22)
Me.mnuDescribeSpecificLineSmoothPlot.Tag = "Line_Plot..."
- Me.mnuDescribeSpecificLineSmoothPlot.Text = "Line/Smooth/Dumbbell/Slope Plot..."
+ Me.mnuDescribeSpecificLineSmoothPlot.Text = "Line Plot..."
+ '
+ 'ToolStripSeparator26
+ '
+ Me.ToolStripSeparator26.Name = "ToolStripSeparator26"
+ Me.ToolStripSeparator26.Size = New System.Drawing.Size(206, 6)
'
'mnuDescribeSpecificMapPlot
'
Me.mnuDescribeSpecificMapPlot.Name = "mnuDescribeSpecificMapPlot"
- Me.mnuDescribeSpecificMapPlot.Size = New System.Drawing.Size(299, 22)
- Me.mnuDescribeSpecificMapPlot.Text = "Map/Choropleth/Contour/Heatmap Plot..."
+ Me.mnuDescribeSpecificMapPlot.Size = New System.Drawing.Size(209, 22)
+ Me.mnuDescribeSpecificMapPlot.Text = "Heatmap..."
'
'mnuDescribeSpecificDotPlot
'
Me.mnuDescribeSpecificDotPlot.Enabled = False
Me.mnuDescribeSpecificDotPlot.Name = "mnuDescribeSpecificDotPlot"
- Me.mnuDescribeSpecificDotPlot.Size = New System.Drawing.Size(299, 22)
+ Me.mnuDescribeSpecificDotPlot.Size = New System.Drawing.Size(209, 22)
Me.mnuDescribeSpecificDotPlot.Tag = "Dotplot..."
Me.mnuDescribeSpecificDotPlot.Text = "Dot Plot..."
Me.mnuDescribeSpecificDotPlot.Visible = False
@@ -904,31 +887,38 @@ Partial Class frmMain
'ToolStripSeparator27
'
Me.ToolStripSeparator27.Name = "ToolStripSeparator27"
- Me.ToolStripSeparator27.Size = New System.Drawing.Size(296, 6)
+ Me.ToolStripSeparator27.Size = New System.Drawing.Size(206, 6)
'
'mnuDescribeSpecificMosaic
'
Me.mnuDescribeSpecificMosaic.Name = "mnuDescribeSpecificMosaic"
- Me.mnuDescribeSpecificMosaic.Size = New System.Drawing.Size(299, 22)
+ Me.mnuDescribeSpecificMosaic.Size = New System.Drawing.Size(209, 22)
Me.mnuDescribeSpecificMosaic.Text = "Mosaic Plot..."
'
'mnuDescribeSpecificCummulativeDistribution
'
Me.mnuDescribeSpecificCummulativeDistribution.Name = "mnuDescribeSpecificCummulativeDistribution"
- Me.mnuDescribeSpecificCummulativeDistribution.Size = New System.Drawing.Size(299, 22)
+ Me.mnuDescribeSpecificCummulativeDistribution.Size = New System.Drawing.Size(209, 22)
Me.mnuDescribeSpecificCummulativeDistribution.Text = "Cumulative Distribution..."
'
'mnuDescribeSpecificParallelCoordinatePlot
'
Me.mnuDescribeSpecificParallelCoordinatePlot.Name = "mnuDescribeSpecificParallelCoordinatePlot"
- Me.mnuDescribeSpecificParallelCoordinatePlot.Size = New System.Drawing.Size(299, 22)
+ Me.mnuDescribeSpecificParallelCoordinatePlot.Size = New System.Drawing.Size(209, 22)
Me.mnuDescribeSpecificParallelCoordinatePlot.Text = "Parallel Coordinate Plot..."
'
+ 'mnuDescribeSpecificTables
+ '
+ Me.mnuDescribeSpecificTables.Name = "mnuDescribeSpecificTables"
+ Me.mnuDescribeSpecificTables.Size = New System.Drawing.Size(180, 22)
+ Me.mnuDescribeSpecificTables.Tag = "Table_Dialogs"
+ Me.mnuDescribeSpecificTables.Text = "Tables..."
+ '
'mnuDescribeGeneral
'
Me.mnuDescribeGeneral.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDescribeGeneralColumnSummaries, Me.mnuDescribeGeneralTabulation, Me.mnuDescribeGeneralGraphics, Me.ToolStripSeparator38, Me.mnuDescribeGeneralUseSummaries})
Me.mnuDescribeGeneral.Name = "mnuDescribeGeneral"
- Me.mnuDescribeGeneral.Size = New System.Drawing.Size(192, 22)
+ Me.mnuDescribeGeneral.Size = New System.Drawing.Size(180, 22)
Me.mnuDescribeGeneral.Tag = "General"
Me.mnuDescribeGeneral.Text = "General"
'
@@ -969,13 +959,13 @@ Partial Class frmMain
'ToolStripSeparator9
'
Me.ToolStripSeparator9.Name = "ToolStripSeparator9"
- Me.ToolStripSeparator9.Size = New System.Drawing.Size(189, 6)
+ Me.ToolStripSeparator9.Size = New System.Drawing.Size(177, 6)
'
'mnuDescribeMultivariate
'
Me.mnuDescribeMultivariate.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDescribeMultivariateCorrelations, Me.mnuDescribeMultivariateprincipalComponents, Me.mnuDescribeMultivariateCanonicalCorrelations, Me.mnuDescribeMultivariateClusterAnalysis})
Me.mnuDescribeMultivariate.Name = "mnuDescribeMultivariate"
- Me.mnuDescribeMultivariate.Size = New System.Drawing.Size(192, 22)
+ Me.mnuDescribeMultivariate.Size = New System.Drawing.Size(180, 22)
Me.mnuDescribeMultivariate.Text = "Multivariate"
'
'mnuDescribeMultivariateCorrelations
@@ -1005,32 +995,32 @@ Partial Class frmMain
'ToolStripSeparator13
'
Me.ToolStripSeparator13.Name = "ToolStripSeparator13"
- Me.ToolStripSeparator13.Size = New System.Drawing.Size(189, 6)
+ Me.ToolStripSeparator13.Size = New System.Drawing.Size(177, 6)
'
'mnuDescribeUseGraph
'
Me.mnuDescribeUseGraph.Name = "mnuDescribeUseGraph"
- Me.mnuDescribeUseGraph.Size = New System.Drawing.Size(192, 22)
+ Me.mnuDescribeUseGraph.Size = New System.Drawing.Size(180, 22)
Me.mnuDescribeUseGraph.Text = "Use Graph..."
'
'mnuDescribeCombineGraph
'
Me.mnuDescribeCombineGraph.Name = "mnuDescribeCombineGraph"
- Me.mnuDescribeCombineGraph.Size = New System.Drawing.Size(192, 22)
+ Me.mnuDescribeCombineGraph.Size = New System.Drawing.Size(180, 22)
Me.mnuDescribeCombineGraph.Text = "Combine Graphs..."
'
'mnuDescribeThemes
'
Me.mnuDescribeThemes.Enabled = False
Me.mnuDescribeThemes.Name = "mnuDescribeThemes"
- Me.mnuDescribeThemes.Size = New System.Drawing.Size(192, 22)
+ Me.mnuDescribeThemes.Size = New System.Drawing.Size(180, 22)
Me.mnuDescribeThemes.Text = "Themes..."
Me.mnuDescribeThemes.Visible = False
'
'mnuDescribeViewGraph
'
Me.mnuDescribeViewGraph.Name = "mnuDescribeViewGraph"
- Me.mnuDescribeViewGraph.Size = New System.Drawing.Size(192, 22)
+ Me.mnuDescribeViewGraph.Size = New System.Drawing.Size(180, 22)
Me.mnuDescribeViewGraph.Text = "View Graph..."
'
'mnuModel
@@ -3130,19 +3120,19 @@ Partial Class frmMain
'mnuNormalViewer
'
Me.mnuNormalViewer.Name = "mnuNormalViewer"
- Me.mnuNormalViewer.Size = New System.Drawing.Size(180, 22)
+ Me.mnuNormalViewer.Size = New System.Drawing.Size(128, 22)
Me.mnuNormalViewer.Text = "Viewer..."
'
'mnuploty
'
Me.mnuploty.Name = "mnuploty"
- Me.mnuploty.Size = New System.Drawing.Size(180, 22)
+ Me.mnuploty.Size = New System.Drawing.Size(128, 22)
Me.mnuploty.Text = "Plotly..."
'
'mnuRViewer
'
Me.mnuRViewer.Name = "mnuRViewer"
- Me.mnuRViewer.Size = New System.Drawing.Size(180, 22)
+ Me.mnuRViewer.Size = New System.Drawing.Size(128, 22)
Me.mnuRViewer.Text = "R Viewer..."
'
'separator2
@@ -3858,35 +3848,35 @@ Partial Class frmMain
'mnuPrepareColumnTextFindReplace
'
Me.mnuPrepareColumnTextFindReplace.Name = "mnuPrepareColumnTextFindReplace"
- Me.mnuPrepareColumnTextFindReplace.Size = New System.Drawing.Size(180, 22)
+ Me.mnuPrepareColumnTextFindReplace.Size = New System.Drawing.Size(152, 22)
Me.mnuPrepareColumnTextFindReplace.Tag = "Find/Replace..."
Me.mnuPrepareColumnTextFindReplace.Text = "Find/Replace..."
'
'mnuPrepareColumnTextSearch
'
Me.mnuPrepareColumnTextSearch.Name = "mnuPrepareColumnTextSearch"
- Me.mnuPrepareColumnTextSearch.Size = New System.Drawing.Size(180, 22)
+ Me.mnuPrepareColumnTextSearch.Size = New System.Drawing.Size(152, 22)
Me.mnuPrepareColumnTextSearch.Text = "Search..."
Me.mnuPrepareColumnTextSearch.Visible = False
'
'mnuPrepareColumnTextTransform
'
Me.mnuPrepareColumnTextTransform.Name = "mnuPrepareColumnTextTransform"
- Me.mnuPrepareColumnTextTransform.Size = New System.Drawing.Size(180, 22)
+ Me.mnuPrepareColumnTextTransform.Size = New System.Drawing.Size(152, 22)
Me.mnuPrepareColumnTextTransform.Tag = "Transform..."
Me.mnuPrepareColumnTextTransform.Text = "Transform..."
'
'mnuPrepareColumnTextSplit
'
Me.mnuPrepareColumnTextSplit.Name = "mnuPrepareColumnTextSplit"
- Me.mnuPrepareColumnTextSplit.Size = New System.Drawing.Size(180, 22)
+ Me.mnuPrepareColumnTextSplit.Size = New System.Drawing.Size(152, 22)
Me.mnuPrepareColumnTextSplit.Tag = "Split..."
Me.mnuPrepareColumnTextSplit.Text = "Split..."
'
'mnuPrepareColumnTextCombine
'
Me.mnuPrepareColumnTextCombine.Name = "mnuPrepareColumnTextCombine"
- Me.mnuPrepareColumnTextCombine.Size = New System.Drawing.Size(180, 22)
+ Me.mnuPrepareColumnTextCombine.Size = New System.Drawing.Size(152, 22)
Me.mnuPrepareColumnTextCombine.Tag = "Combine..."
Me.mnuPrepareColumnTextCombine.Text = "Combine..."
'
@@ -3894,7 +3884,7 @@ Partial Class frmMain
'
Me.mnuPrepareColumnTextMatch.Enabled = False
Me.mnuPrepareColumnTextMatch.Name = "mnuPrepareColumnTextMatch"
- Me.mnuPrepareColumnTextMatch.Size = New System.Drawing.Size(180, 22)
+ Me.mnuPrepareColumnTextMatch.Size = New System.Drawing.Size(152, 22)
Me.mnuPrepareColumnTextMatch.Tag = "Match..."
Me.mnuPrepareColumnTextMatch.Text = "Match..."
Me.mnuPrepareColumnTextMatch.Visible = False
@@ -3902,7 +3892,7 @@ Partial Class frmMain
'mnuPrepareColumnTextDistance
'
Me.mnuPrepareColumnTextDistance.Name = "mnuPrepareColumnTextDistance"
- Me.mnuPrepareColumnTextDistance.Size = New System.Drawing.Size(180, 22)
+ Me.mnuPrepareColumnTextDistance.Size = New System.Drawing.Size(152, 22)
Me.mnuPrepareColumnTextDistance.Tag = "Distance..."
Me.mnuPrepareColumnTextDistance.Text = "Distance..."
'
@@ -4695,7 +4685,7 @@ Partial Class frmMain
'
Me.mnuOptionsByContextCheckData.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextCheckDataDuplicateRows, Me.mnuOptionsByContextCheckDataCompareColumns, Me.ToolStripSeparator47, Me.mnuOptionsByContextCheckDataOneVariableSummarise, Me.mnuOptionsByContextCheckDataOneVariableGraph, Me.mnuOptionsByContextCheckDataOneVariableFrequencies})
Me.mnuOptionsByContextCheckData.Name = "mnuOptionsByContextCheckData"
- Me.mnuOptionsByContextCheckData.Size = New System.Drawing.Size(180, 22)
+ Me.mnuOptionsByContextCheckData.Size = New System.Drawing.Size(137, 22)
Me.mnuOptionsByContextCheckData.Text = "Check Data"
'
'mnuOptionsByContextCheckDataDuplicateRows
@@ -4737,7 +4727,7 @@ Partial Class frmMain
'
Me.mnuOptionsByContextDefine.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextDefineOnStation, Me.mnuOptionsByContextDefineOnFarm})
Me.mnuOptionsByContextDefine.Name = "mnuOptionsByContextDefine"
- Me.mnuOptionsByContextDefine.Size = New System.Drawing.Size(180, 22)
+ Me.mnuOptionsByContextDefine.Size = New System.Drawing.Size(137, 22)
Me.mnuOptionsByContextDefine.Text = "Define"
'
'mnuOptionsByContextDefineOnStation
@@ -4756,7 +4746,7 @@ Partial Class frmMain
'
Me.mnuOptionsByContextPrepare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextPrepareCalculateDIfferenceBetweenOptions, Me.ToolStripSeparator48, Me.mnuOptionsByContextMergeAdditionalData, Me.mnuOptionsByContextPrepareStack, Me.mnuOptionsByContextPrepareUnstack})
Me.mnuOptionsByContextPrepare.Name = "mnuOptionsByContextPrepare"
- Me.mnuOptionsByContextPrepare.Size = New System.Drawing.Size(180, 22)
+ Me.mnuOptionsByContextPrepare.Size = New System.Drawing.Size(137, 22)
Me.mnuOptionsByContextPrepare.Text = "Prepare"
'
'mnuOptionsByContextPrepareCalculateDIfferenceBetweenOptions
@@ -4792,7 +4782,7 @@ Partial Class frmMain
'
Me.mnuOptionsByContextDescribe.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextDescribeCompareTwoTreatments, Me.mnuOptionsByContextDescribeCompareMultipleTreatments, Me.mnuOptionsByContextDescribeBoxplot})
Me.mnuOptionsByContextDescribe.Name = "mnuOptionsByContextDescribe"
- Me.mnuOptionsByContextDescribe.Size = New System.Drawing.Size(180, 22)
+ Me.mnuOptionsByContextDescribe.Size = New System.Drawing.Size(137, 22)
Me.mnuOptionsByContextDescribe.Text = "Describe"
'
'mnuOptionsByContextDescribeCompareTwoTreatments
@@ -4818,28 +4808,34 @@ Partial Class frmMain
'
Me.mnuOptionsByContextModel.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextModelFitModel, Me.mnuOptionsByContextGeneralFitModel})
Me.mnuOptionsByContextModel.Name = "mnuOptionsByContextModel"
- Me.mnuOptionsByContextModel.Size = New System.Drawing.Size(180, 22)
+ Me.mnuOptionsByContextModel.Size = New System.Drawing.Size(137, 22)
Me.mnuOptionsByContextModel.Text = "Model"
'
'mnuOptionsByContextModelFitModel
'
Me.mnuOptionsByContextModelFitModel.Name = "mnuOptionsByContextModelFitModel"
- Me.mnuOptionsByContextModelFitModel.Size = New System.Drawing.Size(180, 22)
+ Me.mnuOptionsByContextModelFitModel.Size = New System.Drawing.Size(176, 22)
Me.mnuOptionsByContextModelFitModel.Text = "Fit Model..."
'
'mnuOptionsByContextGeneralFitModel
'
Me.mnuOptionsByContextGeneralFitModel.Name = "mnuOptionsByContextGeneralFitModel"
- Me.mnuOptionsByContextGeneralFitModel.Size = New System.Drawing.Size(180, 22)
+ Me.mnuOptionsByContextGeneralFitModel.Size = New System.Drawing.Size(176, 22)
Me.mnuOptionsByContextGeneralFitModel.Text = "General Fit Model..."
'
'mnuOptionsByContextCropModel
'
Me.mnuOptionsByContextCropModel.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextCropModelApsimxExamples})
Me.mnuOptionsByContextCropModel.Name = "mnuOptionsByContextCropModel"
- Me.mnuOptionsByContextCropModel.Size = New System.Drawing.Size(180, 22)
+ Me.mnuOptionsByContextCropModel.Size = New System.Drawing.Size(137, 22)
Me.mnuOptionsByContextCropModel.Text = "Crop Model"
'
+ 'mnuOptionsByContextCropModelApsimxExamples
+ '
+ Me.mnuOptionsByContextCropModelApsimxExamples.Name = "mnuOptionsByContextCropModelApsimxExamples"
+ Me.mnuOptionsByContextCropModelApsimxExamples.Size = New System.Drawing.Size(176, 22)
+ Me.mnuOptionsByContextCropModelApsimxExamples.Text = "Apsimx Examples..."
+ '
'mnuTools
'
Me.mnuTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuToolsRunRCode, Me.mnuToolsRestartR, Me.mnuToolsCheckForUpdates, Me.mnuToolsClearOutputWindow, Me.ToolStripSeparator5, Me.mnuToolsSaveCurrentOptions, Me.mnuToolsLoadOptions, Me.mnuToolsInstallRPackage, Me.mnuToolsOptions})
@@ -5128,12 +5124,6 @@ Partial Class frmMain
Me.mnuLogFile.Text = "Log Window..."
Me.mnuLogFile.ToolTipText = "Log Window"
'
- 'mnuOptionsByContextCropModelApsimxExamples
- '
- Me.mnuOptionsByContextCropModelApsimxExamples.Name = "mnuOptionsByContextCropModelApsimxExamples"
- Me.mnuOptionsByContextCropModelApsimxExamples.Size = New System.Drawing.Size(180, 22)
- Me.mnuOptionsByContextCropModelApsimxExamples.Text = "Apsimx Examples..."
- '
'frmMain
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)
@@ -5147,7 +5137,7 @@ Partial Class frmMain
Me.IsMdiContainer = True
Me.MainMenuStrip = Me.mnuBar
Me.Name = "frmMain"
- Me.Text = "R-Instat " + My.Application.Info.Version.ToString
+ Me.Text = "R-Instat "
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
Me.stsStrip.ResumeLayout(False)
Me.stsStrip.PerformLayout()
@@ -5328,8 +5318,6 @@ Partial Class frmMain
Friend WithEvents mnuDescribeGeneralTabulation As ToolStripMenuItem
Friend WithEvents mnuDescribeGeneralGraphics As ToolStripMenuItem
Friend WithEvents mnuDescribeSpecificTablesGraphs As ToolStripMenuItem
- Friend WithEvents mnuDescribeSpecificSummary As ToolStripMenuItem
- Friend WithEvents mnuDescribeSpecificMultipleResponse As ToolStripMenuItem
Friend WithEvents mnuModelProbabilityDistributions As ToolStripMenuItem
Friend WithEvents mnuModelProbabilityDistributionsCompareModels As ToolStripMenuItem
Friend WithEvents mnuModelProbabilityDistributionsRandomSamplesUseModel As ToolStripMenuItem
@@ -5437,7 +5425,6 @@ Partial Class frmMain
Friend WithEvents mnuDescribeThemes As ToolStripMenuItem
Friend WithEvents mnuClimaticDescribe As ToolStripMenuItem
Friend WithEvents mnuClimaticPrepareSummary As ToolStripMenuItem
- Friend WithEvents ToolStripSeparator26 As ToolStripSeparator
Friend WithEvents mnuDescribeSpecificPointPlot As ToolStripMenuItem
Friend WithEvents mnuDescribeSpecificLineSmoothPlot As ToolStripMenuItem
Friend WithEvents mnuDescribeSpecificHistogramDensityFrequencyPlot As ToolStripMenuItem
@@ -5833,4 +5820,6 @@ Partial Class frmMain
Friend WithEvents mnuNormalViewer As ToolStripMenuItem
Friend WithEvents mnuEditWordwrap As ToolStripMenuItem
Friend WithEvents mnuPrepareColumnTextSearch As ToolStripMenuItem
+ Friend WithEvents mnuDescribeSpecificTables As ToolStripMenuItem
+ Friend WithEvents ToolStripSeparator26 As ToolStripSeparator
End Class
diff --git a/instat/frmMain.vb b/instat/frmMain.vb
index 42ca76703c4..ef6276ed2d0 100644
--- a/instat/frmMain.vb
+++ b/instat/frmMain.vb
@@ -41,6 +41,7 @@ Public Class frmMain
Private WithEvents timer As New System.Windows.Forms.Timer
Private iAutoSaveDataMilliseconds As Integer
Private clsDataBook As clsDataBook
+ Private Shared ReadOnly Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger()
Public ReadOnly Property DataBook As clsDataBook
Get
Return clsDataBook
@@ -76,7 +77,7 @@ Public Class frmMain
Private strCurrLang As String
Public Sub New()
-
+ Logger.Info("R-Instat started")
' This call is required by the designer.
InitializeComponent()
@@ -407,7 +408,7 @@ Public Class frmMain
dlgRegularSequence.ShowDialog()
End Sub
- Private Sub SummaryToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles mnuDescribeSpecificSummary.Click
+ Private Sub mnuDescribeSpecificTables_Click(sender As Object, e As EventArgs) Handles mnuDescribeSpecificTables.Click
dlgSummaryTables.ShowDialog()
End Sub
@@ -1513,11 +1514,6 @@ Public Class frmMain
ucrColumnMeta.SetCurrentDataFrame(iIndex)
End Sub
- Public Sub ReOrderWorkSheets()
- ucrDataViewer.ReOrderWorkSheets()
- ucrColumnMeta.ReOrderWorkSheets()
- End Sub
-
Private Sub CummulativeDistributionToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles mnuDescribeSpecificCummulativeDistribution.Click
dlgCumulativeDistribution.ShowDialog()
End Sub
@@ -2116,7 +2112,9 @@ Public Class frmMain
clsViewObjectFunction.SetRCommand("view_object")
clsViewObjectFunction.AddParameter("object", clsRFunctionParameter:=clsLastGraph)
clsViewObjectFunction.AddParameter("object_format", strParameterValue:=Chr(34) & RObjectFormat.Image & Chr(34))
- clsRLink.RunScript(clsLastGraph.ToScript(), strComment:="View last graph", bAddOutputInViewer:=False, bSeparateThread:=False)
+
+ 'todo. should this script be logged?
+ clsRLink.RunScript(clsLastGraph.ToScript(), strComment:="View last graph", bAddOutputInInternalViewer:=False, bSeparateThread:=False)
End Sub
@@ -2137,7 +2135,8 @@ Public Class frmMain
clsViewObjectFunction.AddParameter("object", clsRFunctionParameter:=clsInteractivePlot)
clsViewObjectFunction.AddParameter("object_format", strParameterValue:=Chr(34) & RObjectFormat.Html & Chr(34))
- clsRLink.RunScript(clsViewObjectFunction.ToScript(), strComment:="View last graph as plotly", bAddOutputInViewer:=False, bSeparateThread:=False)
+ 'todo. should this script be logged?
+ clsRLink.RunScript(clsViewObjectFunction.ToScript(), strComment:="View last graph as plotly", bAddOutputInInternalViewer:=False, bSeparateThread:=False)
End Sub
@@ -2147,11 +2146,16 @@ Public Class frmMain
clsLastGraph.SetRCommand(clsRLink.strInstatDataObject & "$get_last_object")
clsLastGraph.AddParameter("object_type_label", strParameterValue:=Chr(34) & RObjectTypeLabel.Graph & Chr(34), iPosition:=0)
clsLastGraph.AddParameter("as_file", strParameterValue:="FALSE", iPosition:=1)
+ clsLastGraph.SetAssignToObject("last_graph")
clsPrintGraph.SetRCommand("print")
clsPrintGraph.AddParameter("x", clsRFunctionParameter:=clsLastGraph, iPosition:=0)
- clsRLink.RunScript(clsPrintGraph.ToScript(), strComment:="View last graph in R viewer", bSeparateThread:=False)
+ Dim strScript1 As String = ""
+ Dim strScript2 As String = clsPrintGraph.ToScript(strScript1)
+
+ 'todo. should this script be logged?
+ clsRLink.RunScript(strScript1 & strScript2, strComment:="View last graph in R viewer", bSeparateThread:=False)
End Sub
diff --git a/instat/instat.vbproj b/instat/instat.vbproj
index 14261159918..7981ae55b48 100644
--- a/instat/instat.vbproj
+++ b/instat/instat.vbproj
@@ -34,8 +34,8 @@
Missing Tool
Polycarp
Testing Instat
- 1
- 1.0.0.%2a
+ 4
+ 5.5.5.%2a
false
true
true
@@ -117,6 +117,9 @@
app.manifest
+
+ false
+
False
@@ -144,6 +147,9 @@
..\packages\Microsoft.Win32.Registry.4.5.0\lib\net461\Microsoft.Win32.Registry.dll
+
+ ..\packages\NLog.5.1.0\lib\net46\NLog.dll
+
@@ -156,6 +162,7 @@
..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll
+
..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net46\System.Data.SQLite.dll
@@ -164,6 +171,7 @@
+
..\packages\System.Security.AccessControl.4.5.0\lib\net461\System.Security.AccessControl.dll
@@ -239,6 +247,12 @@
+
+ sdgPairPlotOptions.vb
+
+
+ Form
+
sdgSummaryThemes.vb
@@ -3087,6 +3101,9 @@
dlgThreeVariablePivotTable.vb
+
+ sdgPairPlotOptions.vb
+
sdgSummaryThemes.vb
@@ -5238,6 +5255,12 @@
+
+ PreserveNewest
+
+
+ Designer
+
Designer
diff --git a/instat/packages.config b/instat/packages.config
index df19e918208..32eaa0e7df0 100644
--- a/instat/packages.config
+++ b/instat/packages.config
@@ -9,6 +9,7 @@
+
diff --git a/instat/sdgPairPlotOptions.Designer.vb b/instat/sdgPairPlotOptions.Designer.vb
new file mode 100644
index 00000000000..859df509766
--- /dev/null
+++ b/instat/sdgPairPlotOptions.Designer.vb
@@ -0,0 +1,108 @@
+ _
+Partial Class sdgPairPlotOptions
+ Inherits System.Windows.Forms.Form
+
+ 'Form remplace la méthode Dispose pour nettoyer la liste des composants.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
+
+ 'Requise par le Concepteur Windows Form
+ Private components As System.ComponentModel.IContainer
+
+ 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
+ 'Elle peut être modifiée à l'aide du Concepteur Windows Form.
+ 'Ne la modifiez pas à l'aide de l'éditeur de code.
+ _
+ Private Sub InitializeComponent()
+ Me.tpLegend = New System.Windows.Forms.TabPage()
+ Me.ucrInputLegendPosition = New instat.ucrInputComboBox()
+ Me.ucrChkLegendPosition = New instat.ucrCheck()
+ Me.tbInventory = New System.Windows.Forms.TabControl()
+ Me.ucrButtonsInventoryplot = New instat.ucrButtonsSubdialogue()
+ Me.tpLegend.SuspendLayout()
+ Me.tbInventory.SuspendLayout()
+ Me.SuspendLayout()
+ '
+ 'tpLegend
+ '
+ Me.tpLegend.Controls.Add(Me.ucrInputLegendPosition)
+ Me.tpLegend.Controls.Add(Me.ucrChkLegendPosition)
+ Me.tpLegend.Location = New System.Drawing.Point(4, 22)
+ Me.tpLegend.Name = "tpLegend"
+ Me.tpLegend.Padding = New System.Windows.Forms.Padding(3)
+ Me.tpLegend.Size = New System.Drawing.Size(291, 36)
+ Me.tpLegend.TabIndex = 3
+ Me.tpLegend.Text = "Legend"
+ Me.tpLegend.UseVisualStyleBackColor = True
+ '
+ '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(154, 3)
+ Me.ucrInputLegendPosition.Name = "ucrInputLegendPosition"
+ Me.ucrInputLegendPosition.Size = New System.Drawing.Size(134, 25)
+ Me.ucrInputLegendPosition.TabIndex = 1
+ '
+ 'ucrChkLegendPosition
+ '
+ Me.ucrChkLegendPosition.AutoSize = True
+ Me.ucrChkLegendPosition.Checked = False
+ Me.ucrChkLegendPosition.Location = New System.Drawing.Point(7, 5)
+ Me.ucrChkLegendPosition.Name = "ucrChkLegendPosition"
+ Me.ucrChkLegendPosition.Size = New System.Drawing.Size(204, 23)
+ Me.ucrChkLegendPosition.TabIndex = 0
+ '
+ 'tbInventory
+ '
+ Me.tbInventory.Controls.Add(Me.tpLegend)
+ Me.tbInventory.Location = New System.Drawing.Point(3, 0)
+ Me.tbInventory.Name = "tbInventory"
+ Me.tbInventory.SelectedIndex = 0
+ Me.tbInventory.Size = New System.Drawing.Size(299, 62)
+ Me.tbInventory.TabIndex = 2
+ '
+ 'ucrButtonsInventoryplot
+ '
+ Me.ucrButtonsInventoryplot.AutoSize = True
+ Me.ucrButtonsInventoryplot.Location = New System.Drawing.Point(46, 64)
+ Me.ucrButtonsInventoryplot.Name = "ucrButtonsInventoryplot"
+ Me.ucrButtonsInventoryplot.Size = New System.Drawing.Size(224, 30)
+ Me.ucrButtonsInventoryplot.TabIndex = 4
+ '
+ 'sdgPairPlotOptions
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(311, 98)
+ Me.Controls.Add(Me.ucrButtonsInventoryplot)
+ Me.Controls.Add(Me.tbInventory)
+ Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "sdgPairPlotOptions"
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
+ Me.Text = "Pair Plot Options"
+ Me.tpLegend.ResumeLayout(False)
+ Me.tpLegend.PerformLayout()
+ Me.tbInventory.ResumeLayout(False)
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
+
+ End Sub
+ Friend WithEvents tpLegend As TabPage
+ Friend WithEvents ucrInputLegendPosition As ucrInputComboBox
+ Friend WithEvents ucrChkLegendPosition As ucrCheck
+ Friend WithEvents tbInventory As TabControl
+ Friend WithEvents ucrButtonsInventoryplot As ucrButtonsSubdialogue
+End Class
diff --git a/instat/sdgPairPlotOptions.resx b/instat/sdgPairPlotOptions.resx
new file mode 100644
index 00000000000..1af7de150c9
--- /dev/null
+++ b/instat/sdgPairPlotOptions.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/instat/sdgPairPlotOptions.vb b/instat/sdgPairPlotOptions.vb
new file mode 100644
index 00000000000..2d2de9bb207
--- /dev/null
+++ b/instat/sdgPairPlotOptions.vb
@@ -0,0 +1,73 @@
+' 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
+Imports instat.Translations
+Public Class sdgPairPlotOptions
+ Public clsPairOperator As New ROperator
+ Public clsPairThemesFunction, clsGGpairsFunction As New RFunction
+ Private bControlsInitialised As Boolean = False
+
+ Private Sub sdgPairPlotOptions_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ autoTranslate(Me)
+ End Sub
+
+ Public Sub InitialiseControls()
+ Dim dctLegendPosition As New Dictionary(Of String, String)
+
+ ucrChkLegendPosition.SetText("Legend Position")
+ ucrChkLegendPosition.AddToLinkedControls(ucrInputLegendPosition, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="None")
+ ucrInputLegendPosition.SetDropDownStyleAsNonEditable()
+ ucrInputLegendPosition.SetParameter(New RParameter("legend.position"))
+ dctLegendPosition.Add("None", Chr(34) & "none" & Chr(34))
+ dctLegendPosition.Add("Left", Chr(34) & "left" & Chr(34))
+ dctLegendPosition.Add("Right", Chr(34) & "right" & Chr(34))
+ dctLegendPosition.Add("Top", Chr(34) & "top" & Chr(34))
+ dctLegendPosition.Add("Bottom", Chr(34) & "bottom" & Chr(34))
+ ucrInputLegendPosition.SetItems(dctLegendPosition)
+ ucrChkLegendPosition.AddParameterPresentCondition(True, "legend_position")
+ ucrChkLegendPosition.AddParameterPresentCondition(False, "legend_position", False)
+
+ bControlsInitialised = True
+ End Sub
+
+ Public Sub SetRCode(clsNewPairOperator As ROperator, clsNewPairThemesFunction As RFunction, clsNewGGpairAesFunction As RFunction, Optional bReset As Boolean = False)
+ clsPairOperator = clsNewPairOperator
+ clsPairThemesFunction = clsNewPairThemesFunction
+ clsGGpairsFunction = clsNewGGpairAesFunction
+
+ If Not bControlsInitialised Then
+ InitialiseControls()
+ End If
+ If bReset Then
+ ucrChkLegendPosition.SetRCode(clsPairThemesFunction, bReset, bCloneIfNeeded:=True)
+ ucrInputLegendPosition.SetRCode(clsPairThemesFunction, bReset, bCloneIfNeeded:=True)
+ End If
+ End Sub
+
+ Private Sub ucrChkLegendPosition_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkLegendPosition.ControlValueChanged, ucrInputLegendPosition.ControlValueChanged
+ If ucrChkLegendPosition.Checked Then
+ clsPairOperator.AddParameter("right", clsRFunctionParameter:=clsPairThemesFunction, iPosition:=1)
+ If ucrInputLegendPosition.GetText = "None" Then
+ clsGGpairsFunction.RemoveParameterByName("legend")
+ Else
+ clsGGpairsFunction.AddParameter("legend", 1, iPosition:=2)
+ End If
+ Else
+ clsPairOperator.RemoveParameterByName("right")
+ End If
+ End Sub
+End Class
\ No newline at end of file
diff --git a/instat/static/InstatObject/R/Backend_Components/calculations.R b/instat/static/InstatObject/R/Backend_Components/calculations.R
index 22703f72bf7..ba47d32867e 100644
--- a/instat/static/InstatObject/R/Backend_Components/calculations.R
+++ b/instat/static/InstatObject/R/Backend_Components/calculations.R
@@ -482,7 +482,7 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list
# if it is a ordered factor...
if (any(stringr::str_detect("ordered", col_data_type))){
# put in here the ones that DO work for ordered factor
- if (any(grepl("summary_count_non_missing|summary_count_missing|summary_count|summary_min|summary_max|summary_range", formula_fn_exp))){
+ if (any(grepl("summary_count_non_missing|summary_count_missing|summary_count|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){
curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>%
dplyr::summarise_(.dots = setNames(list(as.formula(paste0("~", calc$function_exp))), calc$result_name))
} else {
diff --git a/instat/static/InstatObject/R/Backend_Components/summary_functions.R b/instat/static/InstatObject/R/Backend_Components/summary_functions.R
index f0656b97f2e..3f2f3a7d991 100644
--- a/instat/static/InstatObject/R/Backend_Components/summary_functions.R
+++ b/instat/static/InstatObject/R/Backend_Components/summary_functions.R
@@ -123,9 +123,7 @@ DataBook$set("public", "calculate_summary", function(data_name, columns_to_summa
}
if(!store_results) save <- 0
else save <- 2
-
summaries_display <- as.vector(sapply(summaries, function(x) ifelse(startsWith(x, "summary_"), substring(x, 9), x)))
-
if(percentage_type == "factors") {
manip_factors <- intersect(factors, perc_total_factors)
}
@@ -178,8 +176,9 @@ DataBook$set("public", "calculate_summary", function(data_name, columns_to_summa
#TODO result_names could be horizontal/vertical vector, matrix or single value
else result_name <- result_names[i,j]
if(percentage_type == "none") {
+ summary_function_exp <- paste0(summary_type, "(x = ", column_names, function_exp)
summary_calculation <- instat_calculation$new(type = type, result_name = result_name,
- function_exp = paste0(summary_type, "(x = ", column_names, function_exp),
+ function_exp = summary_function_exp,
calculated_from = calculated_from, save = save)
}
else {
@@ -225,6 +224,10 @@ DataBook$set("public", "calculate_summary", function(data_name, columns_to_summa
}
combined_calc_sum <- instat_calculation$new(type="combination", sub_calculations = sub_calculations, manipulations = manipulations)
out <- self$apply_instat_calculation(combined_calc_sum)
+ # relocate so that the factors are first still for consistency
+ if (percentage_type != "none"){
+ out$data <- (out$data %>% dplyr::select(c(tidyselect::all_of(factors), tidyselect::all_of(manip_factors)), tidyselect::everything()))
+ }
if(return_output) {
dat <- out$data
if(percentage_type == "none" || perc_return_all) return(out$data)
@@ -748,9 +751,12 @@ summary_median <- function(x, na.rm = FALSE, weights = NULL, na_type = "", ...)
if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA)
else{
if(missing(weights) || is.null(weights)) {
- return(median(x, na.rm = na.rm))
- }
- else {
+ if (stringr::str_detect(class(x), pattern = "ordered") || stringr::str_detect(class(x), pattern = "Date")) {
+ return(quantile(x, na.rm = na.rm, probs = 0.5, type = 1)[[1]])
+ } else {
+ return(median(x, na.rm = na.rm))
+ }
+ } else {
return(Hmisc::wtd.quantile(x, weights = weights, probs = 0.5, na.rm = na.rm))
}
}
@@ -763,7 +769,11 @@ summary_quantile <- function(x, na.rm = FALSE, weights = NULL, probs, na_type =
if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA)
else {
if(missing(weights) || is.null(weights)) {
- return(quantile(x, na.rm = na.rm, probs = probs)[[1]])
+ if (stringr::str_detect(class(x), pattern = "ordered") || stringr::str_detect(class(x), pattern = "Date")) {
+ return(quantile(x, na.rm = na.rm, probs = probs, type = 1)[[1]])
+ } else {
+ return(quantile(x, na.rm = na.rm, probs = probs)[[1]])
+ }
}
else {
return(Hmisc::wtd.quantile(x, weights = weights, probs = probs, na.rm = na.rm))
@@ -1360,6 +1370,7 @@ DataBook$set("public", "summary_table", function(data_name, columns_to_summarise
} else {
save <- 2
}
+
cell_values <- self$calculate_summary(data_name = data_name, columns_to_summarise = columns_to_summarise, summaries = summaries, factors = factors, store_results = FALSE, drop = drop, na.rm = na.rm, return_output = TRUE, weights = weights, result_names = result_names, percentage_type = percentage_type, perc_total_columns = perc_total_columns, perc_total_factors = perc_total_factors, perc_total_filter = perc_total_filter, perc_decimal = perc_decimal, include_counts_with_percentage = include_counts_with_percentage, margin_name = margin_name, additional_filter = additional_filter, perc_return_all = FALSE, signif_fig = signif_fig, sep = "__", ...)
for (i in seq_along(factors)) {
levels(cell_values[[i]]) <- c(levels(cell_values[[i]]), na_level_display)
@@ -1494,10 +1505,12 @@ DataBook$set("public", "summary_table", function(data_name, columns_to_summarise
dplyr::mutate_at(vars(-c(value)), ~forcats::as_factor(forcats::fct_relevel(.x, margin_name, after = Inf)))
}
}
- if (percentage_type == "none" || include_counts_with_percentage == FALSE){
- shaped_cell_values <- shaped_cell_values %>% dplyr::mutate(value = as.numeric(as.character(value)),
- value = round(value, signif_fig))
- }
+ # Used to make all values numeric, but stopped because of issues with ordered factors/dates.
+ # I don't think this line is needed anymore, but will keep it commented for now in case it becomes more apparent in the future
+ #if (percentage_type == "none" || include_counts_with_percentage == FALSE){
+ # shaped_cell_values <- shaped_cell_values %>% dplyr::mutate(value = as.numeric(as.character(value)),
+ # value = round(value, signif_fig))
+ #}
if (treat_columns_as_factor && !is.null(columns_to_summarise)){
shaped_cell_values <- shaped_cell_values %>%
dplyr::mutate(summary = as.factor(summary)) %>% dplyr::mutate(summary = forcats::fct_relevel(summary, summaries_display)) %>%
diff --git a/instat/static/InstatObject/R/InstallPackages.R b/instat/static/InstatObject/R/InstallPackages.R
index 9f3799c1420..cc821299a5b 100644
--- a/instat/static/InstatObject/R/InstallPackages.R
+++ b/instat/static/InstatObject/R/InstallPackages.R
@@ -1,5 +1,18 @@
+Sys.setenv(TZ='GMT')
+
+#Install packages from CRAN archive
+install.packages("http://cran.r-project.org/src/contrib/Archive/signmedian.test/signmedian.test_1.5.1.tar.gz", repos=NULL, type="source")
+
+#Install packages from win.binary
+install.packages("stringi", dependencies = FALSE, repos='https://cloud.r-project.org', type = "win.binary")
+install.packages("stringr", dependencies = FALSE, repos='http://cran.us.r-project.org', type = "win.binary")
+install.packages("RMySQL", dependencies = FALSE, repos='http://cran.us.r-project.org', type = "win.binary")
+install.packages("terra", dependencies = FALSE, repos='http://cran.us.r-project.org', type = "win.binary")
+install.packages("XML", dependencies = FALSE, repos='http://cran.us.r-project.org', type = "win.binary")
+
# Packages including dependencies
# Generated from install_packages.R, do not edit manually!
+# Above packages taken out
packs <- c("abind", "agricolae", "agridat", "AlgDesign", "animation",
"anytime", "arrangements", "ash", "askpass", "assertthat", "automap",
"backports", "base64enc", "bayestestR", "BH", "bit", "bit64",
@@ -59,107 +72,28 @@ packs <- c("abind", "agricolae", "agridat", "AlgDesign", "animation",
"RcppRoll", "RCurl", "Rdpack", "readODS", "readr", "readxl",
"recipes", "registry", "relimp", "rematch", "rematch2", "remotes",
"repr", "reshape", "reshape2", "rgdal", "rio", "rje", "rlang",
- "rmarkdown", "RMAWGEN", "RMySQL", "robustbase", "rootSolve",
+ "rmarkdown", "RMAWGEN", "robustbase", "rootSolve",
"roxygen2", "rpart", "rpivotTable", "rprojroot", "rrefine", "rstatix",
"rstudioapi", "rtf", "Rttf2pt1", "rversions", "rvest", "rworldmap",
"rworldxtra", "s2", "sandwich", "sass", "scales", "scatterplot3d",
"SearchTrees", "selectr", "seriation", "sessioninfo", "sf", "sftime",
"shades", "shape", "shiny", "shinyFiles", "shinyjs", "shinythemes",
- "shinyWidgets", "signmedian.test", "sjlabelled", "sjmisc", "sjPlot",
+ "shinyWidgets", "sjlabelled", "sjmisc", "sjPlot",
"sjstats", "skimr", "snakecase", "SnowballC", "sodium", "sourcetools",
"sp", "spacetime", "spam", "SparseM", "SPEI", "splines2", "splus2R",
- "SQUAREM", "stars", "statip", "stinepack", "stringdist", "stringi",
- "stringr", "strucchange", "styler", "survival", "svglite", "sys",
- "systemfonts", "terra", "testthat", "texmex", "textshaping",
+ "SQUAREM", "stars", "statip", "stinepack", "stringdist",
+ "strucchange", "styler", "survival", "svglite", "sys",
+ "systemfonts", "testthat", "texmex", "textshaping",
"TH.data", "tibble", "tidyr", "tidyselect", "tidytext", "timechange",
"timeDate", "tinytex", "tokenizers", "treemapify", "trend", "tseries",
"TSP", "TTR", "tweenr", "tzdb", "units", "urca", "urlchecker",
"usethis", "utf8", "vars", "vcd", "vcdExtra", "vctrs", "viridis",
"viridisLite", "visdat", "visreg", "vroom", "wakefield", "waldo",
- "weathermetrics", "whisker", "withr", "wk", "xfun", "XML", "xml2",
+ "weathermetrics", "whisker", "withr", "wk", "xfun", "xml2",
"xopen", "xtable", "xts", "yaml", "yulab.utils", "zip", "zoo",
"zyp")
-versions <- c("1.4-5", "1.3-5", "1.21", "1.2.1", "2.7", "0.3.9",
- "1.1.9", "1.0-15", "1.1", "0.2.1", "1.0-16", "1.4.1", "0.1-3",
- "0.13.0", "1.78.0-0", "4.0.5", "4.0.5", "1.0-7", "1.3-28.1",
- "1.0-8", "1.1.3", "1.0.1", "0.4.1", "0.71.1", "1.0.6", "3.7.3",
- "0.8-6", "3.1-1", "3.0-5", "6.0-93", "1.1.0", "2.2.4", "2.1.0",
- "0.72.8", "2.3-58", "0.4.15", "0.2-6", "0.4-95", "7.3-20", "0.4-8",
- "3.4.1", "3.2-5", "1.1-11", "0.8.0", "0.6.1", "0.3-63", "2.1.4",
- "3.4.4", "1.2.6", "1.1.12", "0.2-18", "1.4-2", "2.3.1", "2.0-3",
- "1.2.0", "0.0-8", "1.8.1", "0.2.0", "0.92", "0.4.4", "1.4.0",
- "1.1.1", "0.4.3", "1.5.2", "1.3.2", "1.2.0", "4.3.3", "1.25.4",
- "3.2-13", "1.14.6", "0.6.4", "1.2-40", "1.1.3", "1.0-6", "1.16.0",
- "1.0-11", "1.4.2", "0.99.47", "2.4.4", "0.3.5", "0.6.30", "1.2-1",
- "1.0-2", "0.4.2", "1.0.10", "0.7.4", "0.26", "1.7-12", "1.4.0",
- "0.8.2", "0.4.3", "0.3.2", "1.8.2", "2.7.0", "1.4.1", "0.18",
- "1.16", "3.2", "0.8-35", "0.999-6", "1.9.1", "0.18", "1.0", "2.1-3",
- "1.0.7", "2.6", "1.0.3", "1.0.8", "2.1.1", "1.6.3", "1.1.0",
- "14.1", "1.0.2", "1.1-8", "1.01-2", "1.1.3.1", "0.4.0", "0.5.2",
- "1.5.2", "8.19", "0.8-83", "1.7.1", "1.2-4", "1.5-2", "1.5.2",
- "1.10.0", "1.29.0", "0.3.0", "1.3.2", "2.0", "0.1.3", "1.1.7",
- "1.5-18", "1.9.1", "0.2-2", "2.1.2", "0.4.0", "0.1.23", "1.1.4",
- "0.9.1", "0.4.1", "0.10.2", "0.4.15", "0.3.3", "3.4.0", "0.1.0",
- "0.5.1", "0.4.5", "0.5.0", "0.9.2", "0.5.4", "2.9", "0.6.4",
- "0.3.6", "0.1.2", "4.2.4", "0.5.0", "1.3.1", "0.1.2", "2.6.6",
- "0.1.2", "0.16.2", "1.6.2", "0.6-8", "1.1-2", "1.2-3", "1.0.0",
- "2.3", "0.5-1", "0.1.5", "2.1-0", "0.3.1", "1.2.0", "2.5.1",
- "1.4-2", "1.28.2", "0.9", "0.8-7", "4.7-2", "1.1.2", "2.4.1",
- "0.5.3", "1.5.4", "1.6.6", "1.4.4", "3.0.2", "0.4-0", "0.6-0",
- "3.3", "0.3.1", "0.18.8", "1.1-3", "0.15.2", "0.9-13", "0.2.6",
- "1.0.14", "1.0.0", "2.1.0", "0.1-10", "0.1.4", "1.8.3", "2.2.1",
- "2.23-20", "1.3.1", "1.7-1", "1.41", "0.4.2", "2.10.0", "10.0-1",
- "1.3.0", "0.20-45", "0.6-30", "1.7.0", "0.2.2", "1.9.0", "2.1.1",
- "3.1", "0.4.5", "1.0-9", "1.0.3", "0.8.0", "1.1-31", "1.7-3",
- "2.9", "2.4.7", "1.3-1", "0.9-40", "1.9.0", "0.2-10", "2.7.3",
- "2.0.3", "2.3.1", "1.2.9", "3.4.1", "1.1-5", "1.4", "7.3-58.1",
- "1.5-3", "0.5-1", "0.63.0", "0.1-22", "2.0.1", "0.13.0", "1.8-41",
- "0.12", "0.1.1.1", "1.2.5", "0.8", "0.9", "2.1-3", "1.2.2.2",
- "0.1.10", "0.2-23", "1.8.4.2", "0.9.2.1", "0.20.3", "1.4-20",
- "0.1-8", "0.5.0", "1.1-3", "0.3-6", "1.19", "3.1-160", "2.0.3",
- "7.3-18", "1.0-4", "2016.8-1.1", "1.0.2", "2.12", "2.0.4", "4.2.5.1",
- "1.6.3", "1.32.1", "0.20.0", "1.1.2", "0.5.1", "1.1", "0.5-4.3",
- "0.10.1", "1.8.1", "2.0.2", "1.4.0", "2.0.3", "2.0.6", "1.3.2",
- "4.10.1", "3.8-2", "2.8-1", "1.8.8", "0.1-8", "1.10-4", "1.4-1",
- "1.0.0", "1.1.1", "1.18.0", "3.8.0", "2019.11.13", "0.1.1", "0.3.7",
- "1.2.2", "0.11.0", "1.0-12", "1.2.0.1", "0.4-27", "1.7.2", "0.3.5",
- "0.1-2", "1.5-8", "0.4.20", "5.94", "0.7.7", "1.0.2", "0.16.0",
- "1.8.2", "1.25.0", "2.12.2", "2.5.1", "1.2.4", "0.1", "0.3.3",
- "3.6-11", "0.51.4", "2.2.10", "1.4.0", "1.1-3", "2.0.0", "1.0.9",
- "0.11.4.2.1", "0.3.3.9.3", "0.3.0", "1.98-1.9", "2.4", "1.7.0",
- "2.1.3", "1.4.1", "1.0.3", "0.5-1", "1.0-5", "1.0.1", "2.1.2",
- "2.4.2", "1.1.4", "0.8.9", "1.4.4", "1.5-32", "0.5.29", "1.12.1",
- "1.0.6", "2.18", "1.3.7", "0.10.24", "0.95-0", "1.8.2.3", "7.2.2",
- "4.1.19", "0.3.0", "2.0.3", "2.1.0", "0.7.1", "0.14", "0.4-14.1",
- "1.3.11", "2.1.2", "1.0.3", "1.3-6", "1.01", "1.1.1", "3.0-2",
- "0.4.4", "1.2.1", "0.3-42", "0.5.5", "0.4-2", "1.4.0", "1.2.2",
- "1.0-9", "0.2-0", "1.4.0", "1.4.6", "1.7.3", "0.9.3", "2.1.0",
- "1.2.0", "0.7.5", "1.5.1", "1.2.0", "2.8.9", "2.8.12", "0.18.2",
- "2.1.4", "0.11.0", "0.7.0", "1.2.1", "0.1.7", "1.5-1", "1.2-8",
- "2.9-1", "1.81", "1.7", "0.4.6", "1.3-3", "2021.1", "0.6-0",
- "0.2.3", "1.4", "0.9.10", "1.7.6", "1.4.1", "1.5-3", "1.8.1",
- "3.4-0", "2.1.0", "3.4.1", "1.0.4", "1.6-41", "3.1.5", "2.4.8",
- "0.3.6", "1.1-1", "3.1.8", "1.2.1", "1.2.0", "0.3.4", "0.1.1",
- "4021.106", "0.42", "0.2.3", "2.5.5", "1.1.4", "0.10-52", "1.2-1",
- "0.24.3", "2.0.2", "0.3.0", "0.8-0", "1.3-3", "1.0.1", "2.1.6",
- "1.2.2", "1.5-6", "1.4-10", "0.8-0", "0.5.1", "0.6.2", "0.4.1",
- "0.5.3", "2.7.0", "1.6.0", "0.3.6", "0.4.0", "1.2.2", "0.4",
- "2.5.0", "0.7.0", "0.35", "3.99-0.12", "1.3.3", "1.0.0", "1.8-4",
- "0.12.2", "2.3.6", "0.0.5", "2.2.2", "1.8-11", "0.10-1.1")
-
-##################################################
-
-# Returns package names from packs which are not installed with the correct version
-packages_not_installed <- function() {
- success <- invisible(mapply(function(p, v) length(find.package(p, quiet = TRUE)) > 0 && compareVersion(as.character(packageVersion(p)), v) >= 0, packs, versions))
- return(names(success)[!success])
-}
-
-install.packages(packs, dependencies = FALSE, repos='http://cran.us.r-project.org')
-
-install.packages(packages_not_installed(), dependencies = FALSE, repos='http://cran.us.r-project.org')
+install.packages(packs, dependencies = FALSE, repos='https://cloud.r-project.org', type="win.binary")
+#install development packages not on CRAN
devtools::install_github("ianmoran11/mmtable2")
-
-
diff --git a/instat/static/InstatObject/R/install_packages.R b/instat/static/InstatObject/R/install_packages.R
index 26ea7553a1b..35a84e8a344 100644
--- a/instat/static/InstatObject/R/install_packages.R
+++ b/instat/static/InstatObject/R/install_packages.R
@@ -130,12 +130,16 @@ pkgs <-
# For most frequent values in Prepare > Column:Numeric > Row Summaries
"statip",
# also install mmtable2 from GitHub devtools::install_github("ianmoran11/mmtable2")
+ # install.packages('remotes')
+ # also install aida-package from GitHub remotes::install_github('michael-franke/aida-package')
"corrr",
"dslabs",
"coin",
"pingr",
- "vcdExtra"
- )
+ "vcdExtra",
+ # For inspect, read, edit and run files for 'APSIM'
+ "apsimx"
+ )
pkgList <- pkgDep(pkgs, type="win.binary", repos = "https://cran.rstudio.com/", suggests = FALSE, includeBasePkgs = FALSE, Rversion = r_version)
pth <- "C:/Users/Christopher Marsh/Documents/RPackages"
makeRepo(pkgList, path = pth, type = "win.binary", Rversion = r_version, repos = "https://cran.rstudio.com/")
diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R
index 1151662b35d..7068bd33b45 100644
--- a/instat/static/InstatObject/R/instat_object_R6.R
+++ b/instat/static/InstatObject/R/instat_object_R6.R
@@ -658,28 +658,36 @@ DataBook$set("public", "get_objects", function(data_name, object_name, object_ty
)
#returns NULL if object is not found
-#as explained in issue #7808 comments. New implementation is need to remove the internal parameter from the other "object" functions
-#if parameter internal is set to false, parameter object_type_label will have to be passed
-#todo. parameter object_type_label and internal can be removed as a parameter if all objects are saved in the same data book or structure
-DataBook$set("public", "get_object", function(data_name, object_name, object_type_label = "", as_file = TRUE, internal = TRUE) {
- if (!internal && identical(object_type_label,"graph") && exists(".graph_data_book")) {
- r_instant_object <- .graph_data_book$get_object(data_name = data_name, object_name = object_name, internal = TRUE)
+#see issue #7808 comments for more discussions
+DataBook$set("public", "get_object", function(data_name, object_name, as_file = TRUE) {
+ if(missing(data_name) || data_name == overall_label) {
+ r_instant_object <- private$.objects[[object_name]]
}else {
- if(missing(data_name) || data_name == overall_label) {
- r_instant_object <- private$.objects[[object_name]]
- }else {
- r_instant_object <- self$get_data_objects(data_name)$get_object(object_name = object_name)
- }
+ r_instant_object <- self$get_data_objects(data_name)$get_object(object_name = object_name)
}
- if (is.null(r_instant_object)){
- return(NULL)
+ out <- r_instant_object
+ if(!is.null(out) && as_file ){
+ out <- view_object(object = r_instant_object$object, object_format = r_instant_object$object_format)
+ }
+ return(out)
+
+}
+)
+
+DataBook$set("public", "get_last_object", function(object_type_label, as_file = TRUE) {
+ r_instat_object <- NULL
+ #currently this function is only applicable to graphs. Implement for other objects like models, tables, summaries
+ if(object_type_label == "graph"){
+ if(!is.null(private$.last_graph) && length(private$.last_graph) == 2) {
+ r_instat_object <- self$get_object(data_name = private$.last_graph[1], object_name = private$.last_graph[2], as_file = as_file)
+ }
+ }
+
+ if(!is.null(r_instat_object) && !as_file){
+ return(r_instat_object$object)
}else{
- if(as_file){
- return(view_object(object = r_instant_object$object, object_format = r_instant_object$object_format))
- }else{
- return(r_instant_object)
- }
+ return(r_instat_object)
}
}
@@ -796,30 +804,7 @@ DataBook$set("public", "get_from_object", function(data_name, object_name, value
}
)
-DataBook$set("public", "get_last_object", function(object_type_label, as_file = TRUE, internal = TRUE) {
- if (!internal && exists(".graph_data_book")){
- return(.graph_data_book$get_last_object(object_type_label = object_type_label, as_file = as_file, internal = TRUE))
- }else {
- r_instat_object <- NULL
- if(object_type_label == "graph"){
- if(!is.null(private$.last_graph) && length(private$.last_graph) == 2) {
- r_instat_object <- self$get_object(data_name = private$.last_graph[1], object_name = private$.last_graph[2], as_file = as_file)
- }
- }else{
- #todo. any other object type label
- }
-
- if(is.null(r_instat_object)){
- return()
- }else if(as_file){
- return(r_instat_object)
- }else{
- return(r_instat_object$object)
- }
-
- }
-}
-)
+
# Filters -----------------------------------------------------------------
diff --git a/instat/static/InstatObject/R/labels_and_defaults.R b/instat/static/InstatObject/R/labels_and_defaults.R
index 6ed365153a8..20e73817247 100644
--- a/instat/static/InstatObject/R/labels_and_defaults.R
+++ b/instat/static/InstatObject/R/labels_and_defaults.R
@@ -61,7 +61,6 @@ overall_label="[Overall]"
graph_label="graph"
table_label="table"
model_label="model"
-structure_label = "structure"
summary_label = "summary"
#link labels
diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R
index dc798069c70..d015f15faf5 100644
--- a/instat/static/InstatObject/R/stand_alone_functions.R
+++ b/instat/static/InstatObject/R/stand_alone_functions.R
@@ -2636,6 +2636,9 @@ view_object <- function(object, object_format) {
#it saves the object as a file in the temporary folder
#and returns the file path.
view_graph_object <- function(graph_object){
+ #get object class names
+ object_class_names <- class(graph_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")
@@ -2643,32 +2646,34 @@ view_graph_object <- function(graph_object){
#TODO. When print command is called in R-Studio, a temp file is automatically created
#Investigate how that can be done in R-Instat
#as of 07/09/2022 just return the object. Important for RStudio to display the object
+ if ("grob" %in% object_class_names){
+ #for grob objects draw them first
+ grid::grid.draw(graph_object)
+ }
return(graph_object)
}
- #get object class names
- object_class_names <- class(graph_object)
+
#get a unique temporary file name from the tempdir path
file_name <- tempfile(pattern = "viewgraph", fileext = ".png")
- #save the object as a html file depending on the object type
+ #save the object as a graph file depending on the object type
grDevices::png(file = file_name, width = 4000, height = 4000, res = 500)
- print(graph_object)
+ if ("grob" %in% object_class_names) {
+ grid::grid.draw(graph_object)
+ }else{
+ print(graph_object)
+ }
dev.off() #todo. use graphics.off() which one is better?
+
#todo. should we use respective package "convenience" functions to save the objects as image files depending on the class names?
- #investigate if thatwill that help with resolution and scaling?
-
+ #investigate if it will help with resolution and scaling?
# if ("ggplot" %in% object_class_names) {
- #
# } else if ("ggmultiplot" %in% object_class_names) {
- #
# } else if ("openair" %in% object_class_names) {
- #
# } else if ("ggsurvplot" %in% object_class_names) {
- #
# } else if ("recordedplot" %in% object_class_names) {
- #
# }
message("R viewer not detected. File saved in location ", file_name)
@@ -2691,12 +2696,13 @@ view_text_object <- function(text_object){
return(utils::capture.output(text_object))
}
- #get object class names
- object_class_names <- class(text_object)
+
#get a unique temporary file name from the tempdir path
file_name <- tempfile(pattern = "viewtext", fileext = ".txt")
#todo. should we use respective package "convenience" functions to save the objects as text files depending on the class names
+ #get object class names
+ #object_class_names <- class(text_object)
#save the object as a text file
utils::capture.output(text_object, file = file_name)
@@ -2750,3 +2756,35 @@ view_html_object <- function(html_object){
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
+check_graph <- function(graph_object){
+
+ out <- graph_object
+
+ if (is.null(out)) {
+ out <- tryCatch({
+ message("Recording plot")
+ recordPlot()
+ },
+ error = function(cond) {
+ message("Graph object does not exist:")
+ message(cond)
+ # Choose a return value in case of error
+ return(NULL)
+ },
+ warning = function(cond) {
+ message("Warning message:")
+ message(cond)
+ return(NULL)
+ },
+ finally = {
+ message("Plot recorded")
+ })
+ }
+
+ return(out)
+}
+
+
diff --git a/instat/translations/en/r_instat_not_menus.json b/instat/translations/en/r_instat_not_menus.json
index 460bc5d3a10..6ac10b839ad 100644
--- a/instat/translations/en/r_instat_not_menus.json
+++ b/instat/translations/en/r_instat_not_menus.json
@@ -3672,8 +3672,8 @@
"value": "value",
"Dumbbell": "Dumbbell",
"Line options": "Line options",
- "Use path or step": "Use path or step",
- "Smooth options": "Smooth options",
+ "Path or Step": "Path or Step",
+ "Smooth Options": "Smooth Options",
"Add Line": "Add Line",
"Add SE": "Add SE",
"Formula": "Formula",
diff --git a/instat/ucrButtons.vb b/instat/ucrButtons.vb
index 90b3fe6e065..1edbbe687c7 100644
--- a/instat/ucrButtons.vb
+++ b/instat/ucrButtons.vb
@@ -47,30 +47,14 @@ Public Class ucrButtons
RaiseEvent ClickReset(sender, e)
End Sub
- Private Sub cmdOk_Click(sender As Object, e As EventArgs) Handles cmdOk.Click
- RunFormScripts(sender, e, True)
+ '"Ok", "Ok and Close" and "Ok and Keep" Click event
+ Private Sub Ok_Click(sender As Object, e As EventArgs) Handles cmdOk.Click, toolStripMenuItemOkClose.Click, toolStripMenuItemOkKeep.Click
+ OnScriptButtonsClick(sender, e, True, Not sender Is toolStripMenuItemOkKeep)
End Sub
- Private Sub cmdPaste_Click(sender As Object, e As EventArgs) Handles cmdPaste.Click
- Scripts(bRun:=False)
- ParentForm.Close()
- End Sub
-
- Private Sub toolStripMenuItemOkClose_Click(sender As Object, e As EventArgs) Handles toolStripMenuItemOkClose.Click
- RunFormScripts(sender, e, True)
- End Sub
-
- Private Sub toolStripMenuItemOkKeep_Click(sender As Object, e As EventArgs) Handles toolStripMenuItemOkKeep.Click
- RunFormScripts(sender, e, False)
- End Sub
-
- Private Sub toolStripMenuItemToScriptClose_Click(sender As Object, e As EventArgs) Handles toolStripMenuItemToScriptClose.Click
- Scripts(bRun:=False)
- ParentForm.Close()
- End Sub
-
- Private Sub toolStripMenuItemToScriptKeep_Click(sender As Object, e As EventArgs) Handles toolStripMenuItemToScriptKeep.Click
- Scripts(bRun:=False)
+ '"To Script", "To Script and Close" and "To Script and Keep" Click event
+ Private Sub ToScript_Click(sender As Object, e As EventArgs) Handles cmdPaste.Click, toolStripMenuItemToScriptClose.Click, toolStripMenuItemToScriptKeep.Click
+ OnScriptButtonsClick(sender, e, False, Not sender Is toolStripMenuItemToScriptKeep)
End Sub
Private Sub txtComment_TextChanged(sender As Object, e As EventArgs) Handles txtComment.TextChanged
@@ -80,7 +64,7 @@ Public Class ucrButtons
End If
End Sub
- Private Sub RunFormScripts(sender As Object, e As EventArgs, bCloseForm As Boolean)
+ Private Sub OnScriptButtonsClick(sender As Object, e As EventArgs, bExecuteScripts As Boolean, bCloseForm As Boolean)
Dim lstCurrentEnabled As New List(Of Boolean)
Dim ctrTempControl As Control
Dim j As Integer
@@ -93,7 +77,7 @@ Public Class ucrButtons
ParentForm.Cursor = Cursors.WaitCursor
RaiseEvent BeforeClickOk(sender, e)
- Scripts(bRun:=True)
+ Scripts(bRun:=bExecuteScripts)
RaiseEvent ClickOk(sender, e)
'Need to be resetting other AssignTo values as well, maybe through single method
diff --git a/instat/ucrCalculator.Designer.vb b/instat/ucrCalculator.Designer.vb
index 02ebcac7755..7f0d33ddf6b 100644
--- a/instat/ucrCalculator.Designer.vb
+++ b/instat/ucrCalculator.Designer.vb
@@ -40,7 +40,6 @@ Partial Class ucrCalculator
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.lblExpression = New System.Windows.Forms.Label()
- Me.cmdRHelp = New System.Windows.Forms.Button()
Me.chkShowParameters = New System.Windows.Forms.CheckBox()
Me.grpBasic = New System.Windows.Forms.GroupBox()
Me.cmdClear = New System.Windows.Forms.Button()
@@ -63,6 +62,10 @@ 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.cmdPm = New System.Windows.Forms.Button()
Me.cmdTime = New System.Windows.Forms.Button()
Me.cmdDateTime = New System.Windows.Forms.Button()
@@ -82,6 +85,8 @@ 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.ContextMenuStripComplex = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.ComplexBaseToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.grpInteger = New System.Windows.Forms.GroupBox()
Me.cmdLucas = New System.Windows.Forms.Button()
Me.cmdFactorize = New System.Windows.Forms.Button()
@@ -134,7 +139,9 @@ Partial Class ucrCalculator
Me.cmdIsPrime = New System.Windows.Forms.Button()
Me.cmdBigZ = New System.Windows.Forms.Button()
Me.grpFactor = New System.Windows.Forms.GroupBox()
- Me.cmdTransformHelp = New System.Windows.Forms.Button()
+ Me.cmdTransformHelp = New instat.ucrSplitButton()
+ Me.ContextMenuStripFactor = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.FactorForcatsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.cmdShuffle = New System.Windows.Forms.Button()
Me.cmdShift = New System.Windows.Forms.Button()
Me.cmdReverse = New System.Windows.Forms.Button()
@@ -156,7 +163,9 @@ Partial Class ucrCalculator
Me.cmdFactor = New System.Windows.Forms.Button()
Me.cmdAnon = New System.Windows.Forms.Button()
Me.grpHydroGOF = New System.Windows.Forms.GroupBox()
- Me.cmdHydroHelp = New System.Windows.Forms.Button()
+ Me.cmdHydroHelp = New instat.ucrSplitButton()
+ Me.ContextMenuStripHydroGOF = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.HydroGOFToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.cmdVE = New System.Windows.Forms.Button()
Me.cmdSsq = New System.Windows.Forms.Button()
Me.cmdRsr = New System.Windows.Forms.Button()
@@ -234,9 +243,10 @@ Partial Class ucrCalculator
Me.cmdHair = New System.Windows.Forms.Button()
Me.cmdGroup = New System.Windows.Forms.Button()
Me.cmdGrade = New System.Windows.Forms.Button()
- Me.cmdWakefieldHelp = New System.Windows.Forms.Button()
Me.grpMaths = New System.Windows.Forms.GroupBox()
- Me.cmdMathsHelp = New System.Windows.Forms.Button()
+ Me.cmdMathsHelp = New instat.ucrSplitButton()
+ Me.ContextMenuStripMaths = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.MathsStatsStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.cmdAtan2 = New System.Windows.Forms.Button()
Me.cmdLogistic = New System.Windows.Forms.Button()
Me.cmdLogit = New System.Windows.Forms.Button()
@@ -314,6 +324,10 @@ Partial Class ucrCalculator
Me.cmdSum = New System.Windows.Forms.Button()
Me.cmdVar = New System.Windows.Forms.Button()
Me.grpProbabilty = New System.Windows.Forms.GroupBox()
+ Me.cmdProbRHelp = New instat.ucrSplitButton()
+ Me.ContextMenuStripProbability = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.ProbStatsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ProbBaseToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.grpRandom = New System.Windows.Forms.GroupBox()
Me.cmdnbinomial = New System.Windows.Forms.Button()
Me.cmdRan_sample = New System.Windows.Forms.Button()
@@ -325,7 +339,6 @@ Partial Class ucrCalculator
Me.cmduni_integer = New System.Windows.Forms.Button()
Me.cmdRan_normal = New System.Windows.Forms.Button()
Me.cmduniform = New System.Windows.Forms.Button()
- Me.cmdProbRHelp = New System.Windows.Forms.Button()
Me.cmdQnbin = New System.Windows.Forms.Button()
Me.cmdQpois = New System.Windows.Forms.Button()
Me.cmdQbinom = New System.Windows.Forms.Button()
@@ -391,7 +404,10 @@ Partial Class ucrCalculator
Me.cmdLead = New System.Windows.Forms.Button()
Me.cmdLag = New System.Windows.Forms.Button()
Me.grpLogical = New System.Windows.Forms.GroupBox()
- Me.cmdLogicalHelp = New System.Windows.Forms.Button()
+ Me.cmdLogicalHelp = New instat.ucrSplitButton()
+ Me.ContextMenuStripLogical = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.LogBaseToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
+ Me.LogDplyrToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.cmdFalse = New System.Windows.Forms.Button()
Me.cmdTrue = New System.Windows.Forms.Button()
Me.cmdDoubleSqrBrackets = New System.Windows.Forms.Button()
@@ -452,7 +468,9 @@ Partial Class ucrCalculator
Me.cmdLocate = New System.Windows.Forms.Button()
Me.ttCalculator = New System.Windows.Forms.ToolTip(Me.components)
Me.grpCircular = New System.Windows.Forms.GroupBox()
- Me.cmdCircularHelp = New System.Windows.Forms.Button()
+ Me.cmdCircularHelp = New instat.ucrSplitButton()
+ Me.ContextMenuStripCircular = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.CircularToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.cmdCircular = New System.Windows.Forms.Button()
Me.cmdCircQuantile = New System.Windows.Forms.Button()
Me.cmdCircMax = New System.Windows.Forms.Button()
@@ -490,32 +508,76 @@ Partial Class ucrCalculator
Me.cmdEnd1 = New System.Windows.Forms.Button()
Me.cmdbegin = New System.Windows.Forms.Button()
Me.cmdAny1 = New System.Windows.Forms.Button()
- Me.cmdStringRHelp = New System.Windows.Forms.Button()
+ Me.grpComplex = New System.Windows.Forms.GroupBox()
+ Me.cmdComplexRHelp = New instat.ucrSplitButton()
+ Me.cmdComplexTanH = New System.Windows.Forms.Button()
+ Me.cmdComplexTan = New System.Windows.Forms.Button()
+ Me.cmdComplexPi = New System.Windows.Forms.Button()
+ Me.cmdComplexDeg = New System.Windows.Forms.Button()
+ Me.cmdComplexRad = New System.Windows.Forms.Button()
+ Me.cmdComplexSignif = New System.Windows.Forms.Button()
+ Me.cmdComplexCosH = New System.Windows.Forms.Button()
+ Me.cmdComplexSinH = New System.Windows.Forms.Button()
+ Me.cmdComplexCos = New System.Windows.Forms.Button()
+ Me.cmdComplexSin = New System.Windows.Forms.Button()
+ Me.cmdComplexExp = New System.Windows.Forms.Button()
+ Me.cmdComplexRound = New System.Windows.Forms.Button()
+ Me.cmdComplexLog = New System.Windows.Forms.Button()
+ Me.cmdComplexSqrt = New System.Windows.Forms.Button()
+ Me.cmdConjugate = New System.Windows.Forms.Button()
+ Me.cmdArg = New System.Windows.Forms.Button()
+ Me.cmdMod = New System.Windows.Forms.Button()
+ Me.cmdImaginary = New System.Windows.Forms.Button()
+ Me.cmdReal = New System.Windows.Forms.Button()
+ Me.cmdAsComplex = New System.Windows.Forms.Button()
Me.ucrSaveResultInto = New instat.ucrSave()
Me.ucrTryCalculator = New instat.ucrTry()
Me.ucrInputCalOptions = New instat.ucrInputComboBox()
Me.ucrSelectorForCalculations = New instat.ucrSelectorByDataFrameAddRemove()
Me.ucrReceiverForCalculation = New instat.ucrReceiverExpression()
+ Me.cmdStringRHelp = New instat.ucrSplitButton()
+ Me.ContextMenuStripTxtString = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.TxTStringrToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
+ Me.TxTBaseToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
+ Me.cmdWakefieldHelp = New instat.ucrSplitButton()
+ Me.ContextMenuStripWakefield = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.WakefieldToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ContextMenuStripList = New System.Windows.Forms.ContextMenuStrip(Me.components)
+ Me.ListBaseToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ListStatsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ListStatipToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.grpBasic.SuspendLayout()
Me.grpDates.SuspendLayout()
+ Me.ContextMenuStripDate.SuspendLayout()
+ Me.ContextMenuStripComplex.SuspendLayout()
Me.grpInteger.SuspendLayout()
Me.ContextMenuStripInteger.SuspendLayout()
Me.grpFactor.SuspendLayout()
+ Me.ContextMenuStripFactor.SuspendLayout()
Me.grpHydroGOF.SuspendLayout()
+ Me.ContextMenuStripHydroGOF.SuspendLayout()
Me.grpWakefield.SuspendLayout()
Me.grpMaths.SuspendLayout()
+ Me.ContextMenuStripMaths.SuspendLayout()
Me.grpSummary.SuspendLayout()
Me.ContextMenuStripSummary.SuspendLayout()
Me.grpFrequencies.SuspendLayout()
Me.grpProbabilty.SuspendLayout()
+ Me.ContextMenuStripProbability.SuspendLayout()
Me.grpRandom.SuspendLayout()
Me.grpTransform.SuspendLayout()
Me.ContextMenuStripTransform.SuspendLayout()
Me.grpLogical.SuspendLayout()
+ Me.ContextMenuStripLogical.SuspendLayout()
Me.grpTestString.SuspendLayout()
Me.grpCircular.SuspendLayout()
+ Me.ContextMenuStripCircular.SuspendLayout()
Me.grpModifier.SuspendLayout()
Me.grpSymbols.SuspendLayout()
+ Me.grpComplex.SuspendLayout()
+ Me.ContextMenuStripTxtString.SuspendLayout()
+ Me.ContextMenuStripWakefield.SuspendLayout()
+ Me.ContextMenuStripList.SuspendLayout()
Me.SuspendLayout()
'
'lblExpression
@@ -530,16 +592,6 @@ Partial Class ucrCalculator
Me.lblExpression.Tag = "Expression"
Me.lblExpression.Text = "Expression:"
'
- 'cmdRHelp
- '
- Me.cmdRHelp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdRHelp.Location = New System.Drawing.Point(166, 137)
- Me.cmdRHelp.Name = "cmdRHelp"
- Me.cmdRHelp.Size = New System.Drawing.Size(75, 23)
- Me.cmdRHelp.TabIndex = 182
- Me.cmdRHelp.Text = "R Help"
- Me.cmdRHelp.UseVisualStyleBackColor = True
- '
'chkShowParameters
'
Me.chkShowParameters.AutoSize = True
@@ -799,6 +851,7 @@ Partial Class ucrCalculator
'
'grpDates
'
+ Me.grpDates.Controls.Add(Me.cmdRHelp)
Me.grpDates.Controls.Add(Me.cmdPm)
Me.grpDates.Controls.Add(Me.cmdTime)
Me.grpDates.Controls.Add(Me.cmdDateTime)
@@ -814,7 +867,6 @@ Partial Class ucrCalculator
Me.grpDates.Controls.Add(Me.cmdYear)
Me.grpDates.Controls.Add(Me.cmdDate)
Me.grpDates.Controls.Add(Me.cmdYday)
- Me.grpDates.Controls.Add(Me.cmdRHelp)
Me.grpDates.Controls.Add(Me.cmdWday)
Me.grpDates.Controls.Add(Me.cmdMdy)
Me.grpDates.Controls.Add(Me.cmdYmd)
@@ -827,6 +879,36 @@ Partial Class ucrCalculator
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(148, 135)
+ Me.cmdRHelp.Name = "cmdRHelp"
+ Me.cmdRHelp.Size = New System.Drawing.Size(91, 23)
+ Me.cmdRHelp.SplitMenuStrip = Me.ContextMenuStripDate
+ Me.cmdRHelp.TabIndex = 212
+ Me.cmdRHelp.Text = "R Help"
+ Me.cmdRHelp.UseVisualStyleBackColor = True
+ '
+ 'ContextMenuStripDate
+ '
+ Me.ContextMenuStripDate.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateLubridateToolStripMenuItem, Me.DateHmsToolStripMenuItem})
+ Me.ContextMenuStripDate.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripDate.Size = New System.Drawing.Size(122, 48)
+ '
+ 'DateLubridateToolStripMenuItem
+ '
+ Me.DateLubridateToolStripMenuItem.Name = "DateLubridateToolStripMenuItem"
+ Me.DateLubridateToolStripMenuItem.Size = New System.Drawing.Size(121, 22)
+ Me.DateLubridateToolStripMenuItem.Text = "lubridate"
+ '
+ 'DateHmsToolStripMenuItem
+ '
+ Me.DateHmsToolStripMenuItem.Name = "DateHmsToolStripMenuItem"
+ Me.DateHmsToolStripMenuItem.Size = New System.Drawing.Size(121, 22)
+ Me.DateHmsToolStripMenuItem.Text = "hms"
+ '
'cmdPm
'
Me.cmdPm.ImeMode = System.Windows.Forms.ImeMode.NoControl
@@ -1031,6 +1113,18 @@ Partial Class ucrCalculator
Me.cmdLeap.Text = "leap"
Me.cmdLeap.UseVisualStyleBackColor = True
'
+ 'ContextMenuStripComplex
+ '
+ Me.ContextMenuStripComplex.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ComplexBaseToolStripMenuItem})
+ Me.ContextMenuStripComplex.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripComplex.Size = New System.Drawing.Size(99, 26)
+ '
+ 'ComplexBaseToolStripMenuItem
+ '
+ Me.ComplexBaseToolStripMenuItem.Name = "ComplexBaseToolStripMenuItem"
+ Me.ComplexBaseToolStripMenuItem.Size = New System.Drawing.Size(98, 22)
+ Me.ComplexBaseToolStripMenuItem.Text = "base"
+ '
'grpInteger
'
Me.grpInteger.Controls.Add(Me.cmdLucas)
@@ -1575,21 +1669,35 @@ Partial Class ucrCalculator
Me.grpFactor.Margin = New System.Windows.Forms.Padding(2)
Me.grpFactor.Name = "grpFactor"
Me.grpFactor.Padding = New System.Windows.Forms.Padding(2)
- Me.grpFactor.Size = New System.Drawing.Size(248, 199)
+ Me.grpFactor.Size = New System.Drawing.Size(248, 208)
Me.grpFactor.TabIndex = 191
Me.grpFactor.TabStop = False
Me.grpFactor.Text = "Factor"
'
'cmdTransformHelp
'
- Me.cmdTransformHelp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdTransformHelp.Location = New System.Drawing.Point(167, 174)
+ Me.cmdTransformHelp.AutoSize = True
+ Me.cmdTransformHelp.ContextMenuStrip = Me.ContextMenuStripFactor
+ Me.cmdTransformHelp.Location = New System.Drawing.Point(151, 175)
Me.cmdTransformHelp.Name = "cmdTransformHelp"
- Me.cmdTransformHelp.Size = New System.Drawing.Size(75, 23)
- Me.cmdTransformHelp.TabIndex = 211
+ Me.cmdTransformHelp.Size = New System.Drawing.Size(91, 23)
+ Me.cmdTransformHelp.SplitMenuStrip = Me.ContextMenuStripFactor
+ Me.cmdTransformHelp.TabIndex = 212
Me.cmdTransformHelp.Text = "R Help"
Me.cmdTransformHelp.UseVisualStyleBackColor = True
'
+ 'ContextMenuStripFactor
+ '
+ Me.ContextMenuStripFactor.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FactorForcatsToolStripMenuItem})
+ Me.ContextMenuStripFactor.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripFactor.Size = New System.Drawing.Size(111, 26)
+ '
+ 'FactorForcatsToolStripMenuItem
+ '
+ Me.FactorForcatsToolStripMenuItem.Name = "FactorForcatsToolStripMenuItem"
+ Me.FactorForcatsToolStripMenuItem.Size = New System.Drawing.Size(110, 22)
+ Me.FactorForcatsToolStripMenuItem.Text = "forcats"
+ '
'cmdShuffle
'
Me.cmdShuffle.ImeMode = System.Windows.Forms.ImeMode.NoControl
@@ -1838,21 +1946,35 @@ Partial Class ucrCalculator
Me.grpHydroGOF.Margin = New System.Windows.Forms.Padding(2)
Me.grpHydroGOF.Name = "grpHydroGOF"
Me.grpHydroGOF.Padding = New System.Windows.Forms.Padding(2)
- Me.grpHydroGOF.Size = New System.Drawing.Size(183, 260)
+ Me.grpHydroGOF.Size = New System.Drawing.Size(183, 269)
Me.grpHydroGOF.TabIndex = 195
Me.grpHydroGOF.TabStop = False
Me.grpHydroGOF.Text = "hydroGOF "
'
'cmdHydroHelp
'
- Me.cmdHydroHelp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdHydroHelp.Location = New System.Drawing.Point(105, 237)
+ Me.cmdHydroHelp.AutoSize = True
+ Me.cmdHydroHelp.ContextMenuStrip = Me.ContextMenuStripHydroGOF
+ Me.cmdHydroHelp.Location = New System.Drawing.Point(111, 239)
Me.cmdHydroHelp.Name = "cmdHydroHelp"
- Me.cmdHydroHelp.Size = New System.Drawing.Size(75, 23)
- Me.cmdHydroHelp.TabIndex = 183
+ Me.cmdHydroHelp.Size = New System.Drawing.Size(68, 23)
+ Me.cmdHydroHelp.SplitMenuStrip = Me.ContextMenuStripHydroGOF
+ Me.cmdHydroHelp.TabIndex = 212
Me.cmdHydroHelp.Text = "R Help"
Me.cmdHydroHelp.UseVisualStyleBackColor = True
'
+ 'ContextMenuStripHydroGOF
+ '
+ Me.ContextMenuStripHydroGOF.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.HydroGOFToolStripMenuItem})
+ Me.ContextMenuStripHydroGOF.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripHydroGOF.Size = New System.Drawing.Size(129, 26)
+ '
+ 'HydroGOFToolStripMenuItem
+ '
+ Me.HydroGOFToolStripMenuItem.Name = "HydroGOFToolStripMenuItem"
+ Me.HydroGOFToolStripMenuItem.Size = New System.Drawing.Size(128, 22)
+ Me.HydroGOFToolStripMenuItem.Text = "hydroGOF"
+ '
'cmdVE
'
Me.cmdVE.ImeMode = System.Windows.Forms.ImeMode.NoControl
@@ -2753,16 +2875,6 @@ Partial Class ucrCalculator
Me.cmdGrade.Text = "grade"
Me.cmdGrade.UseVisualStyleBackColor = True
'
- 'cmdWakefieldHelp
- '
- Me.cmdWakefieldHelp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdWakefieldHelp.Location = New System.Drawing.Point(782, 39)
- Me.cmdWakefieldHelp.Name = "cmdWakefieldHelp"
- Me.cmdWakefieldHelp.Size = New System.Drawing.Size(75, 23)
- Me.cmdWakefieldHelp.TabIndex = 183
- Me.cmdWakefieldHelp.Text = "R Help"
- Me.cmdWakefieldHelp.UseVisualStyleBackColor = True
- '
'grpMaths
'
Me.grpMaths.Controls.Add(Me.cmdMathsHelp)
@@ -2800,14 +2912,28 @@ Partial Class ucrCalculator
'
'cmdMathsHelp
'
- Me.cmdMathsHelp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdMathsHelp.Location = New System.Drawing.Point(179, 136)
+ Me.cmdMathsHelp.AutoSize = True
+ Me.cmdMathsHelp.ContextMenuStrip = Me.ContextMenuStripMaths
+ Me.cmdMathsHelp.Location = New System.Drawing.Point(176, 132)
Me.cmdMathsHelp.Name = "cmdMathsHelp"
- Me.cmdMathsHelp.Size = New System.Drawing.Size(75, 23)
- Me.cmdMathsHelp.TabIndex = 183
+ Me.cmdMathsHelp.Size = New System.Drawing.Size(77, 23)
+ Me.cmdMathsHelp.SplitMenuStrip = Me.ContextMenuStripMaths
+ Me.cmdMathsHelp.TabIndex = 211
Me.cmdMathsHelp.Text = "R Help"
Me.cmdMathsHelp.UseVisualStyleBackColor = True
'
+ 'ContextMenuStripMaths
+ '
+ Me.ContextMenuStripMaths.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MathsStatsStripMenuItem})
+ Me.ContextMenuStripMaths.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripMaths.Size = New System.Drawing.Size(99, 26)
+ '
+ 'MathsStatsStripMenuItem
+ '
+ Me.MathsStatsStripMenuItem.Name = "MathsStatsStripMenuItem"
+ Me.MathsStatsStripMenuItem.Size = New System.Drawing.Size(98, 22)
+ Me.MathsStatsStripMenuItem.Text = "stats"
+ '
'cmdAtan2
'
Me.cmdAtan2.ImeMode = System.Windows.Forms.ImeMode.NoControl
@@ -3686,8 +3812,8 @@ Partial Class ucrCalculator
'
'grpProbabilty
'
- Me.grpProbabilty.Controls.Add(Me.grpRandom)
Me.grpProbabilty.Controls.Add(Me.cmdProbRHelp)
+ Me.grpProbabilty.Controls.Add(Me.grpRandom)
Me.grpProbabilty.Controls.Add(Me.cmdQnbin)
Me.grpProbabilty.Controls.Add(Me.cmdQpois)
Me.grpProbabilty.Controls.Add(Me.cmdQbinom)
@@ -3725,6 +3851,36 @@ Partial Class ucrCalculator
Me.grpProbabilty.TabStop = False
Me.grpProbabilty.Text = "Probability"
'
+ 'cmdProbRHelp
+ '
+ Me.cmdProbRHelp.AutoSize = True
+ Me.cmdProbRHelp.ContextMenuStrip = Me.ContextMenuStripProbability
+ Me.cmdProbRHelp.Location = New System.Drawing.Point(240, 190)
+ Me.cmdProbRHelp.Name = "cmdProbRHelp"
+ Me.cmdProbRHelp.Size = New System.Drawing.Size(68, 23)
+ Me.cmdProbRHelp.SplitMenuStrip = Me.ContextMenuStripProbability
+ Me.cmdProbRHelp.TabIndex = 212
+ Me.cmdProbRHelp.Text = "R Help"
+ Me.cmdProbRHelp.UseVisualStyleBackColor = True
+ '
+ 'ContextMenuStripProbability
+ '
+ Me.ContextMenuStripProbability.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ProbStatsToolStripMenuItem, Me.ProbBaseToolStripMenuItem})
+ Me.ContextMenuStripProbability.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripProbability.Size = New System.Drawing.Size(99, 48)
+ '
+ 'ProbStatsToolStripMenuItem
+ '
+ Me.ProbStatsToolStripMenuItem.Name = "ProbStatsToolStripMenuItem"
+ Me.ProbStatsToolStripMenuItem.Size = New System.Drawing.Size(98, 22)
+ Me.ProbStatsToolStripMenuItem.Text = "stats"
+ '
+ 'ProbBaseToolStripMenuItem
+ '
+ Me.ProbBaseToolStripMenuItem.Name = "ProbBaseToolStripMenuItem"
+ Me.ProbBaseToolStripMenuItem.Size = New System.Drawing.Size(98, 22)
+ Me.ProbBaseToolStripMenuItem.Text = "base"
+ '
'grpRandom
'
Me.grpRandom.Controls.Add(Me.cmdnbinomial)
@@ -3864,16 +4020,6 @@ Partial Class ucrCalculator
Me.cmduniform.Text = "uniform"
Me.cmduniform.UseVisualStyleBackColor = True
'
- 'cmdProbRHelp
- '
- Me.cmdProbRHelp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdProbRHelp.Location = New System.Drawing.Point(233, 189)
- Me.cmdProbRHelp.Name = "cmdProbRHelp"
- Me.cmdProbRHelp.Size = New System.Drawing.Size(75, 23)
- Me.cmdProbRHelp.TabIndex = 198
- Me.cmdProbRHelp.Text = "R Help"
- Me.cmdProbRHelp.UseVisualStyleBackColor = True
- '
'cmdQnbin
'
Me.cmdQnbin.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
@@ -4628,25 +4774,45 @@ Partial Class ucrCalculator
Me.grpLogical.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.grpLogical.Name = "grpLogical"
Me.grpLogical.Padding = New System.Windows.Forms.Padding(2, 3, 2, 3)
- Me.grpLogical.Size = New System.Drawing.Size(253, 213)
+ Me.grpLogical.Size = New System.Drawing.Size(258, 213)
Me.grpLogical.TabIndex = 183
Me.grpLogical.TabStop = False
Me.grpLogical.Text = "Logical and Symbols"
'
'cmdLogicalHelp
'
- Me.cmdLogicalHelp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdLogicalHelp.Location = New System.Drawing.Point(173, 187)
+ Me.cmdLogicalHelp.AutoSize = True
+ Me.cmdLogicalHelp.ContextMenuStrip = Me.ContextMenuStripLogical
+ Me.cmdLogicalHelp.Location = New System.Drawing.Point(186, 187)
Me.cmdLogicalHelp.Name = "cmdLogicalHelp"
- Me.cmdLogicalHelp.Size = New System.Drawing.Size(75, 23)
- Me.cmdLogicalHelp.TabIndex = 208
+ Me.cmdLogicalHelp.Size = New System.Drawing.Size(68, 23)
+ Me.cmdLogicalHelp.SplitMenuStrip = Me.ContextMenuStripLogical
+ Me.cmdLogicalHelp.TabIndex = 212
Me.cmdLogicalHelp.Text = "R Help"
Me.cmdLogicalHelp.UseVisualStyleBackColor = True
'
+ 'ContextMenuStripLogical
+ '
+ Me.ContextMenuStripLogical.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.LogBaseToolStripMenuItem, Me.LogDplyrToolStripMenuItem})
+ Me.ContextMenuStripLogical.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripLogical.Size = New System.Drawing.Size(102, 48)
+ '
+ 'LogBaseToolStripMenuItem
+ '
+ Me.LogBaseToolStripMenuItem.Name = "LogBaseToolStripMenuItem"
+ Me.LogBaseToolStripMenuItem.Size = New System.Drawing.Size(101, 22)
+ Me.LogBaseToolStripMenuItem.Text = "base"
+ '
+ 'LogDplyrToolStripMenuItem
+ '
+ Me.LogDplyrToolStripMenuItem.Name = "LogDplyrToolStripMenuItem"
+ Me.LogDplyrToolStripMenuItem.Size = New System.Drawing.Size(101, 22)
+ Me.LogDplyrToolStripMenuItem.Text = "dplyr"
+ '
'cmdFalse
'
Me.cmdFalse.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdFalse.Location = New System.Drawing.Point(152, 42)
+ Me.cmdFalse.Location = New System.Drawing.Point(202, 42)
Me.cmdFalse.Name = "cmdFalse"
Me.cmdFalse.Size = New System.Drawing.Size(52, 30)
Me.cmdFalse.TabIndex = 207
@@ -4656,7 +4822,7 @@ Partial Class ucrCalculator
'cmdTrue
'
Me.cmdTrue.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdTrue.Location = New System.Drawing.Point(152, 13)
+ Me.cmdTrue.Location = New System.Drawing.Point(202, 13)
Me.cmdTrue.Name = "cmdTrue"
Me.cmdTrue.Size = New System.Drawing.Size(52, 30)
Me.cmdTrue.TabIndex = 206
@@ -4666,10 +4832,10 @@ Partial Class ucrCalculator
'cmdDoubleSqrBrackets
'
Me.cmdDoubleSqrBrackets.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdDoubleSqrBrackets.Location = New System.Drawing.Point(118, 71)
+ Me.cmdDoubleSqrBrackets.Location = New System.Drawing.Point(128, 71)
Me.cmdDoubleSqrBrackets.Margin = New System.Windows.Forms.Padding(2)
Me.cmdDoubleSqrBrackets.Name = "cmdDoubleSqrBrackets"
- Me.cmdDoubleSqrBrackets.Size = New System.Drawing.Size(50, 30)
+ Me.cmdDoubleSqrBrackets.Size = New System.Drawing.Size(36, 30)
Me.cmdDoubleSqrBrackets.TabIndex = 205
Me.cmdDoubleSqrBrackets.Text = "[[ ]]"
Me.cmdDoubleSqrBrackets.UseVisualStyleBackColor = True
@@ -4677,10 +4843,10 @@ Partial Class ucrCalculator
'cmdIn
'
Me.cmdIn.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdIn.Location = New System.Drawing.Point(78, 100)
+ Me.cmdIn.Location = New System.Drawing.Point(128, 100)
Me.cmdIn.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdIn.Name = "cmdIn"
- Me.cmdIn.Size = New System.Drawing.Size(45, 30)
+ Me.cmdIn.Size = New System.Drawing.Size(65, 30)
Me.cmdIn.TabIndex = 204
Me.cmdIn.Text = "%in%"
Me.cmdIn.UseVisualStyleBackColor = True
@@ -4688,9 +4854,9 @@ Partial Class ucrCalculator
'cmdWhich
'
Me.cmdWhich.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdWhich.Location = New System.Drawing.Point(196, 100)
+ Me.cmdWhich.Location = New System.Drawing.Point(192, 100)
Me.cmdWhich.Name = "cmdWhich"
- Me.cmdWhich.Size = New System.Drawing.Size(52, 30)
+ Me.cmdWhich.Size = New System.Drawing.Size(62, 30)
Me.cmdWhich.TabIndex = 203
Me.cmdWhich.Text = "which"
Me.cmdWhich.UseVisualStyleBackColor = True
@@ -4698,10 +4864,10 @@ Partial Class ucrCalculator
'cmdNA
'
Me.cmdNA.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdNA.Location = New System.Drawing.Point(159, 100)
+ Me.cmdNA.Location = New System.Drawing.Point(163, 42)
Me.cmdNA.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdNA.Name = "cmdNA"
- Me.cmdNA.Size = New System.Drawing.Size(38, 30)
+ Me.cmdNA.Size = New System.Drawing.Size(40, 30)
Me.cmdNA.TabIndex = 202
Me.cmdNA.Text = "NA"
Me.cmdNA.UseVisualStyleBackColor = True
@@ -4709,7 +4875,7 @@ Partial Class ucrCalculator
'cmdNear
'
Me.cmdNear.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdNear.Location = New System.Drawing.Point(186, 158)
+ Me.cmdNear.Location = New System.Drawing.Point(192, 158)
Me.cmdNear.Name = "cmdNear"
Me.cmdNear.Size = New System.Drawing.Size(62, 30)
Me.cmdNear.TabIndex = 201
@@ -4719,7 +4885,7 @@ Partial Class ucrCalculator
'cmdBetween
'
Me.cmdBetween.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdBetween.Location = New System.Drawing.Point(186, 129)
+ Me.cmdBetween.Location = New System.Drawing.Point(192, 129)
Me.cmdBetween.Name = "cmdBetween"
Me.cmdBetween.Size = New System.Drawing.Size(62, 30)
Me.cmdBetween.TabIndex = 200
@@ -4741,7 +4907,7 @@ Partial Class ucrCalculator
Me.cmdNotIsNa.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.cmdNotIsNa.Location = New System.Drawing.Point(65, 158)
Me.cmdNotIsNa.Name = "cmdNotIsNa"
- Me.cmdNotIsNa.Size = New System.Drawing.Size(58, 30)
+ Me.cmdNotIsNa.Size = New System.Drawing.Size(63, 30)
Me.cmdNotIsNa.TabIndex = 194
Me.cmdNotIsNa.Text = "!is.na"
Me.cmdNotIsNa.UseVisualStyleBackColor = True
@@ -4749,7 +4915,7 @@ Partial Class ucrCalculator
'cmdDuplicate
'
Me.cmdDuplicate.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdDuplicate.Location = New System.Drawing.Point(122, 158)
+ Me.cmdDuplicate.Location = New System.Drawing.Point(128, 158)
Me.cmdDuplicate.Name = "cmdDuplicate"
Me.cmdDuplicate.Size = New System.Drawing.Size(65, 30)
Me.cmdDuplicate.TabIndex = 193
@@ -4771,7 +4937,7 @@ Partial Class ucrCalculator
Me.cmdmatch.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.cmdmatch.Location = New System.Drawing.Point(65, 129)
Me.cmdmatch.Name = "cmdmatch"
- Me.cmdmatch.Size = New System.Drawing.Size(58, 30)
+ Me.cmdmatch.Size = New System.Drawing.Size(63, 30)
Me.cmdmatch.TabIndex = 191
Me.cmdmatch.Text = "match"
Me.cmdmatch.UseVisualStyleBackColor = True
@@ -4779,7 +4945,7 @@ Partial Class ucrCalculator
'cmdwhen
'
Me.cmdwhen.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdwhen.Location = New System.Drawing.Point(122, 129)
+ Me.cmdwhen.Location = New System.Drawing.Point(128, 129)
Me.cmdwhen.Name = "cmdwhen"
Me.cmdwhen.Size = New System.Drawing.Size(65, 30)
Me.cmdwhen.TabIndex = 190
@@ -4789,7 +4955,7 @@ Partial Class ucrCalculator
'cmdOpeningBracket
'
Me.cmdOpeningBracket.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdOpeningBracket.Location = New System.Drawing.Point(167, 71)
+ Me.cmdOpeningBracket.Location = New System.Drawing.Point(163, 71)
Me.cmdOpeningBracket.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdOpeningBracket.Name = "cmdOpeningBracket"
Me.cmdOpeningBracket.Size = New System.Drawing.Size(40, 30)
@@ -4801,10 +4967,10 @@ Partial Class ucrCalculator
'
Me.cmdColon.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!)
Me.cmdColon.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdColon.Location = New System.Drawing.Point(41, 71)
+ Me.cmdColon.Location = New System.Drawing.Point(43, 71)
Me.cmdColon.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdColon.Name = "cmdColon"
- Me.cmdColon.Size = New System.Drawing.Size(38, 30)
+ Me.cmdColon.Size = New System.Drawing.Size(40, 30)
Me.cmdColon.TabIndex = 139
Me.cmdColon.Text = ":"
Me.cmdColon.UseVisualStyleBackColor = True
@@ -4812,10 +4978,10 @@ Partial Class ucrCalculator
'cmdGreaterOrEqualsTo
'
Me.cmdGreaterOrEqualsTo.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdGreaterOrEqualsTo.Location = New System.Drawing.Point(115, 13)
+ Me.cmdGreaterOrEqualsTo.Location = New System.Drawing.Point(128, 13)
Me.cmdGreaterOrEqualsTo.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdGreaterOrEqualsTo.Name = "cmdGreaterOrEqualsTo"
- Me.cmdGreaterOrEqualsTo.Size = New System.Drawing.Size(38, 30)
+ Me.cmdGreaterOrEqualsTo.Size = New System.Drawing.Size(36, 30)
Me.cmdGreaterOrEqualsTo.TabIndex = 138
Me.cmdGreaterOrEqualsTo.Text = ">="
Me.cmdGreaterOrEqualsTo.UseVisualStyleBackColor = True
@@ -4823,10 +4989,10 @@ Partial Class ucrCalculator
'cmdClossingBracket
'
Me.cmdClossingBracket.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdClossingBracket.Location = New System.Drawing.Point(206, 71)
+ Me.cmdClossingBracket.Location = New System.Drawing.Point(202, 71)
Me.cmdClossingBracket.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdClossingBracket.Name = "cmdClossingBracket"
- Me.cmdClossingBracket.Size = New System.Drawing.Size(42, 30)
+ Me.cmdClossingBracket.Size = New System.Drawing.Size(52, 30)
Me.cmdClossingBracket.TabIndex = 137
Me.cmdClossingBracket.Tag = ""
Me.cmdClossingBracket.Text = ")"
@@ -4836,10 +5002,10 @@ Partial Class ucrCalculator
'
Me.cmdAnd.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!)
Me.cmdAnd.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdAnd.Location = New System.Drawing.Point(115, 42)
+ Me.cmdAnd.Location = New System.Drawing.Point(128, 42)
Me.cmdAnd.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdAnd.Name = "cmdAnd"
- Me.cmdAnd.Size = New System.Drawing.Size(38, 30)
+ Me.cmdAnd.Size = New System.Drawing.Size(36, 30)
Me.cmdAnd.TabIndex = 137
Me.cmdAnd.Tag = "And"
Me.cmdAnd.Text = "&&"
@@ -4849,10 +5015,10 @@ Partial Class ucrCalculator
'
Me.cmdQuotes.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.cmdQuotes.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdQuotes.Location = New System.Drawing.Point(122, 100)
+ Me.cmdQuotes.Location = New System.Drawing.Point(163, 13)
Me.cmdQuotes.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdQuotes.Name = "cmdQuotes"
- Me.cmdQuotes.Size = New System.Drawing.Size(38, 30)
+ Me.cmdQuotes.Size = New System.Drawing.Size(40, 30)
Me.cmdQuotes.TabIndex = 135
Me.cmdQuotes.Text = """ """
Me.cmdQuotes.UseVisualStyleBackColor = True
@@ -4860,10 +5026,10 @@ Partial Class ucrCalculator
'cmdSquareBrackets
'
Me.cmdSquareBrackets.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdSquareBrackets.Location = New System.Drawing.Point(78, 71)
+ Me.cmdSquareBrackets.Location = New System.Drawing.Point(82, 71)
Me.cmdSquareBrackets.Margin = New System.Windows.Forms.Padding(2)
Me.cmdSquareBrackets.Name = "cmdSquareBrackets"
- Me.cmdSquareBrackets.Size = New System.Drawing.Size(42, 30)
+ Me.cmdSquareBrackets.Size = New System.Drawing.Size(46, 30)
Me.cmdSquareBrackets.TabIndex = 134
Me.cmdSquareBrackets.Text = "[ ]"
Me.cmdSquareBrackets.UseVisualStyleBackColor = True
@@ -4871,12 +5037,12 @@ Partial Class ucrCalculator
'cmdIntegerDivision
'
Me.cmdIntegerDivision.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdIntegerDivision.Location = New System.Drawing.Point(41, 100)
+ Me.cmdIntegerDivision.Location = New System.Drawing.Point(65, 100)
Me.cmdIntegerDivision.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdIntegerDivision.Name = "cmdIntegerDivision"
- Me.cmdIntegerDivision.Size = New System.Drawing.Size(38, 30)
+ Me.cmdIntegerDivision.Size = New System.Drawing.Size(63, 30)
Me.cmdIntegerDivision.TabIndex = 135
- Me.cmdIntegerDivision.Text = "%/%"
+ Me.cmdIntegerDivision.Text = "div (%/%)"
Me.cmdIntegerDivision.UseVisualStyleBackColor = True
'
'cmdModulas
@@ -4885,18 +5051,18 @@ Partial Class ucrCalculator
Me.cmdModulas.Location = New System.Drawing.Point(4, 100)
Me.cmdModulas.Margin = New System.Windows.Forms.Padding(2)
Me.cmdModulas.Name = "cmdModulas"
- Me.cmdModulas.Size = New System.Drawing.Size(38, 30)
+ Me.cmdModulas.Size = New System.Drawing.Size(62, 30)
Me.cmdModulas.TabIndex = 134
- Me.cmdModulas.Text = "%%"
+ Me.cmdModulas.Text = "mod (%%)"
Me.cmdModulas.UseVisualStyleBackColor = True
'
'cmdGreater
'
Me.cmdGreater.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdGreater.Location = New System.Drawing.Point(78, 13)
+ Me.cmdGreater.Location = New System.Drawing.Point(82, 13)
Me.cmdGreater.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdGreater.Name = "cmdGreater"
- Me.cmdGreater.Size = New System.Drawing.Size(38, 30)
+ Me.cmdGreater.Size = New System.Drawing.Size(46, 30)
Me.cmdGreater.TabIndex = 133
Me.cmdGreater.Text = ">"
Me.cmdGreater.UseVisualStyleBackColor = True
@@ -4904,10 +5070,10 @@ Partial Class ucrCalculator
'cmdLesserOrEqualsTo
'
Me.cmdLesserOrEqualsTo.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdLesserOrEqualsTo.Location = New System.Drawing.Point(41, 13)
+ Me.cmdLesserOrEqualsTo.Location = New System.Drawing.Point(43, 13)
Me.cmdLesserOrEqualsTo.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdLesserOrEqualsTo.Name = "cmdLesserOrEqualsTo"
- Me.cmdLesserOrEqualsTo.Size = New System.Drawing.Size(38, 30)
+ Me.cmdLesserOrEqualsTo.Size = New System.Drawing.Size(40, 30)
Me.cmdLesserOrEqualsTo.TabIndex = 132
Me.cmdLesserOrEqualsTo.Text = "<="
Me.cmdLesserOrEqualsTo.UseVisualStyleBackColor = True
@@ -4918,7 +5084,7 @@ Partial Class ucrCalculator
Me.cmdLesser.Location = New System.Drawing.Point(4, 13)
Me.cmdLesser.Margin = New System.Windows.Forms.Padding(2)
Me.cmdLesser.Name = "cmdLesser"
- Me.cmdLesser.Size = New System.Drawing.Size(38, 30)
+ Me.cmdLesser.Size = New System.Drawing.Size(39, 30)
Me.cmdLesser.TabIndex = 131
Me.cmdLesser.Text = "<"
Me.cmdLesser.UseVisualStyleBackColor = True
@@ -4926,10 +5092,10 @@ Partial Class ucrCalculator
'cmdOr
'
Me.cmdOr.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdOr.Location = New System.Drawing.Point(78, 42)
+ Me.cmdOr.Location = New System.Drawing.Point(82, 42)
Me.cmdOr.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdOr.Name = "cmdOr"
- Me.cmdOr.Size = New System.Drawing.Size(38, 30)
+ Me.cmdOr.Size = New System.Drawing.Size(46, 30)
Me.cmdOr.TabIndex = 130
Me.cmdOr.Text = "|"
Me.cmdOr.UseVisualStyleBackColor = True
@@ -4941,7 +5107,7 @@ Partial Class ucrCalculator
Me.cmdNot.Location = New System.Drawing.Point(4, 71)
Me.cmdNot.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdNot.Name = "cmdNot"
- Me.cmdNot.Size = New System.Drawing.Size(38, 30)
+ Me.cmdNot.Size = New System.Drawing.Size(39, 30)
Me.cmdNot.TabIndex = 129
Me.cmdNot.Text = "!"
Me.cmdNot.UseVisualStyleBackColor = True
@@ -4949,10 +5115,10 @@ Partial Class ucrCalculator
'cmdNotEqualsTo
'
Me.cmdNotEqualsTo.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdNotEqualsTo.Location = New System.Drawing.Point(41, 42)
+ Me.cmdNotEqualsTo.Location = New System.Drawing.Point(43, 42)
Me.cmdNotEqualsTo.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.cmdNotEqualsTo.Name = "cmdNotEqualsTo"
- Me.cmdNotEqualsTo.Size = New System.Drawing.Size(38, 30)
+ Me.cmdNotEqualsTo.Size = New System.Drawing.Size(40, 30)
Me.cmdNotEqualsTo.TabIndex = 128
Me.cmdNotEqualsTo.Text = "!="
Me.cmdNotEqualsTo.UseVisualStyleBackColor = True
@@ -4963,7 +5129,7 @@ Partial Class ucrCalculator
Me.cmdEquivalent.Location = New System.Drawing.Point(4, 42)
Me.cmdEquivalent.Margin = New System.Windows.Forms.Padding(2)
Me.cmdEquivalent.Name = "cmdEquivalent"
- Me.cmdEquivalent.Size = New System.Drawing.Size(38, 30)
+ Me.cmdEquivalent.Size = New System.Drawing.Size(39, 30)
Me.cmdEquivalent.TabIndex = 127
Me.cmdEquivalent.Text = "=="
Me.cmdEquivalent.UseVisualStyleBackColor = True
@@ -5366,21 +5532,35 @@ Partial Class ucrCalculator
Me.grpCircular.Margin = New System.Windows.Forms.Padding(2)
Me.grpCircular.Name = "grpCircular"
Me.grpCircular.Padding = New System.Windows.Forms.Padding(2)
- Me.grpCircular.Size = New System.Drawing.Size(242, 168)
+ Me.grpCircular.Size = New System.Drawing.Size(248, 168)
Me.grpCircular.TabIndex = 192
Me.grpCircular.TabStop = False
Me.grpCircular.Text = "Circular"
'
'cmdCircularHelp
'
- Me.cmdCircularHelp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdCircularHelp.Location = New System.Drawing.Point(165, 142)
+ Me.cmdCircularHelp.AutoSize = True
+ Me.cmdCircularHelp.ContextMenuStrip = Me.ContextMenuStripCircular
+ Me.cmdCircularHelp.Location = New System.Drawing.Point(174, 142)
Me.cmdCircularHelp.Name = "cmdCircularHelp"
- Me.cmdCircularHelp.Size = New System.Drawing.Size(75, 23)
- Me.cmdCircularHelp.TabIndex = 183
+ Me.cmdCircularHelp.Size = New System.Drawing.Size(70, 23)
+ Me.cmdCircularHelp.SplitMenuStrip = Me.ContextMenuStripCircular
+ Me.cmdCircularHelp.TabIndex = 212
Me.cmdCircularHelp.Text = "R Help"
Me.cmdCircularHelp.UseVisualStyleBackColor = True
'
+ 'ContextMenuStripCircular
+ '
+ Me.ContextMenuStripCircular.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.CircularToolStripMenuItem})
+ Me.ContextMenuStripCircular.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripCircular.Size = New System.Drawing.Size(114, 26)
+ '
+ 'CircularToolStripMenuItem
+ '
+ Me.CircularToolStripMenuItem.Name = "CircularToolStripMenuItem"
+ Me.CircularToolStripMenuItem.Size = New System.Drawing.Size(113, 22)
+ Me.CircularToolStripMenuItem.Text = "circular"
+ '
'cmdCircular
'
Me.cmdCircular.ImeMode = System.Windows.Forms.ImeMode.NoControl
@@ -5409,7 +5589,7 @@ Partial Class ucrCalculator
Me.cmdCircMax.Location = New System.Drawing.Point(179, 111)
Me.cmdCircMax.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircMax.Name = "cmdCircMax"
- Me.cmdCircMax.Size = New System.Drawing.Size(60, 32)
+ Me.cmdCircMax.Size = New System.Drawing.Size(65, 32)
Me.cmdCircMax.TabIndex = 10
Me.cmdCircMax.Text = "max"
Me.cmdCircMax.UseVisualStyleBackColor = True
@@ -5442,7 +5622,7 @@ Partial Class ucrCalculator
Me.cmdCircRho.Location = New System.Drawing.Point(179, 80)
Me.cmdCircRho.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircRho.Name = "cmdCircRho"
- Me.cmdCircRho.Size = New System.Drawing.Size(60, 32)
+ Me.cmdCircRho.Size = New System.Drawing.Size(65, 32)
Me.cmdCircRho.TabIndex = 14
Me.cmdCircRho.Text = "rho"
Me.cmdCircRho.UseVisualStyleBackColor = True
@@ -5497,7 +5677,7 @@ Partial Class ucrCalculator
Me.cmdCircVar.Location = New System.Drawing.Point(179, 49)
Me.cmdCircVar.Margin = New System.Windows.Forms.Padding(2)
Me.cmdCircVar.Name = "cmdCircVar"
- Me.cmdCircVar.Size = New System.Drawing.Size(60, 32)
+ Me.cmdCircVar.Size = New System.Drawing.Size(65, 32)
Me.cmdCircVar.TabIndex = 5
Me.cmdCircVar.Text = "var"
Me.cmdCircVar.UseVisualStyleBackColor = True
@@ -5530,7 +5710,7 @@ Partial Class ucrCalculator
Me.cmdMedianHL.Location = New System.Drawing.Point(179, 18)
Me.cmdMedianHL.Margin = New System.Windows.Forms.Padding(2)
Me.cmdMedianHL.Name = "cmdMedianHL"
- Me.cmdMedianHL.Size = New System.Drawing.Size(60, 32)
+ Me.cmdMedianHL.Size = New System.Drawing.Size(65, 32)
Me.cmdMedianHL.TabIndex = 2
Me.cmdMedianHL.Text = "medianHL"
Me.cmdMedianHL.UseVisualStyleBackColor = True
@@ -5807,15 +5987,287 @@ Partial Class ucrCalculator
Me.cmdAny1.Text = ". any"
Me.cmdAny1.UseVisualStyleBackColor = True
'
- 'cmdStringRHelp
- '
- Me.cmdStringRHelp.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdStringRHelp.Location = New System.Drawing.Point(656, 41)
- Me.cmdStringRHelp.Name = "cmdStringRHelp"
- Me.cmdStringRHelp.Size = New System.Drawing.Size(75, 23)
- Me.cmdStringRHelp.TabIndex = 197
- Me.cmdStringRHelp.Text = "R Help"
- Me.cmdStringRHelp.UseVisualStyleBackColor = True
+ 'grpComplex
+ '
+ Me.grpComplex.Controls.Add(Me.cmdComplexRHelp)
+ Me.grpComplex.Controls.Add(Me.cmdComplexTanH)
+ Me.grpComplex.Controls.Add(Me.cmdComplexTan)
+ Me.grpComplex.Controls.Add(Me.cmdComplexPi)
+ Me.grpComplex.Controls.Add(Me.cmdComplexDeg)
+ Me.grpComplex.Controls.Add(Me.cmdComplexRad)
+ Me.grpComplex.Controls.Add(Me.cmdComplexSignif)
+ Me.grpComplex.Controls.Add(Me.cmdComplexCosH)
+ Me.grpComplex.Controls.Add(Me.cmdComplexSinH)
+ Me.grpComplex.Controls.Add(Me.cmdComplexCos)
+ Me.grpComplex.Controls.Add(Me.cmdComplexSin)
+ Me.grpComplex.Controls.Add(Me.cmdComplexExp)
+ Me.grpComplex.Controls.Add(Me.cmdComplexRound)
+ Me.grpComplex.Controls.Add(Me.cmdComplexLog)
+ Me.grpComplex.Controls.Add(Me.cmdComplexSqrt)
+ Me.grpComplex.Controls.Add(Me.cmdConjugate)
+ Me.grpComplex.Controls.Add(Me.cmdArg)
+ Me.grpComplex.Controls.Add(Me.cmdMod)
+ Me.grpComplex.Controls.Add(Me.cmdImaginary)
+ Me.grpComplex.Controls.Add(Me.cmdReal)
+ Me.grpComplex.Controls.Add(Me.cmdAsComplex)
+ Me.grpComplex.Location = New System.Drawing.Point(434, 69)
+ Me.grpComplex.Name = "grpComplex"
+ Me.grpComplex.Size = New System.Drawing.Size(288, 226)
+ Me.grpComplex.TabIndex = 198
+ Me.grpComplex.TabStop = False
+ Me.grpComplex.Text = "Complex"
+ '
+ 'cmdComplexRHelp
+ '
+ Me.cmdComplexRHelp.AutoSize = True
+ Me.cmdComplexRHelp.ContextMenuStrip = Me.ContextMenuStripComplex
+ Me.cmdComplexRHelp.Location = New System.Drawing.Point(183, 169)
+ Me.cmdComplexRHelp.Name = "cmdComplexRHelp"
+ Me.cmdComplexRHelp.Size = New System.Drawing.Size(91, 23)
+ Me.cmdComplexRHelp.SplitMenuStrip = Me.ContextMenuStripComplex
+ Me.cmdComplexRHelp.TabIndex = 209
+ Me.cmdComplexRHelp.Text = "R Help"
+ Me.cmdComplexRHelp.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexTanH
+ '
+ 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(212, 104)
+ Me.cmdComplexTanH.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexTanH.Name = "cmdComplexTanH"
+ Me.cmdComplexTanH.Size = New System.Drawing.Size(58, 30)
+ Me.cmdComplexTanH.TabIndex = 208
+ Me.cmdComplexTanH.Text = "tanh"
+ Me.cmdComplexTanH.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexTan
+ '
+ Me.cmdComplexTan.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdComplexTan.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdComplexTan.Location = New System.Drawing.Point(212, 75)
+ Me.cmdComplexTan.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexTan.Name = "cmdComplexTan"
+ Me.cmdComplexTan.Size = New System.Drawing.Size(58, 30)
+ Me.cmdComplexTan.TabIndex = 207
+ Me.cmdComplexTan.Text = "tan"
+ Me.cmdComplexTan.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexPi
+ '
+ 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(212, 133)
+ Me.cmdComplexPi.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexPi.Name = "cmdComplexPi"
+ Me.cmdComplexPi.Size = New System.Drawing.Size(58, 30)
+ Me.cmdComplexPi.TabIndex = 206
+ Me.cmdComplexPi.Text = "pi"
+ Me.cmdComplexPi.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexDeg
+ '
+ Me.cmdComplexDeg.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdComplexDeg.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdComplexDeg.Location = New System.Drawing.Point(212, 46)
+ Me.cmdComplexDeg.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexDeg.Name = "cmdComplexDeg"
+ Me.cmdComplexDeg.Size = New System.Drawing.Size(58, 30)
+ Me.cmdComplexDeg.TabIndex = 205
+ Me.cmdComplexDeg.Text = "deg"
+ Me.cmdComplexDeg.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexRad
+ '
+ Me.cmdComplexRad.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdComplexRad.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdComplexRad.Location = New System.Drawing.Point(212, 17)
+ Me.cmdComplexRad.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexRad.Name = "cmdComplexRad"
+ Me.cmdComplexRad.Size = New System.Drawing.Size(58, 30)
+ Me.cmdComplexRad.TabIndex = 204
+ Me.cmdComplexRad.Text = "rad"
+ Me.cmdComplexRad.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexSignif
+ '
+ 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(147, 133)
+ Me.cmdComplexSignif.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexSignif.Name = "cmdComplexSignif"
+ Me.cmdComplexSignif.Size = New System.Drawing.Size(65, 30)
+ Me.cmdComplexSignif.TabIndex = 203
+ Me.cmdComplexSignif.Text = "signif"
+ Me.cmdComplexSignif.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexCosH
+ '
+ 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(147, 104)
+ Me.cmdComplexCosH.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexCosH.Name = "cmdComplexCosH"
+ Me.cmdComplexCosH.Size = New System.Drawing.Size(65, 30)
+ Me.cmdComplexCosH.TabIndex = 202
+ Me.cmdComplexCosH.Text = "cosh"
+ Me.cmdComplexCosH.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexSinH
+ '
+ 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(89, 104)
+ Me.cmdComplexSinH.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexSinH.Name = "cmdComplexSinH"
+ Me.cmdComplexSinH.Size = New System.Drawing.Size(58, 30)
+ Me.cmdComplexSinH.TabIndex = 201
+ Me.cmdComplexSinH.Text = "sinh"
+ Me.cmdComplexSinH.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexCos
+ '
+ Me.cmdComplexCos.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdComplexCos.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdComplexCos.Location = New System.Drawing.Point(147, 75)
+ Me.cmdComplexCos.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexCos.Name = "cmdComplexCos"
+ Me.cmdComplexCos.Size = New System.Drawing.Size(65, 30)
+ Me.cmdComplexCos.TabIndex = 200
+ Me.cmdComplexCos.Text = "cos"
+ Me.cmdComplexCos.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexSin
+ '
+ Me.cmdComplexSin.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdComplexSin.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdComplexSin.Location = New System.Drawing.Point(89, 75)
+ Me.cmdComplexSin.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexSin.Name = "cmdComplexSin"
+ Me.cmdComplexSin.Size = New System.Drawing.Size(58, 30)
+ Me.cmdComplexSin.TabIndex = 199
+ Me.cmdComplexSin.Text = "sin"
+ Me.cmdComplexSin.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexExp
+ '
+ 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(24, 75)
+ Me.cmdComplexExp.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexExp.Name = "cmdComplexExp"
+ Me.cmdComplexExp.Size = New System.Drawing.Size(65, 30)
+ Me.cmdComplexExp.TabIndex = 192
+ Me.cmdComplexExp.Text = "exp"
+ Me.cmdComplexExp.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexRound
+ '
+ 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(89, 133)
+ Me.cmdComplexRound.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexRound.Name = "cmdComplexRound"
+ Me.cmdComplexRound.Size = New System.Drawing.Size(58, 30)
+ Me.cmdComplexRound.TabIndex = 191
+ Me.cmdComplexRound.Text = "round"
+ Me.cmdComplexRound.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexLog
+ '
+ 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(24, 104)
+ Me.cmdComplexLog.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexLog.Name = "cmdComplexLog"
+ Me.cmdComplexLog.Size = New System.Drawing.Size(65, 30)
+ Me.cmdComplexLog.TabIndex = 190
+ Me.cmdComplexLog.Text = "log"
+ Me.cmdComplexLog.UseVisualStyleBackColor = True
+ '
+ 'cmdComplexSqrt
+ '
+ 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(24, 133)
+ Me.cmdComplexSqrt.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdComplexSqrt.Name = "cmdComplexSqrt"
+ Me.cmdComplexSqrt.Size = New System.Drawing.Size(65, 30)
+ Me.cmdComplexSqrt.TabIndex = 189
+ Me.cmdComplexSqrt.Text = "sqrt"
+ Me.cmdComplexSqrt.UseVisualStyleBackColor = True
+ '
+ 'cmdConjugate
+ '
+ Me.cmdConjugate.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdConjugate.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdConjugate.Location = New System.Drawing.Point(147, 46)
+ Me.cmdConjugate.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdConjugate.Name = "cmdConjugate"
+ Me.cmdConjugate.Size = New System.Drawing.Size(65, 30)
+ Me.cmdConjugate.TabIndex = 188
+ Me.cmdConjugate.Text = "conjugate"
+ Me.cmdConjugate.UseVisualStyleBackColor = True
+ '
+ 'cmdArg
+ '
+ Me.cmdArg.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdArg.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdArg.Location = New System.Drawing.Point(89, 46)
+ Me.cmdArg.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdArg.Name = "cmdArg"
+ Me.cmdArg.Size = New System.Drawing.Size(58, 30)
+ Me.cmdArg.TabIndex = 187
+ Me.cmdArg.Text = "arg"
+ Me.cmdArg.UseVisualStyleBackColor = True
+ '
+ 'cmdMod
+ '
+ Me.cmdMod.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdMod.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdMod.Location = New System.Drawing.Point(24, 46)
+ Me.cmdMod.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdMod.Name = "cmdMod"
+ Me.cmdMod.Size = New System.Drawing.Size(65, 30)
+ Me.cmdMod.TabIndex = 186
+ Me.cmdMod.Text = "mod"
+ Me.cmdMod.UseVisualStyleBackColor = True
+ '
+ 'cmdImaginary
+ '
+ Me.cmdImaginary.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdImaginary.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdImaginary.Location = New System.Drawing.Point(147, 17)
+ Me.cmdImaginary.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdImaginary.Name = "cmdImaginary"
+ Me.cmdImaginary.Size = New System.Drawing.Size(65, 30)
+ Me.cmdImaginary.TabIndex = 185
+ Me.cmdImaginary.Text = "imaginary"
+ Me.cmdImaginary.UseVisualStyleBackColor = True
+ '
+ 'cmdReal
+ '
+ Me.cmdReal.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdReal.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdReal.Location = New System.Drawing.Point(89, 17)
+ Me.cmdReal.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdReal.Name = "cmdReal"
+ Me.cmdReal.Size = New System.Drawing.Size(58, 30)
+ Me.cmdReal.TabIndex = 177
+ Me.cmdReal.Text = "real"
+ Me.cmdReal.UseVisualStyleBackColor = True
+ '
+ 'cmdAsComplex
+ '
+ Me.cmdAsComplex.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+ Me.cmdAsComplex.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdAsComplex.Location = New System.Drawing.Point(24, 17)
+ Me.cmdAsComplex.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
+ Me.cmdAsComplex.Name = "cmdAsComplex"
+ Me.cmdAsComplex.Size = New System.Drawing.Size(65, 30)
+ Me.cmdAsComplex.TabIndex = 176
+ Me.cmdAsComplex.Text = "complex"
+ Me.cmdAsComplex.UseVisualStyleBackColor = True
'
'ucrSaveResultInto
'
@@ -5873,60 +6325,159 @@ Partial Class ucrCalculator
Me.ucrReceiverForCalculation.TabIndex = 120
Me.ucrReceiverForCalculation.ucrSelector = Nothing
'
+ 'cmdStringRHelp
+ '
+ Me.cmdStringRHelp.AutoSize = True
+ Me.cmdStringRHelp.ContextMenuStrip = Me.ContextMenuStripTxtString
+ Me.cmdStringRHelp.Location = New System.Drawing.Point(647, 41)
+ Me.cmdStringRHelp.Name = "cmdStringRHelp"
+ Me.cmdStringRHelp.Size = New System.Drawing.Size(91, 23)
+ Me.cmdStringRHelp.SplitMenuStrip = Me.ContextMenuStripTxtString
+ Me.cmdStringRHelp.TabIndex = 210
+ Me.cmdStringRHelp.Text = "R Help"
+ Me.cmdStringRHelp.UseVisualStyleBackColor = True
+ '
+ 'ContextMenuStripTxtString
+ '
+ Me.ContextMenuStripTxtString.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TxTStringrToolStripMenuItem, Me.TxTBaseToolStripMenuItem})
+ Me.ContextMenuStripTxtString.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripTxtString.Size = New System.Drawing.Size(110, 48)
+ '
+ 'TxTStringrToolStripMenuItem
+ '
+ Me.TxTStringrToolStripMenuItem.Name = "TxTStringrToolStripMenuItem"
+ Me.TxTStringrToolStripMenuItem.Size = New System.Drawing.Size(109, 22)
+ Me.TxTStringrToolStripMenuItem.Text = "Stringr"
+ '
+ 'TxTBaseToolStripMenuItem
+ '
+ Me.TxTBaseToolStripMenuItem.Name = "TxTBaseToolStripMenuItem"
+ Me.TxTBaseToolStripMenuItem.Size = New System.Drawing.Size(109, 22)
+ Me.TxTBaseToolStripMenuItem.Text = "base"
+ '
+ 'cmdWakefieldHelp
+ '
+ Me.cmdWakefieldHelp.AutoSize = True
+ Me.cmdWakefieldHelp.ContextMenuStrip = Me.ContextMenuStripWakefield
+ Me.cmdWakefieldHelp.Location = New System.Drawing.Point(774, 41)
+ Me.cmdWakefieldHelp.Name = "cmdWakefieldHelp"
+ Me.cmdWakefieldHelp.Size = New System.Drawing.Size(91, 23)
+ Me.cmdWakefieldHelp.SplitMenuStrip = Me.ContextMenuStripWakefield
+ Me.cmdWakefieldHelp.TabIndex = 211
+ Me.cmdWakefieldHelp.Text = "R Help"
+ Me.cmdWakefieldHelp.UseVisualStyleBackColor = True
+ '
+ 'ContextMenuStripWakefield
+ '
+ Me.ContextMenuStripWakefield.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.WakefieldToolStripMenuItem})
+ Me.ContextMenuStripWakefield.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripWakefield.Size = New System.Drawing.Size(125, 26)
+ '
+ 'WakefieldToolStripMenuItem
+ '
+ Me.WakefieldToolStripMenuItem.Name = "WakefieldToolStripMenuItem"
+ Me.WakefieldToolStripMenuItem.Size = New System.Drawing.Size(124, 22)
+ Me.WakefieldToolStripMenuItem.Text = "wakefield"
+ '
+ 'ContextMenuStripList
+ '
+ Me.ContextMenuStripList.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ListBaseToolStripMenuItem, Me.ListStatsToolStripMenuItem, Me.ListStatipToolStripMenuItem})
+ Me.ContextMenuStripList.Name = "ContextMenuStrip1"
+ Me.ContextMenuStripList.Size = New System.Drawing.Size(104, 70)
+ '
+ 'ListBaseToolStripMenuItem
+ '
+ Me.ListBaseToolStripMenuItem.Name = "ListBaseToolStripMenuItem"
+ Me.ListBaseToolStripMenuItem.Size = New System.Drawing.Size(103, 22)
+ Me.ListBaseToolStripMenuItem.Text = "base"
+ '
+ 'ListStatsToolStripMenuItem
+ '
+ Me.ListStatsToolStripMenuItem.Name = "ListStatsToolStripMenuItem"
+ Me.ListStatsToolStripMenuItem.Size = New System.Drawing.Size(103, 22)
+ Me.ListStatsToolStripMenuItem.Text = "stats"
+ '
+ 'ListStatipToolStripMenuItem
+ '
+ Me.ListStatipToolStripMenuItem.Name = "ListStatipToolStripMenuItem"
+ Me.ListStatipToolStripMenuItem.Size = New System.Drawing.Size(103, 22)
+ Me.ListStatipToolStripMenuItem.Text = "statip"
+ '
'ucrCalculator
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi
Me.AutoSize = True
- Me.Controls.Add(Me.grpProbabilty)
- Me.Controls.Add(Me.grpSummary)
- Me.Controls.Add(Me.grpInteger)
- Me.Controls.Add(Me.grpTransform)
- Me.Controls.Add(Me.grpDates)
- Me.Controls.Add(Me.grpWakefield)
Me.Controls.Add(Me.grpLogical)
+ Me.Controls.Add(Me.grpDates)
Me.Controls.Add(Me.grpHydroGOF)
- Me.Controls.Add(Me.grpMaths)
+ Me.Controls.Add(Me.grpProbabilty)
Me.Controls.Add(Me.grpFactor)
Me.Controls.Add(Me.grpCircular)
- Me.Controls.Add(Me.grpTestString)
+ Me.Controls.Add(Me.grpMaths)
+ Me.Controls.Add(Me.grpInteger)
Me.Controls.Add(Me.cmdWakefieldHelp)
Me.Controls.Add(Me.cmdStringRHelp)
Me.Controls.Add(Me.ucrSaveResultInto)
Me.Controls.Add(Me.ucrTryCalculator)
Me.Controls.Add(Me.grpSymbols)
- Me.Controls.Add(Me.grpModifier)
Me.Controls.Add(Me.chkShowParameters)
Me.Controls.Add(Me.ucrInputCalOptions)
Me.Controls.Add(Me.grpBasic)
Me.Controls.Add(Me.ucrSelectorForCalculations)
Me.Controls.Add(Me.ucrReceiverForCalculation)
Me.Controls.Add(Me.lblExpression)
+ Me.Controls.Add(Me.grpTestString)
+ Me.Controls.Add(Me.grpModifier)
+ Me.Controls.Add(Me.grpComplex)
+ Me.Controls.Add(Me.grpSummary)
+ Me.Controls.Add(Me.grpWakefield)
+ Me.Controls.Add(Me.grpTransform)
Me.Name = "ucrCalculator"
Me.Size = New System.Drawing.Size(899, 457)
Me.grpBasic.ResumeLayout(False)
Me.grpDates.ResumeLayout(False)
+ Me.grpDates.PerformLayout()
+ Me.ContextMenuStripDate.ResumeLayout(False)
+ Me.ContextMenuStripComplex.ResumeLayout(False)
Me.grpInteger.ResumeLayout(False)
Me.grpInteger.PerformLayout()
Me.ContextMenuStripInteger.ResumeLayout(False)
Me.grpFactor.ResumeLayout(False)
+ Me.grpFactor.PerformLayout()
+ Me.ContextMenuStripFactor.ResumeLayout(False)
Me.grpHydroGOF.ResumeLayout(False)
+ Me.grpHydroGOF.PerformLayout()
+ Me.ContextMenuStripHydroGOF.ResumeLayout(False)
Me.grpWakefield.ResumeLayout(False)
Me.grpMaths.ResumeLayout(False)
+ Me.grpMaths.PerformLayout()
+ Me.ContextMenuStripMaths.ResumeLayout(False)
Me.grpSummary.ResumeLayout(False)
Me.grpSummary.PerformLayout()
Me.ContextMenuStripSummary.ResumeLayout(False)
Me.grpFrequencies.ResumeLayout(False)
Me.grpProbabilty.ResumeLayout(False)
+ Me.grpProbabilty.PerformLayout()
+ Me.ContextMenuStripProbability.ResumeLayout(False)
Me.grpRandom.ResumeLayout(False)
Me.grpTransform.ResumeLayout(False)
Me.grpTransform.PerformLayout()
Me.ContextMenuStripTransform.ResumeLayout(False)
Me.grpLogical.ResumeLayout(False)
+ Me.grpLogical.PerformLayout()
+ Me.ContextMenuStripLogical.ResumeLayout(False)
Me.grpTestString.ResumeLayout(False)
Me.grpCircular.ResumeLayout(False)
+ Me.grpCircular.PerformLayout()
+ Me.ContextMenuStripCircular.ResumeLayout(False)
Me.grpModifier.ResumeLayout(False)
Me.grpSymbols.ResumeLayout(False)
+ Me.grpComplex.ResumeLayout(False)
+ Me.grpComplex.PerformLayout()
+ Me.ContextMenuStripTxtString.ResumeLayout(False)
+ Me.ContextMenuStripWakefield.ResumeLayout(False)
+ Me.ContextMenuStripList.ResumeLayout(False)
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -5935,7 +6486,6 @@ Partial Class ucrCalculator
Friend WithEvents ucrReceiverForCalculation As ucrReceiverExpression
Friend WithEvents lblExpression As Label
Friend WithEvents ucrSelectorForCalculations As ucrSelectorByDataFrameAddRemove
- Friend WithEvents cmdRHelp As Button
Friend WithEvents chkShowParameters As CheckBox
Friend WithEvents ucrInputCalOptions As ucrInputComboBox
Friend WithEvents grpBasic As GroupBox
@@ -6289,14 +6839,6 @@ Partial Class ucrCalculator
Friend WithEvents cmdTrunck As Button
Friend WithEvents cmdEnds As Button
Friend WithEvents cmdSortF As Button
- Friend WithEvents cmdHydroHelp As Button
- Friend WithEvents cmdTransformHelp As Button
- Friend WithEvents cmdCircularHelp As Button
- Friend WithEvents cmdWakefieldHelp As Button
- Friend WithEvents cmdMathsHelp As Button
- Friend WithEvents cmdLogicalHelp As Button
- Friend WithEvents cmdStringRHelp As Button
- Friend WithEvents cmdProbRHelp As Button
Friend WithEvents grpInteger As GroupBox
Friend WithEvents cmdFactorial As Button
Friend WithEvents cmdIsPrime As Button
@@ -6392,4 +6934,63 @@ Partial Class ucrCalculator
Friend WithEvents cmduni_integer As Button
Friend WithEvents cmdRan_normal As Button
Friend WithEvents cmduniform As Button
+ Friend WithEvents grpComplex As GroupBox
+ Friend WithEvents cmdReal As Button
+ Friend WithEvents cmdAsComplex As Button
+ Friend WithEvents cmdComplexExp As Button
+ Friend WithEvents cmdComplexRound As Button
+ Friend WithEvents cmdComplexLog As Button
+ Friend WithEvents cmdComplexSqrt As Button
+ Friend WithEvents cmdConjugate As Button
+ Friend WithEvents cmdArg As Button
+ Friend WithEvents cmdMod As Button
+ Friend WithEvents cmdImaginary As Button
+ Friend WithEvents cmdComplexTanH As Button
+ Friend WithEvents cmdComplexTan As Button
+ Friend WithEvents cmdComplexPi As Button
+ Friend WithEvents cmdComplexDeg As Button
+ Friend WithEvents cmdComplexRad As Button
+ Friend WithEvents cmdComplexSignif As Button
+ Friend WithEvents cmdComplexCosH As Button
+ Friend WithEvents cmdComplexSinH As Button
+ Friend WithEvents cmdComplexCos As Button
+ Friend WithEvents cmdComplexSin As Button
+ Friend WithEvents cmdComplexRHelp As ucrSplitButton
+ Friend WithEvents ContextMenuStripComplex As ContextMenuStrip
+ Friend WithEvents ComplexBaseToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents cmdRHelp As ucrSplitButton
+ Friend WithEvents cmdTransformHelp As ucrSplitButton
+ Friend WithEvents cmdHydroHelp As ucrSplitButton
+ Friend WithEvents cmdMathsHelp As ucrSplitButton
+ Friend WithEvents cmdProbRHelp As ucrSplitButton
+ Friend WithEvents cmdLogicalHelp As ucrSplitButton
+ Friend WithEvents cmdCircularHelp As ucrSplitButton
+ Friend WithEvents cmdStringRHelp As ucrSplitButton
+ Friend WithEvents cmdWakefieldHelp As ucrSplitButton
+ Friend WithEvents ContextMenuStripMaths As ContextMenuStrip
+ Friend WithEvents MathsStatsStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ContextMenuStripLogical As ContextMenuStrip
+ Friend WithEvents LogBaseToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents LogDplyrToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ContextMenuStripTxtString As ContextMenuStrip
+ Friend WithEvents TxTStringrToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents TxTBaseToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ContextMenuStripFactor As ContextMenuStrip
+ Friend WithEvents FactorForcatsToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ContextMenuStripProbability As ContextMenuStrip
+ Friend WithEvents ProbStatsToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ProbBaseToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ContextMenuStripDate As ContextMenuStrip
+ Friend WithEvents DateLubridateToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents DateHmsToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ContextMenuStripHydroGOF As ContextMenuStrip
+ Friend WithEvents HydroGOFToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ContextMenuStripCircular As ContextMenuStrip
+ Friend WithEvents CircularToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ContextMenuStripWakefield As ContextMenuStrip
+ Friend WithEvents WakefieldToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ContextMenuStripList As ContextMenuStrip
+ Friend WithEvents ListBaseToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ListStatsToolStripMenuItem As ToolStripMenuItem
+ Friend WithEvents ListStatipToolStripMenuItem As ToolStripMenuItem
End Class
diff --git a/instat/ucrCalculator.resx b/instat/ucrCalculator.resx
index a2840f0e634..ffe4d53c9ff 100644
--- a/instat/ucrCalculator.resx
+++ b/instat/ucrCalculator.resx
@@ -117,19 +117,52 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 103
+
+
+ 721, 24
+
123, 24
+
+ 551, 64
+
+
+ 565, 103
+
+
+ 17, 63
+
519, 24
+
+ 722, 64
+
313, 24
+
+ 182, 62
+
17, 17
+
+ 381, 104
+
+
+ 352, 64
+
+
+ 193, 103
+
+
+ 759, 103
+
- 78
+ 175
\ No newline at end of file
diff --git a/instat/ucrCalculator.vb b/instat/ucrCalculator.vb
index 75f9749722d..892f774f8a4 100644
--- a/instat/ucrCalculator.vb
+++ b/instat/ucrCalculator.vb
@@ -59,7 +59,7 @@ Public Class ucrCalculator
End Sub
Public Sub InitialiseControls()
- ucrInputCalOptions.SetItems({"Basic", "Maths", "Logical and Symbols", "Summary", "Text/Strings (Character Columns)", "Factor", "Probability", "Dates/Times", "Transform", "Wakefield", "Circular", "hydroGOF", "Integer"}) ' "Rows" is a temp. name
+ ucrInputCalOptions.SetItems({"Basic", "Maths", "Logical and Symbols", "Summary", "Text/Strings (Character Columns)", "Factor", "Probability", "Dates/Times", "Transform", "Wakefield", "Circular", "hydroGOF", "Complex", "Integer"}) ' "Rows" is a temp. name
ucrInputCalOptions.SetDropDownStyleAsNonEditable()
ucrReceiverForCalculation.Selector = ucrSelectorForCalculations
@@ -446,6 +446,7 @@ Public Class ucrCalculator
grpSymbols.Visible = False
grpHydroGOF.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Me.Size = New Size(iBasicWidth * 1.38, iBaseHeight)
Case "Logical and Symbols"
strPackageName = "base"
@@ -467,6 +468,7 @@ Public Class ucrCalculator
grpModifier.Visible = False
grpSymbols.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Case "Summary"
strPackageName = "base"
grpDates.Visible = False
@@ -487,6 +489,7 @@ Public Class ucrCalculator
grpSymbols.Visible = False
grpHydroGOF.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Case "Text/Strings (Character Columns)"
strPackageName = "stringr"
grpDates.Visible = False
@@ -506,6 +509,7 @@ Public Class ucrCalculator
grpSymbols.Visible = True
grpHydroGOF.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Me.Size = New Size(iBasicWidth * 1.42, iBaseHeight)
Case "Factor"
strPackageName = "base"
@@ -527,6 +531,7 @@ Public Class ucrCalculator
grpSymbols.Visible = False
grpHydroGOF.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Case "Probability"
strPackageName = "stats"
grpDates.Visible = False
@@ -546,6 +551,7 @@ Public Class ucrCalculator
grpSymbols.Visible = False
grpHydroGOF.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Me.Size = New Size(iBasicWidth * 1.57, iBaseHeight)
Case "Dates/Times"
strPackageName = "lubridate"
@@ -566,6 +572,7 @@ Public Class ucrCalculator
grpSymbols.Visible = False
grpHydroGOF.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Me.Size = New Size(iBasicWidth * 1.32, iBaseHeight)
Case "Transform"
strPackageName = "dplyr"
@@ -586,6 +593,7 @@ Public Class ucrCalculator
grpSymbols.Visible = False
grpHydroGOF.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Me.Size = New Size(iBasicWidth * 1.47, iBaseHeight)
Case "Wakefield"
strPackageName = "wakefield"
@@ -606,6 +614,7 @@ Public Class ucrCalculator
grpModifier.Visible = False
grpHydroGOF.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Me.Size = New Size(iBasicWidth * 1.8, iBaseHeight)
Case "Circular"
strPackageName = "circular"
@@ -626,6 +635,7 @@ Public Class ucrCalculator
grpSymbols.Visible = False
grpHydroGOF.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Me.Size = New Size(iBasicWidth * 1.39, iBaseHeight)
Case "hydroGOF"
strPackageName = "hydroGOF"
@@ -646,6 +656,7 @@ Public Class ucrCalculator
grpModifier.Visible = False
grpSymbols.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Me.Size = New Size(iBasicWidth * 1.27, iBaseHeight)
Case "Integer"
strPackageName = "gmp"
@@ -666,7 +677,29 @@ Public Class ucrCalculator
grpSymbols.Visible = False
grpHydroGOF.Visible = False
grpInteger.Visible = True
+ grpComplex.Visible = False
Me.Size = New Size(iBasicWidth * 1.5, iBaseHeight)
+ Case "Complex"
+ strPackageName = "base"
+ grpSummary.Visible = False
+ grpMaths.Visible = False
+ grpLogical.Visible = False
+ grpBasic.Visible = True
+ grpTestString.Visible = False
+ cmdStringRHelp.Visible = False
+ cmdWakefieldHelp.Visible = False
+ grpFactor.Visible = False
+ grpProbabilty.Visible = False
+ grpTransform.Visible = False
+ grpDates.Visible = False
+ grpCircular.Visible = False
+ grpWakefield.Visible = False
+ grpModifier.Visible = False
+ grpSymbols.Visible = False
+ grpHydroGOF.Visible = False
+ grpInteger.Visible = False
+ grpComplex.Visible = True
+ Me.Size = New Size(iBasicWidth * 1.3, iBaseHeight)
Case "Basic"
grpSummary.Visible = False
grpMaths.Visible = False
@@ -686,6 +719,7 @@ Public Class ucrCalculator
grpSymbols.Visible = False
grpHydroGOF.Visible = False
grpInteger.Visible = False
+ grpComplex.Visible = False
Case Else
grpDates.Visible = False
Me.Size = New Size(iBasicWidth, iBaseHeight)
@@ -1470,10 +1504,6 @@ Public Class ucrCalculator
iCallType:=2, bSeparateThread:=False, bUpdateGrids:=False)
End Sub
- Private Sub cmdHelp_Click(sender As Object, e As EventArgs) Handles cmdRHelp.Click, cmdHydroHelp.Click, cmdCircularHelp.Click, cmdWakefieldHelp.Click, cmdMathsHelp.Click, cmdLogicalHelp.Click, cmdProbRHelp.Click, cmdStringRHelp.Click
- OpenHelpPage()
- End Sub
-
Private Sub cmdTry_Click(sender As Object, e As EventArgs)
RaiseEvent TryCommadClick()
End Sub
@@ -3999,7 +4029,7 @@ Public Class ucrCalculator
End If
End Sub
- Private Sub cmdIntegerRHelp_Click(sender As Object, e As EventArgs) Handles cmdIntegerRHelp.Click
+ Private Sub cmdIntegerRHelp_Click(sender As Object, e As EventArgs) Handles cmdIntegerRHelp.Click, GmpToolStripMenuItem.Click
CalculationsOptions()
If ucrInputCalOptions.GetText = "Integer" Then
strPackageName = "gmp"
@@ -4293,14 +4323,6 @@ Public Class ucrCalculator
End If
End Sub
- Private Sub GmpToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles GmpToolStripMenuItem.Click
- CalculationsOptions()
- If ucrInputCalOptions.GetText = "Integer" Then
- strPackageName = "gmp"
- End If
- OpenHelpPage()
- End Sub
-
Private Sub ZseqToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ZseqToolStripMenuItem.Click
CalculationsOptions()
If ucrInputCalOptions.GetText = "Integer" Then
@@ -4341,15 +4363,7 @@ Public Class ucrCalculator
End If
End Sub
- Private Sub cmdTransformRHelp_Click(sender As Object, e As EventArgs) Handles cmdTransformRHelp.Click
- CalculationsOptions()
- If ucrInputCalOptions.GetText = "Transform" Then
- strPackageName = "base"
- End If
- OpenHelpPage()
- End Sub
-
- Private Sub BaseToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BaseToolStripMenuItem.Click
+ Private Sub cmdTransformRHelp_Click(sender As Object, e As EventArgs) Handles cmdTransformRHelp.Click, BaseToolStripMenuItem.Click
CalculationsOptions()
If ucrInputCalOptions.GetText = "Transform" Then
strPackageName = "base"
@@ -4505,14 +4519,6 @@ Public Class ucrCalculator
End If
End Sub
- Private Sub BaseToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles BaseToolStripMenuItem1.Click
- CalculationsOptions()
- If ucrInputCalOptions.GetText = "Summary" Then
- strPackageName = "base"
- End If
- OpenHelpPage()
- End Sub
-
Private Sub StatsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles StatsToolStripMenuItem.Click
CalculationsOptions()
If ucrInputCalOptions.GetText = "Summary" Then
@@ -4553,7 +4559,7 @@ Public Class ucrCalculator
OpenHelpPage()
End Sub
- Private Sub cmdSummaryRHelp_Click(sender As Object, e As EventArgs) Handles cmdSummaryRHelp.Click
+ Private Sub cmdSummaryRHelp_Click(sender As Object, e As EventArgs) Handles cmdSummaryRHelp.Click, BaseToolStripMenuItem1.Click
CalculationsOptions()
If ucrInputCalOptions.GetText = "Summary" Then
strPackageName = "base"
@@ -4561,6 +4567,118 @@ Public Class ucrCalculator
OpenHelpPage()
End Sub
+ Private Sub cmdComplexRHelp_Click(sender As Object, e As EventArgs) Handles cmdComplexRHelp.Click, ComplexBaseToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Complex" Then
+ strPackageName = "base"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub cmdWakefieldHelp_Click(sender As Object, e As EventArgs) Handles cmdWakefieldHelp.Click, WakefieldToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Wakefield" Then
+ strPackageName = "wakefield"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub cmdCircularHelp_Click(sender As Object, e As EventArgs) Handles cmdCircularHelp.Click, CircularToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Circular" Then
+ strPackageName = "circular"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub cmdHydroHelp_Click(sender As Object, e As EventArgs) Handles cmdHydroHelp.Click, HydroGOFToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "hydroGOF" Then
+ strPackageName = "hydroGOF"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub cmdMathsHelp_Click(sender As Object, e As EventArgs) Handles cmdMathsHelp.Click, MathsStatsStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Maths" Then
+ strPackageName = "stats"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub cmdTransformHelp_Click(sender As Object, e As EventArgs) Handles cmdTransformHelp.Click, FactorForcatsToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Factor" Then
+ strPackageName = "forcats"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub cmdLogicalHelp_Click(sender As Object, e As EventArgs) Handles cmdLogicalHelp.Click, LogBaseToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Logical and Symbols" Then
+ strPackageName = "base"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub LogDplyrToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles LogDplyrToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Logical and Symbols" Then
+ strPackageName = "dplyr"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub cmdStringRHelp_Click(sender As Object, e As EventArgs) Handles cmdStringRHelp.Click, TxTStringrToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Text/Strings (Character Columns)" Then
+ strPackageName = "stringr"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub TxTBaseToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TxTBaseToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Text/Strings (Character Columns)" Then
+ strPackageName = "base"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub cmdProbRHelp_Click(sender As Object, e As EventArgs) Handles cmdProbRHelp.Click, ProbStatsToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Probability" Then
+ strPackageName = "stats"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub ProbBaseToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ProbBaseToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Probability" Then
+ strPackageName = "base"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub cmdRHelp_Click(sender As Object, e As EventArgs) Handles cmdRHelp.Click, DateLubridateToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Dates/Times" Then
+ strPackageName = "lubridate"
+ End If
+ OpenHelpPage()
+ End Sub
+
+ Private Sub DateHmsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateHmsToolStripMenuItem.Click
+ CalculationsOptions()
+ If ucrInputCalOptions.GetText = "Dates/Times" Then
+ strPackageName = "hms"
+ End If
+ OpenHelpPage()
+ End Sub
+
Private Sub cmduniform_Click(sender As Object, e As EventArgs) Handles cmduniform.Click
Dim clsUniformFunction As New RFunction
@@ -4699,4 +4817,152 @@ Public Class ucrCalculator
ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsSampleFunction.ToScript, 36)
End Sub
+
+ Private Sub cmdAsComplex_Click(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
+
+ Private Sub cmdReal_Click(sender As Object, e As EventArgs) Handles cmdReal.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Re(z = )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Re( )", 1)
+ End If
+ End Sub
+
+ Private Sub cmdImaginary_Click(sender As Object, e As EventArgs) Handles cmdImaginary.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Im(z = )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Im( )", 1)
+ End If
+ End Sub
+
+ Private Sub cmdMod_Click(sender As Object, e As EventArgs) Handles cmdMod.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Mod(z = )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Mod( )", 1)
+ End If
+ End Sub
+
+ Private Sub cmdArg_Click(sender As Object, e As EventArgs) Handles cmdArg.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Arg(z = )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Arg( )", 1)
+ End If
+ End Sub
+
+ Private Sub cmdConjugate_Click(sender As Object, e As EventArgs) Handles cmdConjugate.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Conj(z = )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("Conj( )", 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)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("log()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexSqrt_Click_1(sender As Object, e As EventArgs) Handles cmdComplexSqrt.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sqrt(x= )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sqrt()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexRound_Click(sender As Object, e As EventArgs) Handles cmdComplexRound.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("round(x= , digits=0)", 11)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("round()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexExp_Click_1(sender As Object, e As EventArgs) Handles cmdComplexExp.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("exp(x= )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("exp()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexSignif_Click(sender As Object, e As EventArgs) Handles cmdComplexSignif.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("signif(x= , digits=6)", 11)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("signif()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexCos_Click(sender As Object, e As EventArgs) Handles cmdComplexCos.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("cos(x= )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("cos()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexSin_Click(sender As Object, e As EventArgs) Handles cmdComplexSin.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sin(x= )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sin()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexTan_Click(sender As Object, e As EventArgs) Handles cmdComplexTan.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("tan(x= )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("tan()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexCosH_Click(sender As Object, e As EventArgs) Handles cmdComplexCosH.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("cosh(x= )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("cosh()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexSinH_Click(sender As Object, e As EventArgs) Handles cmdComplexSinH.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sinh(x= )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("sinh()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexTanH_Click(sender As Object, e As EventArgs) Handles cmdComplexTanH.Click
+ If chkShowParameters.Checked Then
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("tanh(x= )", 1)
+ Else
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("tanh()", 1)
+ End If
+ End Sub
+
+ Private Sub cmdComplexRad_Click(sender As Object, e As EventArgs) Handles cmdComplexRad.Click
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("circular::rad()", 1)
+ End Sub
+
+ Private Sub cmdComplexDeg_Click(sender As Object, e As EventArgs) Handles cmdComplexDeg.Click
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("circular::deg()", 1)
+ End Sub
+
+ Private Sub cmdComplexPi_Click(sender As Object, e As EventArgs) Handles cmdComplexPi.Click
+ ucrReceiverForCalculation.AddToReceiverAtCursorPosition("pi")
+ End Sub
End Class
diff --git a/instat/ucrColumnMetadata.vb b/instat/ucrColumnMetadata.vb
index c4f6985a4aa..c56717bbd3b 100644
--- a/instat/ucrColumnMetadata.vb
+++ b/instat/ucrColumnMetadata.vb
@@ -63,6 +63,7 @@ Public Class ucrColumnMetadata
Private Sub AddAndUpdateWorksheets()
Dim firstAddedWorksheet As clsWorksheetAdapter = Nothing
+ Dim strCurrWorksheet As String = If(_grid.CurrentWorksheet Is Nothing, Nothing, _grid.CurrentWorksheet.Name)
For Each clsDataFrame In _clsDataBook.DataFrames
Dim worksheet As clsWorksheetAdapter = _grid.GetWorksheet(clsDataFrame.strName)
If worksheet Is Nothing Then
@@ -73,6 +74,9 @@ Public Class ucrColumnMetadata
End If
RefreshWorksheet(worksheet, clsDataFrame)
Next
+ If strCurrWorksheet IsNot Nothing Then
+ _grid.ReOrderWorksheets(strCurrWorksheet)
+ End If
If firstAddedWorksheet IsNot Nothing Then
_grid.CurrentWorksheet = firstAddedWorksheet
End If
@@ -123,10 +127,6 @@ Public Class ucrColumnMetadata
_grid.SetCurrentDataFrame(iIndex)
End Sub
- Public Sub ReOrderWorkSheets()
- _grid.ReOrderWorksheets()
- End Sub
-
Private Sub DeleteLables(strColumnName As String)
Dim clsDeleteLabelsFunction As New RFunction
diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb
index 364de9c1d05..695fca53b36 100644
--- a/instat/ucrDataView.vb
+++ b/instat/ucrDataView.vb
@@ -118,6 +118,7 @@ Public Class ucrDataView
Private Sub AddAndUpdateWorksheets()
Dim firstAddedWorksheet As clsWorksheetAdapter = Nothing
+ Dim strCurrWorksheet As String = GetCurrentDataFrameNameFocus()
For Each clsDataFrame In _clsDataBook.DataFrames
Dim worksheet As clsWorksheetAdapter = _grid.GetWorksheet(clsDataFrame.strName)
If worksheet Is Nothing Then
@@ -128,6 +129,9 @@ Public Class ucrDataView
End If
RefreshWorksheet(worksheet, clsDataFrame)
Next
+ If strCurrWorksheet IsNot Nothing Then
+ _grid.ReOrderWorksheets(strCurrWorksheet)
+ End If
If firstAddedWorksheet IsNot Nothing Then
_grid.CurrentWorksheet = firstAddedWorksheet
End If
@@ -230,9 +234,7 @@ Public Class ucrDataView
End Sub
Public Sub CurrentWorksheetChanged()
- If GetWorkSheetCount() <> 0 Then
- frmMain.ucrColumnMeta.SetCurrentDataFrame(_grid.CurrentWorksheet.Name)
- End If
+ frmMain.ucrColumnMeta.SetCurrentDataFrame(GetCurrentDataFrameNameFocus())
RefreshDisplayInformation()
End Sub
@@ -240,10 +242,6 @@ Public Class ucrDataView
Return _grid.GetWorksheetCount
End Function
- Public Sub ReOrderWorkSheets()
- _grid.ReOrderWorksheets()
- End Sub
-
Private Sub RefreshDisplayInformation()
If GetWorkSheetCount() <> 0 AndAlso _clsDataBook IsNot Nothing AndAlso GetCurrentDataFrameFocus() IsNot Nothing Then
frmMain.tstatus.Text = _grid.CurrentWorksheet.Name