Skip to content

Commit

Permalink
Merge pull request #505 from IDEMSInternational/master
Browse files Browse the repository at this point in the history
Updated my master
  • Loading branch information
Patowhiz authored Nov 13, 2024
2 parents ce039a8 + 773b425 commit 50faeef
Show file tree
Hide file tree
Showing 7 changed files with 246 additions and 300 deletions.
12 changes: 4 additions & 8 deletions instat/UserTables/sdgTableOptions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,12 @@ Public Class sdgTableOptions
End Sub

''' <summary>
''' An R operateor that has a parameter named "gt" set up.
''' The parameter should be an R Function that generates script "gt:gt()" as part of the last script statement.
''' Sets up the sub dialog.
''' Expected to be called before showing the dialog.
''' </summary>
''' <param name="clsNewOperator"></param>
''' <param name="strDataFrameName">Name of the data frame contained in the data book</param>
''' <param name="clsNewOperator">R operator that has a 'gt' parameter that produces a 'gt' object.</param>
Public Sub Setup(strDataFrameName As String, clsNewOperator As ROperator)
If clsTablesUtils.FindRFunctionsParamsWithRCommand({"gt"}, clsNewOperator).Count = 0 Then
MsgBox("Developer Error: Parameter with 'gt' as name MUST be set up before using this subdialog")
Exit Sub
End If

clsOperator = clsNewOperator

ucrHeader.Setup(clsOperator)
Expand Down
31 changes: 22 additions & 9 deletions instat/dlgColumnStats.vb
Original file line number Diff line number Diff line change
Expand Up @@ -220,19 +220,32 @@ Public Class dlgColumnStats
sdgMissingOptions.ShowDialog()
End Sub

Private Sub ucrReceiverByFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverByFactor.ControlValueChanged, ucrChkStoreResults.ControlValueChanged, ucrChkPrintOutput.ControlValueChanged
If ucrReceiverByFactor.IsEmpty Then
clsDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=3)
clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4)
ucrBase.clsRsyntax.iCallType = 2
Else
clsDefaultFunction.RemoveParameterByName("return_output")
If ucrChkStoreResults.Checked Then
clsDefaultFunction.AddParameter("store_results", "TRUE", iPosition:=3)
Private Sub ucrReceiverByFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverByFactor.ControlValueChanged, ucrChkStoreResults.ControlValueChanged, ucrChkPrintOutput.ControlValueChanged, ucrReceiverSelectedVariables.ControlValueChanged, ucrChkOriginalLevel.ControlValueChanged
If Not ucrChkOriginalLevel.Checked Then
If ucrReceiverByFactor.IsEmpty AndAlso Not ucrReceiverSelectedVariables.IsEmpty Then
clsDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=3)
clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4)
ucrBase.clsRsyntax.iCallType = 2
Else
clsDefaultFunction.RemoveParameterByName("return_output")
If ucrChkStoreResults.Checked Then
clsDefaultFunction.AddParameter("store_results", "TRUE", iPosition:=3)
Else
clsDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=3)
End If
If ucrChkPrintOutput.Checked Then
clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4)
Else
clsDefaultFunction.AddParameter("return_output", "FALSE", iPosition:=4)
End If
End If
Else
If ucrChkPrintOutput.Checked Then
clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4)
Else
clsDefaultFunction.RemoveParameterByName("return_output")
End If
clsDefaultFunction.AddParameter("store_results", "TRUE", iPosition:=3)
End If
End Sub

Expand Down
236 changes: 113 additions & 123 deletions instat/dlgUseTable.Designer.vb

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

3 changes: 3 additions & 0 deletions instat/dlgUseTable.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ucrFilePath.FilePathDialogFilter" xml:space="preserve">
<value>Comma separated file (*.csv)|*.csv|Excel files (*.xlsx)|*.xlsx|TAB-separated data (*.tsv)|*.tsv|Pipe-separated data (*.psv)|*.psv|Feather r / Python interchange format (*.feather)|*.feather|Fixed-Width format data (*.fwf)|*.fwf|Serialized r objects (*.rds)|*.rds|Saved r objects (*.RData)|*.RData|JSON(*.json)|*.json|YAML(*.yml)|*.yml|Stata(*.dta)|*.dta|SPSS(*.sav)|*.sav|XBASE database files (*.dbf)|*.dbf| Weka Attribute - Relation File Format (*.arff)|*.arff|r syntax object (*.R)|*.R|Xml(*.xml)|*.xml|HTML(*.html)|*.html</value>
</data>
</root>
Loading

0 comments on commit 50faeef

Please sign in to comment.