diff --git a/instat/My Project/Resources.Designer.vb b/instat/My Project/Resources.Designer.vb
index 74b6ea96601..6661d57d528 100644
--- a/instat/My Project/Resources.Designer.vb
+++ b/instat/My Project/Resources.Designer.vb
@@ -368,6 +368,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Colour rainbow.
+ '''
+ Friend ReadOnly Property Colour_rainbow() As String
+ Get
+ Return ResourceManager.GetString("Colour_rainbow", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Column Name.
'''
@@ -503,6 +512,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Cumulative exceedance.
+ '''
+ Friend ReadOnly Property Cumulative_exceedance() As String
+ Get
+ Return ResourceManager.GetString("Cumulative_exceedance", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Cumulative Frequency.
'''
@@ -575,6 +593,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Day Month.
+ '''
+ Friend ReadOnly Property Day_Month() As String
+ Get
+ Return ResourceManager.GetString("Day_Month", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Days.
'''
@@ -620,6 +647,33 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Display daily.
+ '''
+ Friend ReadOnly Property Display_daily() As String
+ Get
+ Return ResourceManager.GetString("Display_daily", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Display daily data rain.
+ '''
+ Friend ReadOnly Property Display_daily_data_rain() As String
+ Get
+ Return ResourceManager.GetString("Display_daily_data_rain", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Display DOY of Year.
+ '''
+ Friend ReadOnly Property Display_DOY_of_Year() As String
+ Get
+ Return ResourceManager.GetString("Display_DOY_of_Year", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Display Letter Values.
'''
@@ -1007,6 +1061,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Grid square.
+ '''
+ Friend ReadOnly Property Grid_square() As String
+ Get
+ Return ResourceManager.GetString("Grid_square", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Group.
'''
@@ -1115,6 +1178,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Interested variable.
+ '''
+ Friend ReadOnly Property Interested_variable() As String
+ Get
+ Return ResourceManager.GetString("Interested_variable", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Interractions.
'''
@@ -1169,6 +1241,33 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to legend bty.
+ '''
+ Friend ReadOnly Property legend_bty() As String
+ Get
+ Return ResourceManager.GetString("legend_bty", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Legend label.
+ '''
+ Friend ReadOnly Property Legend_label() As String
+ Get
+ Return ResourceManager.GetString("Legend_label", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Legend position.
+ '''
+ Friend ReadOnly Property Legend_position() As String
+ Get
+ Return ResourceManager.GetString("Legend_position", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Length of Dry Spell.
'''
@@ -1196,6 +1295,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Line width.
+ '''
+ Friend ReadOnly Property Line_width() As String
+ Get
+ Return ResourceManager.GetString("Line_width", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Load Graph.
'''
@@ -1649,6 +1757,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Percents.
+ '''
+ Friend ReadOnly Property Percents() As String
+ Get
+ Return ResourceManager.GetString("Percents", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Plot.
'''
@@ -1658,6 +1775,24 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Plot character.
+ '''
+ Friend ReadOnly Property Plot_character() As String
+ Get
+ Return ResourceManager.GetString("Plot_character", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Plot window.
+ '''
+ Friend ReadOnly Property Plot_window() As String
+ Get
+ Return ResourceManager.GetString("Plot_window", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Poisson.
'''
@@ -2225,6 +2360,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Station name.
+ '''
+ Friend ReadOnly Property Station_name() As String
+ Get
+ Return ResourceManager.GetString("Station_name", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Statistcs required.
'''
@@ -2234,6 +2378,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Statistic.
+ '''
+ Friend ReadOnly Property Statistic() As String
+ Get
+ Return ResourceManager.GetString("Statistic", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Statistics.
'''
@@ -2297,6 +2450,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Sum.
+ '''
+ Friend ReadOnly Property Sum() As String
+ Get
+ Return ResourceManager.GetString("Sum", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Summary.
'''
@@ -2639,6 +2801,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Y label.
+ '''
+ Friend ReadOnly Property Y_label() As String
+ Get
+ Return ResourceManager.GetString("Y_label", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Yes.
'''
diff --git a/instat/My Project/Resources.resx b/instat/My Project/Resources.resx
index ebd4af6e3a4..f9d42785b55 100644
--- a/instat/My Project/Resources.resx
+++ b/instat/My Project/Resources.resx
@@ -979,4 +979,61 @@
Shape
+
+ Colour rainbow
+
+
+ Cumulative exceedance
+
+
+ Day Month
+
+
+ Display daily
+
+
+ Display daily data rain
+
+
+ Display DOY of Year
+
+
+ Grid square
+
+
+ Interested variable
+
+
+ legend bty
+
+
+ Legend label
+
+
+ Legend position
+
+
+ Line width
+
+
+ Percents
+
+
+ Plot character
+
+
+ Plot window
+
+
+ Station name
+
+
+ Statistic
+
+
+ Sum
+
+
+ Y label
+
\ No newline at end of file
diff --git a/instat/clsDistribution.vb b/instat/clsDistribution.vb
index 05eb4ef5ddc..f6606f8d5c4 100644
--- a/instat/clsDistribution.vb
+++ b/instat/clsDistribution.vb
@@ -16,6 +16,7 @@
Public Class Distribution
Public strNameTag As String
+ Public bIncluded As Boolean = True
Public strRFunctionName As String = ""
Public strPFunctionName As String = ""
Public strQFunctionName As String = ""
diff --git a/instat/clsRFunction.vb b/instat/clsRFunction.vb
index 4d18d6bbd5a..db27cf71227 100644
--- a/instat/clsRFunction.vb
+++ b/instat/clsRFunction.vb
@@ -63,13 +63,13 @@ Public Class RFunction
strScript = strScript & strAssignTo & " <- " & strTemp & vbCrLf
If Not strAssignToDataFrame = "" Then
If Not strAssignToColumn = "" Then
- strScript = strScript & frmMain.clsRLink.strInstatDataObject & "$add_column_to_data(obj_name = " & Chr(34) & strAssignToDataFrame & Chr(34) & ", col_name = " & Chr(34) & strAssignToColumn & Chr(34) & ", col_data = " & strAssignTo & ")" & vbCrLf
- strAssignTo = frmMain.clsRLink.strInstatDataObject & "$get_column_from_data(obj_name = " & Chr(34) & strAssignToDataFrame & Chr(34) & ", col_name = " & Chr(34) & strAssignToColumn & Chr(34) & ")"
+ strScript = strScript & frmMain.clsRLink.strInstatDataObject & "$add_column_to_data(data_name = " & Chr(34) & strAssignToDataFrame & Chr(34) & ", col_name = " & Chr(34) & strAssignToColumn & Chr(34) & ", col_data = " & strAssignTo & ")" & vbCrLf
+ strAssignTo = frmMain.clsRLink.strInstatDataObject & "$get_column_from_data(data_name = " & Chr(34) & strAssignToDataFrame & Chr(34) & ", col_name = " & Chr(34) & strAssignToColumn & Chr(34) & ")"
bIsAssigned = True
bToBeAssigned = False
Else
strScript = strScript & frmMain.clsRLink.strInstatDataObject & "$import_data(data_tables = list(" & strAssignToDataFrame & "=" & strAssignTo & "))" & vbCrLf
- strAssignTo = frmMain.clsRLink.strInstatDataObject & "$get_data(obj_name = " & Chr(34) & strAssignToDataFrame & Chr(34) & ")"
+ strAssignTo = frmMain.clsRLink.strInstatDataObject & "$get_data(data_name = " & Chr(34) & strAssignToDataFrame & Chr(34) & ")"
bIsAssigned = True
bToBeAssigned = False
End If
@@ -113,4 +113,8 @@ Public Class RFunction
bIsAssigned = False
End Sub
+ Public Sub ClearParameters()
+ clsParameters.Clear()
+ bIsAssigned = False
+ End Sub
End Class
\ No newline at end of file
diff --git a/instat/clsRSyntax.vb b/instat/clsRSyntax.vb
index 12f2e683cd2..d43c4e59f7e 100644
--- a/instat/clsRSyntax.vb
+++ b/instat/clsRSyntax.vb
@@ -66,9 +66,7 @@ Public Class RSyntax
clsFunction = clsBaseFunction
End If
- For Each clsCurrParam In clsFunction.clsParameters
- clsFunction.RemoveParameterByName(clsCurrParam.strArgumentName)
- Next
+ clsFunction.ClearParameters()
End Sub
Public Function GetScript(Optional ByRef clsFunction As RFunction = Nothing, Optional bExcludeAssignedFunctionOutput As Boolean = True) As String
diff --git a/instat/dlgBivariateANOVA.vb b/instat/dlgBivariateANOVA.vb
index 316aa0f7dc2..619bc6a6cf1 100644
--- a/instat/dlgBivariateANOVA.vb
+++ b/instat/dlgBivariateANOVA.vb
@@ -46,14 +46,14 @@ Public Class dlgBivariateANOVA
FillFormula()
End Sub
Private Sub FillFormula()
- Dim str1stResponseVariable As String
- Dim str2ndResponseVariable As String
- Dim strTreatmentFactor As String
- Dim strBlockingFactor As String
- str1stResponseVariable = ucrReceiver1stResponseVariable.GetVariables()
- str2ndResponseVariable = ucrReceiver2ndResponseVariable.GetVariables()
- strTreatmentFactor = ucrReceiverBlockingFactor.GetVariables()
- strBlockingFactor = ucrReceiverBlockingFactor.GetVariables()
+ Dim str1stResponseVariable As String = ""
+ Dim str2ndResponseVariable As String = ""
+ Dim strTreatmentFactor As String = ""
+ Dim strBlockingFactor As String = ""
+ 'str1stResponseVariable = ucrReceiver1stResponseVariable.GetVariables()
+ 'str2ndResponseVariable = ucrReceiver2ndResponseVariable.GetVariables()
+ 'strTreatmentFactor = ucrReceiverBlockingFactor.GetVariables()
+ 'strBlockingFactor = ucrReceiverBlockingFactor.GetVariables()
If ((Not (str1stResponseVariable = "")) And (Not (str2ndResponseVariable = "")) And (Not (strTreatmentFactor = "")) And (Not (strBlockingFactor = ""))) Then
'ucrBase.clsRsyntax.AddParameter("formula", cbind(str1stResponseVariable, str2ndResponseVariable) & "~" & strTreatmentFactor & "*" & strBlockingFactor) #researching on the cbind
ucrBase.OKEnabled(True)
diff --git a/instat/dlgBoxPlot.vb b/instat/dlgBoxPlot.vb
index beb4c571ca6..66ce25da2c0 100644
--- a/instat/dlgBoxPlot.vb
+++ b/instat/dlgBoxPlot.vb
@@ -31,7 +31,7 @@ Public Class dlgBoxplot
Private Sub ucrReceiveBoxplotVariable_ValueChanged(sender As Object, e As EventArgs)
If Not (ucrReceiverDataToPlot.lstSelectedVariables.SelectedItem = "") Then
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverDataToPlot.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverDataToPlot.GetVariables())
ucrBase.OKEnabled(True)
Else
ucrBase.OKEnabled(False)
diff --git a/instat/dlgChiSquareTest.vb b/instat/dlgChiSquareTest.vb
index c9fc8afe54f..bab7be03430 100644
--- a/instat/dlgChiSquareTest.vb
+++ b/instat/dlgChiSquareTest.vb
@@ -27,7 +27,7 @@ Public Class dlgChiSquareTest
Private Sub ucrReceiverChiSquare_Leave(sender As Object, e As EventArgs) Handles ucrReceiverChiSquare.Leave
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverChiSquare.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverChiSquare.GetVariables())
End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgDeleteColumns.vb b/instat/dlgDeleteColumns.vb
index 87f92c410d9..eede505d3c4 100644
--- a/instat/dlgDeleteColumns.vb
+++ b/instat/dlgDeleteColumns.vb
@@ -28,7 +28,7 @@ Public Class dlgDeleteColumns
ucrReceiverDeleteColumns.SetMeAsReceiver()
End Sub
Private Sub ucrReceiverDeleteColumns_Leave(sender As Object, e As EventArgs) Handles ucrReceiverDeleteColumns.Leave
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverDeleteColumns.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverDeleteColumns.GetVariables())
End Sub
Private Sub txtSubset_Leave(sender As Object, e As EventArgs) Handles txtSubset.Leave
ucrBase.clsRsyntax.AddParameter("subset", Chr(34) & txtSubset.Text & Chr(34))
diff --git a/instat/dlgDeleteRows.vb b/instat/dlgDeleteRows.vb
index 087d9b45654..02ba4389897 100644
--- a/instat/dlgDeleteRows.vb
+++ b/instat/dlgDeleteRows.vb
@@ -12,7 +12,7 @@ Public Class dlgDeleteRows
ucrReceiverDeleteRows.SetMeAsReceiver()
End Sub
Private Sub ucrReceiverDeleteColumns_Leave(sender As Object, e As EventArgs) Handles ucrReceiverDeleteRows.Leave
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverDeleteRows.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverDeleteRows.GetVariables())
End Sub
Private Sub lstRowsToDelete_Leave(sender As Object, e As EventArgs) Handles lstRowsToDelete.Leave
ucrBase.clsRsyntax.AddParameter("select", Chr(34) & lstRowsToDelete.Text & Chr(34))
diff --git a/instat/dlgDescriptiveStatistics.vb b/instat/dlgDescriptiveStatistics.vb
index 2fe97a4148a..3d7673d50a3 100644
--- a/instat/dlgDescriptiveStatistics.vb
+++ b/instat/dlgDescriptiveStatistics.vb
@@ -35,7 +35,7 @@ Public Class dlgDescriptiveStatistics
End Sub
Private Sub ucrObjectReceiver_Leave(sender As Object, e As EventArgs) Handles ucrObjectReceiver.Leave
- ucrBase.clsRsyntax.AddParameter("object", ucrObjectReceiver.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("object", clsRFunctionParameter:=ucrObjectReceiver.GetVariables())
End Sub
End Class
diff --git a/instat/dlgDotPlot.vb b/instat/dlgDotPlot.vb
index 533798563a8..87a14ac0f84 100644
--- a/instat/dlgDotPlot.vb
+++ b/instat/dlgDotPlot.vb
@@ -30,7 +30,7 @@ Public Class dlgDotPlot
End Sub
Private Sub ucrReceiverSingle_Leave(sender As Object, e As EventArgs) Handles ucrReceiverSingle.Leave
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverSingle.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverSingle.GetVariables())
End Sub
diff --git a/instat/dlgExtremes.vb b/instat/dlgExtremes.vb
index b01b570b632..40e78b89376 100644
--- a/instat/dlgExtremes.vb
+++ b/instat/dlgExtremes.vb
@@ -65,6 +65,6 @@ Public Class dlgExtremes
End Sub
Private Sub ucrReceiverDataToFit_Leave(sender As Object, e As EventArgs) Handles ucrReceiverDataToFit.Leave
- ucrBase.clsRsyntax.AddParameter("xdat", ucrReceiverDataToFit.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("xdat", clsRFunctionParameter:=ucrReceiverDataToFit.GetVariables())
End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgGammaDistr.vb b/instat/dlgGammaDistr.vb
index e82542e0362..83e691be519 100644
--- a/instat/dlgGammaDistr.vb
+++ b/instat/dlgGammaDistr.vb
@@ -66,7 +66,7 @@ Public Class dlgGammaDistr
End Sub
Private Sub ucrReceiverColumn_leave(sender As Object, e As EventArgs) Handles ucrReceiverColumn.Leave
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverColumn.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverColumn.GetVariables())
End Sub
Private Sub ucrReceiverColumn_Load(sender As Object, e As EventArgs)
diff --git a/instat/dlgHistogram.vb b/instat/dlgHistogram.vb
index e1e27bfe33c..fbb33ae2ce1 100644
--- a/instat/dlgHistogram.vb
+++ b/instat/dlgHistogram.vb
@@ -31,7 +31,7 @@ Public Class dlgHistogram
Private Sub ucrXReceiver_ValueChanged(sender As Object, e As EventArgs) Handles ucrXReceiver.ValueChanged
If Not (ucrXReceiver.txtReceiverSingle.Text = "") Then
- ucrBase.clsRsyntax.AddParameter("x", ucrXReceiver.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrXReceiver.GetVariables())
ucrBase.OKEnabled(True)
Else
ucrBase.OKEnabled(False)
diff --git a/instat/dlgMovingAverage.vb b/instat/dlgMovingAverage.vb
index bf69467acbd..84a4c332cd8 100644
--- a/instat/dlgMovingAverage.vb
+++ b/instat/dlgMovingAverage.vb
@@ -25,6 +25,6 @@ Public Class dlgMovingAverage
End Sub
Private Sub ucrReceiverDataToAverage_Leave(sender As Object, e As EventArgs) Handles ucrReceiverDataToAverage.Leave
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverDataToAverage.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverDataToAverage.GetVariables())
End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgNon-ParametricANOVA.vb b/instat/dlgNon-ParametricANOVA.vb
index 6f57c34778b..f0bf7f509ff 100644
--- a/instat/dlgNon-ParametricANOVA.vb
+++ b/instat/dlgNon-ParametricANOVA.vb
@@ -37,10 +37,10 @@ Public Class dlgNon_ParametricANOVA
FillFormula()
End Sub
Private Sub FillFormula()
- Dim strYVariate As String
- Dim strFactor As String
- strYVariate = ucrReceiverYVariate.GetVariables()
- strFactor = ucrReceiverFactor.GetVariables()
+ Dim strYVariate As String = ""
+ Dim strFactor As String = ""
+ 'strYVariate = ucrReceiverYVariate.GetVariables()
+ 'strFactor = ucrReceiverFactor.GetVariables()
If ((Not (strYVariate = "")) And (Not (strFactor = ""))) Then
ucrBase.clsRsyntax.AddParameter("formula", strYVariate & "~" & strFactor)
ucrBase.OKEnabled(True)
diff --git a/instat/dlgOneSample.vb b/instat/dlgOneSample.vb
index bd0ab267e23..dd5189c32a6 100644
--- a/instat/dlgOneSample.vb
+++ b/instat/dlgOneSample.vb
@@ -49,7 +49,7 @@ Public Class dlgOneSample
Private Sub ucrReceiverDataColumn_ValueChanged(sender As Object, e As EventArgs) Handles ucrReceiverDataColumn.ValueChanged
If Not (ucrReceiverDataColumn.txtReceiverSingle.Text = "") Then
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverDataColumn.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverDataColumn.GetVariables())
ucrBase.clsRsyntax.AddParameter("n", frmEditor.grdData.CurrentWorksheet.RowCount)
ucrBase.OKEnabled(True)
Else
diff --git a/instat/dlgPlot.vb b/instat/dlgPlot.vb
index 2e7dcb01da5..0d12ddae242 100644
--- a/instat/dlgPlot.vb
+++ b/instat/dlgPlot.vb
@@ -32,11 +32,11 @@ Public Class dlgPlot
End Sub
Private Sub ucrReceiverY_Leave(sender As Object, e As EventArgs) Handles ucrReceiverY.Leave
- ucrBase.clsRsyntax.AddParameter("y", ucrReceiverY.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("y", clsRFunctionParameter:=ucrReceiverY.GetVariables())
End Sub
Private Sub ucrReceiverX_Leave(sender As Object, e As EventArgs) Handles ucrReceiverX.Leave
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverX.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverX.GetVariables())
End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgProbabilityPlot.vb b/instat/dlgProbabilityPlot.vb
index ff1b41216c4..595374848e4 100644
--- a/instat/dlgProbabilityPlot.vb
+++ b/instat/dlgProbabilityPlot.vb
@@ -64,7 +64,7 @@ Public Class dlgProbabilityPlot
End Sub
Private Sub UcrReceiverSingle_Leave(sender As Object, e As EventArgs) Handles ucrReceiverPlotVariable.Leave
- ucrBase.clsRsyntax.AddParameter("y", ucrReceiverPlotVariable.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("y", clsRFunctionParameter:=ucrReceiverPlotVariable.GetVariables())
End Sub
End Class
diff --git a/instat/dlgRandomSample.designer.vb b/instat/dlgRandomSample.designer.vb
index afbe662682b..98bc72cf449 100644
--- a/instat/dlgRandomSample.designer.vb
+++ b/instat/dlgRandomSample.designer.vb
@@ -27,12 +27,14 @@ Partial Class dlgRandomSample
Me.txtSeed = New System.Windows.Forms.TextBox()
Me.ucrDistWithParameters = New instat.ucrDistributionsWithParameters()
Me.ucrBase = New instat.ucrButtons()
+ Me.ucrDataFrameSelector = New instat.ucrDataFrame()
+ Me.ucrNewColumnNameSelector = New instat.ucrNewColumnName()
Me.SuspendLayout()
'
'chkPlot
'
Me.chkPlot.AutoSize = True
- Me.chkPlot.Location = New System.Drawing.Point(245, 8)
+ Me.chkPlot.Location = New System.Drawing.Point(190, 268)
Me.chkPlot.Name = "chkPlot"
Me.chkPlot.Size = New System.Drawing.Size(44, 17)
Me.chkPlot.TabIndex = 4
@@ -43,7 +45,7 @@ Partial Class dlgRandomSample
'lblSeed
'
Me.lblSeed.AutoSize = True
- Me.lblSeed.Location = New System.Drawing.Point(314, 10)
+ Me.lblSeed.Location = New System.Drawing.Point(276, 269)
Me.lblSeed.Name = "lblSeed"
Me.lblSeed.Size = New System.Drawing.Size(32, 13)
Me.lblSeed.TabIndex = 5
@@ -52,30 +54,46 @@ Partial Class dlgRandomSample
'
'txtSeed
'
- Me.txtSeed.Location = New System.Drawing.Point(353, 8)
+ Me.txtSeed.Location = New System.Drawing.Point(315, 262)
Me.txtSeed.Name = "txtSeed"
Me.txtSeed.Size = New System.Drawing.Size(47, 20)
Me.txtSeed.TabIndex = 6
'
'ucrDistWithParameters
'
- Me.ucrDistWithParameters.Location = New System.Drawing.Point(-1, -2)
+ Me.ucrDistWithParameters.Location = New System.Drawing.Point(6, 45)
Me.ucrDistWithParameters.Name = "ucrDistWithParameters"
Me.ucrDistWithParameters.Size = New System.Drawing.Size(221, 156)
Me.ucrDistWithParameters.TabIndex = 7
'
'ucrBase
'
- Me.ucrBase.Location = New System.Drawing.Point(12, 163)
+ Me.ucrBase.Location = New System.Drawing.Point(12, 286)
Me.ucrBase.Name = "ucrBase"
Me.ucrBase.Size = New System.Drawing.Size(410, 55)
Me.ucrBase.TabIndex = 0
'
+ 'ucrDataFrameSelector
+ '
+ Me.ucrDataFrameSelector.Location = New System.Drawing.Point(3, 2)
+ Me.ucrDataFrameSelector.Name = "ucrDataFrameSelector"
+ Me.ucrDataFrameSelector.Size = New System.Drawing.Size(127, 41)
+ Me.ucrDataFrameSelector.TabIndex = 8
+ '
+ 'ucrNewColumnNameSelector
+ '
+ Me.ucrNewColumnNameSelector.Location = New System.Drawing.Point(3, 226)
+ Me.ucrNewColumnNameSelector.Name = "ucrNewColumnNameSelector"
+ Me.ucrNewColumnNameSelector.Size = New System.Drawing.Size(376, 35)
+ Me.ucrNewColumnNameSelector.TabIndex = 9
+ '
'dlgRandomSample
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(418, 213)
+ Me.ClientSize = New System.Drawing.Size(418, 342)
+ Me.Controls.Add(Me.ucrNewColumnNameSelector)
+ Me.Controls.Add(Me.ucrDataFrameSelector)
Me.Controls.Add(Me.ucrDistWithParameters)
Me.Controls.Add(Me.txtSeed)
Me.Controls.Add(Me.lblSeed)
@@ -97,4 +115,6 @@ Partial Class dlgRandomSample
Friend WithEvents lblSeed As Label
Friend WithEvents txtSeed As TextBox
Friend WithEvents ucrDistWithParameters As ucrDistributionsWithParameters
+ Friend WithEvents ucrDataFrameSelector As ucrDataFrame
+ Friend WithEvents ucrNewColumnNameSelector As ucrNewColumnName
End Class
diff --git a/instat/dlgRandomSample.vb b/instat/dlgRandomSample.vb
index dcc2b73788d..7785dc3a2d8 100644
--- a/instat/dlgRandomSample.vb
+++ b/instat/dlgRandomSample.vb
@@ -19,7 +19,29 @@ Public Class dlgRandomSample
Public clsRSyntax As New RSyntax
Private Sub dlgRandomSample_Load(sender As Object, e As EventArgs) Handles MyBase.Load
autoTranslate(Me)
- ucrBase.OKEnabled(False)
- ucrDistWithParameters.ucrBaseButtons = ucrBase
+ 'ucrBase.OKEnabled(False)
+
+ ' Setting distribution type and base function as distribution function
+ ucrDistWithParameters.SetRDistributions()
+ ucrBase.clsRsyntax.clsBaseFunction = ucrDistWithParameters.clsCurrRFunction
+ ucrDistWithParameters.AddParameter("n", ucrDataFrameSelector.strDataFrameLength)
+
+ ' Setting link between DataFrameSelector and NewColumnNameSelector
+ ' TODO tidy these links up
+ ucrDataFrameSelector.SetColumnList(ucrNewColumnNameSelector)
+ ucrNewColumnNameSelector.SetDataFrameSelector(ucrDataFrameSelector)
+ ucrNewColumnNameSelector.SetPrefix("Rand")
+
+ ' Setting the assign
+ ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrNewColumnNameSelector.cboColumnName.Text, strTempDataframe:=ucrDataFrameSelector.cboAvailableDataFrames.Text, strTempColumn:=ucrNewColumnNameSelector.cboColumnName.Text)
+
+ End Sub
+
+ Private Sub ucrDataFrameSelector_Leave(sender As Object, e As EventArgs) Handles ucrDataFrameSelector.Leave
+ ucrDistWithParameters.AddParameter("n", ucrDataFrameSelector.strDataFrameLength)
+ End Sub
+
+ Private Sub ucrNewColumnNameSelector_Leave(sender As Object, e As EventArgs) Handles ucrNewColumnNameSelector.Leave
+ ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrNewColumnNameSelector.cboColumnName.Text, strTempDataframe:=ucrDataFrameSelector.cboAvailableDataFrames.Text, strTempColumn:=ucrNewColumnNameSelector.cboColumnName.Text)
End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgRegularSequence.designer.vb b/instat/dlgRegularSequence.designer.vb
index 27918cdc766..d81cdea8e40 100644
--- a/instat/dlgRegularSequence.designer.vb
+++ b/instat/dlgRegularSequence.designer.vb
@@ -24,336 +24,215 @@ Partial Class dlgRegularSequence
Private Sub InitializeComponent()
Me.grpSequenceType = New System.Windows.Forms.GroupBox()
Me.rdoDates = New System.Windows.Forms.RadioButton()
- Me.rdoSingleValue = New System.Windows.Forms.RadioButton()
- Me.rdoSequence = New System.Windows.Forms.RadioButton()
- Me.grpSequence = New System.Windows.Forms.GroupBox()
+ Me.rdoNumeric = New System.Windows.Forms.RadioButton()
+ Me.grpSequenceDefinition = New System.Windows.Forms.GroupBox()
+ Me.dtpSelectorB = New System.Windows.Forms.DateTimePicker()
+ Me.dtpSelectorA = New System.Windows.Forms.DateTimePicker()
+ Me.txtRepeatValues = New System.Windows.Forms.TextBox()
+ Me.cboInStepsOf = New System.Windows.Forms.ComboBox()
+ Me.chkDefineAsFactor = New System.Windows.Forms.CheckBox()
+ Me.lblTimes1 = New System.Windows.Forms.Label()
+ Me.lblRepeatValues = New System.Windows.Forms.Label()
Me.lblSteps = New System.Windows.Forms.Label()
Me.lblTo = New System.Windows.Forms.Label()
Me.lblFrom = New System.Windows.Forms.Label()
Me.txtFrom = New System.Windows.Forms.TextBox()
Me.txtTo = New System.Windows.Forms.TextBox()
- Me.txtSteps = New System.Windows.Forms.TextBox()
- Me.grpRepeatSingle = New System.Windows.Forms.GroupBox()
- Me.lblTimes = New System.Windows.Forms.Label()
- Me.lblRepeated = New System.Windows.Forms.Label()
- Me.txtRepeatTimes = New System.Windows.Forms.TextBox()
- Me.txtValue = New System.Windows.Forms.TextBox()
- Me.lblValue = New System.Windows.Forms.Label()
- Me.grpSequence2 = New System.Windows.Forms.GroupBox()
- Me.cboBy = New System.Windows.Forms.ComboBox()
- Me.dtSelectorA = New System.Windows.Forms.DateTimePicker()
- Me.dtSelectorB = New System.Windows.Forms.DateTimePicker()
- Me.lblBy = New System.Windows.Forms.Label()
- Me.lblToDate = New System.Windows.Forms.Label()
- Me.lblFromDate = New System.Windows.Forms.Label()
- Me.ucrColName = New instat.ucrNewColumnName()
- Me.ucrSelectDataFrame = New instat.ucrDataFrame()
- Me.ucrBase = New instat.ucrButtons()
- Me.lstPreview = New System.Windows.Forms.ListBox()
Me.txtLength = New System.Windows.Forms.TextBox()
Me.lblPreview = New System.Windows.Forms.Label()
Me.lblLength = New System.Windows.Forms.Label()
- Me.cmdShowHide = New System.Windows.Forms.Button()
Me.cmdRefreshPreview = New System.Windows.Forms.Button()
- Me.grpFillFrom = New System.Windows.Forms.GroupBox()
- Me.lblOverwrite = New System.Windows.Forms.Label()
- Me.txtOverwrite = New System.Windows.Forms.TextBox()
- Me.rdoAppend = New System.Windows.Forms.RadioButton()
- Me.rdoRow = New System.Windows.Forms.RadioButton()
- Me.rdoTop = New System.Windows.Forms.RadioButton()
+ Me.ucrColName = New instat.ucrNewColumnName()
+ Me.ucrSelectDataFrame = New instat.ucrDataFrame()
+ Me.ucrBase = New instat.ucrButtons()
+ Me.txtGetPreview = New System.Windows.Forms.RichTextBox()
Me.grpSequenceType.SuspendLayout()
- Me.grpSequence.SuspendLayout()
- Me.grpRepeatSingle.SuspendLayout()
- Me.grpSequence2.SuspendLayout()
- Me.grpFillFrom.SuspendLayout()
+ Me.grpSequenceDefinition.SuspendLayout()
Me.SuspendLayout()
'
'grpSequenceType
'
Me.grpSequenceType.Controls.Add(Me.rdoDates)
- Me.grpSequenceType.Controls.Add(Me.rdoSingleValue)
- Me.grpSequenceType.Controls.Add(Me.rdoSequence)
+ Me.grpSequenceType.Controls.Add(Me.rdoNumeric)
Me.grpSequenceType.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.grpSequenceType.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.grpSequenceType.Location = New System.Drawing.Point(228, 12)
+ Me.grpSequenceType.Location = New System.Drawing.Point(12, 51)
Me.grpSequenceType.Name = "grpSequenceType"
- Me.grpSequenceType.Size = New System.Drawing.Size(107, 76)
+ Me.grpSequenceType.Size = New System.Drawing.Size(195, 39)
Me.grpSequenceType.TabIndex = 0
Me.grpSequenceType.TabStop = False
+ Me.grpSequenceType.Tag = "Sequence_type"
+ Me.grpSequenceType.Text = "Sequence type"
'
'rdoDates
'
Me.rdoDates.AutoSize = True
Me.rdoDates.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.rdoDates.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.rdoDates.Location = New System.Drawing.Point(0, 58)
+ Me.rdoDates.Location = New System.Drawing.Point(103, 13)
Me.rdoDates.Name = "rdoDates"
Me.rdoDates.Size = New System.Drawing.Size(59, 18)
Me.rdoDates.TabIndex = 2
+ Me.rdoDates.Tag = "Dates"
Me.rdoDates.Text = "Dates"
Me.rdoDates.UseVisualStyleBackColor = True
'
- 'rdoSingleValue
- '
- Me.rdoSingleValue.AutoSize = True
- Me.rdoSingleValue.FlatStyle = System.Windows.Forms.FlatStyle.System
- Me.rdoSingleValue.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.rdoSingleValue.Location = New System.Drawing.Point(0, 34)
- Me.rdoSingleValue.Name = "rdoSingleValue"
- Me.rdoSingleValue.Size = New System.Drawing.Size(89, 18)
- Me.rdoSingleValue.TabIndex = 1
- Me.rdoSingleValue.Text = "Single value"
- Me.rdoSingleValue.UseVisualStyleBackColor = True
- '
- 'rdoSequence
- '
- Me.rdoSequence.AutoSize = True
- Me.rdoSequence.Checked = True
- Me.rdoSequence.FlatStyle = System.Windows.Forms.FlatStyle.System
- Me.rdoSequence.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.rdoSequence.Location = New System.Drawing.Point(0, 10)
- Me.rdoSequence.Name = "rdoSequence"
- Me.rdoSequence.Size = New System.Drawing.Size(85, 18)
- Me.rdoSequence.TabIndex = 0
- Me.rdoSequence.TabStop = True
- Me.rdoSequence.Text = "Sequences"
- Me.rdoSequence.UseVisualStyleBackColor = True
- '
- 'grpSequence
- '
- Me.grpSequence.Controls.Add(Me.lblSteps)
- Me.grpSequence.Controls.Add(Me.lblTo)
- Me.grpSequence.Controls.Add(Me.lblFrom)
- Me.grpSequence.Controls.Add(Me.txtFrom)
- Me.grpSequence.Controls.Add(Me.txtTo)
- Me.grpSequence.Controls.Add(Me.txtSteps)
- Me.grpSequence.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.grpSequence.Location = New System.Drawing.Point(13, 19)
- Me.grpSequence.Name = "grpSequence"
- Me.grpSequence.Size = New System.Drawing.Size(180, 96)
- Me.grpSequence.TabIndex = 0
- Me.grpSequence.TabStop = False
- Me.grpSequence.Text = "`"
- Me.grpSequence.UseCompatibleTextRendering = True
+ 'rdoNumeric
+ '
+ Me.rdoNumeric.AutoSize = True
+ Me.rdoNumeric.Checked = True
+ Me.rdoNumeric.FlatStyle = System.Windows.Forms.FlatStyle.System
+ Me.rdoNumeric.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
+ Me.rdoNumeric.Location = New System.Drawing.Point(6, 13)
+ Me.rdoNumeric.Name = "rdoNumeric"
+ Me.rdoNumeric.Size = New System.Drawing.Size(70, 18)
+ Me.rdoNumeric.TabIndex = 0
+ Me.rdoNumeric.TabStop = True
+ Me.rdoNumeric.Tag = "Numeric"
+ Me.rdoNumeric.Text = "Numeric"
+ Me.rdoNumeric.UseVisualStyleBackColor = True
+ '
+ 'grpSequenceDefinition
+ '
+ Me.grpSequenceDefinition.Controls.Add(Me.dtpSelectorB)
+ Me.grpSequenceDefinition.Controls.Add(Me.dtpSelectorA)
+ Me.grpSequenceDefinition.Controls.Add(Me.txtRepeatValues)
+ Me.grpSequenceDefinition.Controls.Add(Me.cboInStepsOf)
+ Me.grpSequenceDefinition.Controls.Add(Me.chkDefineAsFactor)
+ Me.grpSequenceDefinition.Controls.Add(Me.lblTimes1)
+ Me.grpSequenceDefinition.Controls.Add(Me.lblRepeatValues)
+ Me.grpSequenceDefinition.Controls.Add(Me.lblSteps)
+ Me.grpSequenceDefinition.Controls.Add(Me.lblTo)
+ Me.grpSequenceDefinition.Controls.Add(Me.lblFrom)
+ Me.grpSequenceDefinition.Controls.Add(Me.txtFrom)
+ Me.grpSequenceDefinition.Controls.Add(Me.txtTo)
+ Me.grpSequenceDefinition.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
+ Me.grpSequenceDefinition.Location = New System.Drawing.Point(12, 100)
+ Me.grpSequenceDefinition.Name = "grpSequenceDefinition"
+ Me.grpSequenceDefinition.Size = New System.Drawing.Size(195, 152)
+ Me.grpSequenceDefinition.TabIndex = 0
+ Me.grpSequenceDefinition.TabStop = False
+ Me.grpSequenceDefinition.Tag = "Sequence_definition"
+ Me.grpSequenceDefinition.Text = "Sequence definition"
+ Me.grpSequenceDefinition.UseCompatibleTextRendering = True
+ '
+ 'dtpSelectorB
+ '
+ Me.dtpSelectorB.Location = New System.Drawing.Point(100, 50)
+ Me.dtpSelectorB.Name = "dtpSelectorB"
+ Me.dtpSelectorB.Size = New System.Drawing.Size(95, 20)
+ Me.dtpSelectorB.TabIndex = 26
+ '
+ 'dtpSelectorA
+ '
+ Me.dtpSelectorA.Location = New System.Drawing.Point(100, 22)
+ Me.dtpSelectorA.Name = "dtpSelectorA"
+ Me.dtpSelectorA.Size = New System.Drawing.Size(95, 20)
+ Me.dtpSelectorA.TabIndex = 22
+ '
+ 'txtRepeatValues
+ '
+ Me.txtRepeatValues.Location = New System.Drawing.Point(100, 103)
+ Me.txtRepeatValues.Name = "txtRepeatValues"
+ Me.txtRepeatValues.Size = New System.Drawing.Size(38, 20)
+ Me.txtRepeatValues.TabIndex = 25
+ Me.txtRepeatValues.Tag = ""
+ '
+ 'cboInStepsOf
+ '
+ Me.cboInStepsOf.FormattingEnabled = True
+ Me.cboInStepsOf.Location = New System.Drawing.Point(100, 76)
+ Me.cboInStepsOf.Name = "cboInStepsOf"
+ Me.cboInStepsOf.Size = New System.Drawing.Size(38, 21)
+ Me.cboInStepsOf.TabIndex = 24
+ '
+ 'chkDefineAsFactor
+ '
+ Me.chkDefineAsFactor.AutoSize = True
+ Me.chkDefineAsFactor.Checked = True
+ Me.chkDefineAsFactor.CheckState = System.Windows.Forms.CheckState.Checked
+ Me.chkDefineAsFactor.Enabled = False
+ Me.chkDefineAsFactor.Location = New System.Drawing.Point(9, 129)
+ Me.chkDefineAsFactor.Name = "chkDefineAsFactor"
+ Me.chkDefineAsFactor.Size = New System.Drawing.Size(101, 17)
+ Me.chkDefineAsFactor.TabIndex = 23
+ Me.chkDefineAsFactor.Tag = "Define_as_factor"
+ Me.chkDefineAsFactor.Text = "Define as factor"
+ Me.chkDefineAsFactor.UseVisualStyleBackColor = True
+ '
+ 'lblTimes1
+ '
+ Me.lblTimes1.AutoSize = True
+ Me.lblTimes1.Location = New System.Drawing.Point(144, 108)
+ Me.lblTimes1.Name = "lblTimes1"
+ Me.lblTimes1.Size = New System.Drawing.Size(41, 13)
+ Me.lblTimes1.TabIndex = 22
+ Me.lblTimes1.Tag = "Times"
+ Me.lblTimes1.Text = "Time(s)"
+ '
+ 'lblRepeatValues
+ '
+ Me.lblRepeatValues.AutoSize = True
+ Me.lblRepeatValues.Location = New System.Drawing.Point(6, 108)
+ Me.lblRepeatValues.Name = "lblRepeatValues"
+ Me.lblRepeatValues.Size = New System.Drawing.Size(76, 13)
+ Me.lblRepeatValues.TabIndex = 22
+ Me.lblRepeatValues.Tag = "Repeat_values"
+ Me.lblRepeatValues.Text = "Repeat values"
'
'lblSteps
'
Me.lblSteps.AutoSize = True
Me.lblSteps.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.lblSteps.Location = New System.Drawing.Point(6, 71)
+ Me.lblSteps.Location = New System.Drawing.Point(6, 82)
Me.lblSteps.Name = "lblSteps"
Me.lblSteps.Size = New System.Drawing.Size(56, 13)
Me.lblSteps.TabIndex = 2
+ Me.lblSteps.Tag = "In_steps_of"
Me.lblSteps.Text = "In steps of"
'
'lblTo
'
Me.lblTo.AutoSize = True
Me.lblTo.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.lblTo.Location = New System.Drawing.Point(6, 43)
+ Me.lblTo.Location = New System.Drawing.Point(6, 56)
Me.lblTo.Name = "lblTo"
Me.lblTo.Size = New System.Drawing.Size(20, 13)
Me.lblTo.TabIndex = 1
+ Me.lblTo.Tag = "To"
Me.lblTo.Text = "To"
'
'lblFrom
'
Me.lblFrom.AutoSize = True
Me.lblFrom.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.lblFrom.Location = New System.Drawing.Point(6, 19)
+ Me.lblFrom.Location = New System.Drawing.Point(6, 30)
Me.lblFrom.Name = "lblFrom"
Me.lblFrom.Size = New System.Drawing.Size(30, 13)
Me.lblFrom.TabIndex = 0
+ Me.lblFrom.Tag = "From"
Me.lblFrom.Text = "From"
'
'txtFrom
'
Me.txtFrom.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.txtFrom.Location = New System.Drawing.Point(78, 19)
+ Me.txtFrom.Location = New System.Drawing.Point(100, 23)
Me.txtFrom.Name = "txtFrom"
- Me.txtFrom.Size = New System.Drawing.Size(60, 20)
+ Me.txtFrom.Size = New System.Drawing.Size(38, 20)
Me.txtFrom.TabIndex = 3
'
'txtTo
'
Me.txtTo.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.txtTo.Location = New System.Drawing.Point(78, 43)
+ Me.txtTo.Location = New System.Drawing.Point(100, 49)
Me.txtTo.Name = "txtTo"
- Me.txtTo.Size = New System.Drawing.Size(60, 20)
+ Me.txtTo.Size = New System.Drawing.Size(38, 20)
Me.txtTo.TabIndex = 4
'
- 'txtSteps
- '
- Me.txtSteps.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.txtSteps.Location = New System.Drawing.Point(78, 67)
- Me.txtSteps.Name = "txtSteps"
- Me.txtSteps.Size = New System.Drawing.Size(60, 20)
- Me.txtSteps.TabIndex = 5
- '
- 'grpRepeatSingle
- '
- Me.grpRepeatSingle.Controls.Add(Me.lblTimes)
- Me.grpRepeatSingle.Controls.Add(Me.lblRepeated)
- Me.grpRepeatSingle.Controls.Add(Me.txtRepeatTimes)
- Me.grpRepeatSingle.Controls.Add(Me.txtValue)
- Me.grpRepeatSingle.Controls.Add(Me.lblValue)
- Me.grpRepeatSingle.Location = New System.Drawing.Point(2, 102)
- Me.grpRepeatSingle.Name = "grpRepeatSingle"
- Me.grpRepeatSingle.Size = New System.Drawing.Size(179, 100)
- Me.grpRepeatSingle.TabIndex = 9
- Me.grpRepeatSingle.TabStop = False
- Me.grpRepeatSingle.Text = "Repeat Single Value"
- '
- 'lblTimes
- '
- Me.lblTimes.AutoSize = True
- Me.lblTimes.Location = New System.Drawing.Point(129, 59)
- Me.lblTimes.Name = "lblTimes"
- Me.lblTimes.Size = New System.Drawing.Size(37, 13)
- Me.lblTimes.TabIndex = 2
- Me.lblTimes.Text = "time(s)"
- '
- 'lblRepeated
- '
- Me.lblRepeated.AutoSize = True
- Me.lblRepeated.Location = New System.Drawing.Point(6, 59)
- Me.lblRepeated.Name = "lblRepeated"
- Me.lblRepeated.Size = New System.Drawing.Size(54, 13)
- Me.lblRepeated.TabIndex = 1
- Me.lblRepeated.Tag = "Repeated"
- Me.lblRepeated.Text = "Repeated"
- '
- 'txtRepeatTimes
- '
- Me.txtRepeatTimes.Location = New System.Drawing.Point(66, 52)
- Me.txtRepeatTimes.Name = "txtRepeatTimes"
- Me.txtRepeatTimes.Size = New System.Drawing.Size(58, 20)
- Me.txtRepeatTimes.TabIndex = 4
- '
- 'txtValue
- '
- Me.txtValue.Location = New System.Drawing.Point(66, 26)
- Me.txtValue.Name = "txtValue"
- Me.txtValue.Size = New System.Drawing.Size(58, 20)
- Me.txtValue.TabIndex = 3
- '
- 'lblValue
- '
- Me.lblValue.AutoSize = True
- Me.lblValue.Location = New System.Drawing.Point(5, 33)
- Me.lblValue.Name = "lblValue"
- Me.lblValue.Size = New System.Drawing.Size(34, 13)
- Me.lblValue.TabIndex = 0
- Me.lblValue.Tag = "Value"
- Me.lblValue.Text = "Value"
- '
- 'grpSequence2
- '
- Me.grpSequence2.Controls.Add(Me.cboBy)
- Me.grpSequence2.Controls.Add(Me.dtSelectorA)
- Me.grpSequence2.Controls.Add(Me.dtSelectorB)
- Me.grpSequence2.Controls.Add(Me.lblBy)
- Me.grpSequence2.Controls.Add(Me.lblToDate)
- Me.grpSequence2.Controls.Add(Me.lblFromDate)
- Me.grpSequence2.Controls.Add(Me.grpSequence)
- Me.grpSequence2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.grpSequence2.Location = New System.Drawing.Point(2, 83)
- Me.grpSequence2.Name = "grpSequence2"
- Me.grpSequence2.Size = New System.Drawing.Size(180, 95)
- Me.grpSequence2.TabIndex = 10
- Me.grpSequence2.TabStop = False
- Me.grpSequence2.Text = "Sequence Definition"
- Me.grpSequence2.UseCompatibleTextRendering = True
- '
- 'cboBy
- '
- Me.cboBy.FormattingEnabled = True
- Me.cboBy.Items.AddRange(New Object() {"day", "week", "month", "quarter", "year"})
- Me.cboBy.Location = New System.Drawing.Point(78, 68)
- Me.cboBy.Name = "cboBy"
- Me.cboBy.Size = New System.Drawing.Size(62, 21)
- Me.cboBy.TabIndex = 12
- '
- 'dtSelectorA
- '
- Me.dtSelectorA.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
- Me.dtSelectorA.Location = New System.Drawing.Point(78, 20)
- Me.dtSelectorA.Name = "dtSelectorA"
- Me.dtSelectorA.Size = New System.Drawing.Size(84, 20)
- Me.dtSelectorA.TabIndex = 10
- '
- 'dtSelectorB
- '
- Me.dtSelectorB.CustomFormat = "dd/mm/yyyy"
- Me.dtSelectorB.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
- Me.dtSelectorB.Location = New System.Drawing.Point(78, 46)
- Me.dtSelectorB.Name = "dtSelectorB"
- Me.dtSelectorB.Size = New System.Drawing.Size(84, 20)
- Me.dtSelectorB.TabIndex = 11
- '
- 'lblBy
- '
- Me.lblBy.AutoSize = True
- Me.lblBy.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.lblBy.Location = New System.Drawing.Point(10, 74)
- Me.lblBy.Name = "lblBy"
- Me.lblBy.Size = New System.Drawing.Size(19, 13)
- Me.lblBy.TabIndex = 2
- Me.lblBy.Tag = "By"
- Me.lblBy.Text = "By"
- '
- 'lblToDate
- '
- Me.lblToDate.AutoSize = True
- Me.lblToDate.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.lblToDate.Location = New System.Drawing.Point(6, 43)
- Me.lblToDate.Name = "lblToDate"
- Me.lblToDate.Size = New System.Drawing.Size(20, 13)
- Me.lblToDate.TabIndex = 1
- Me.lblToDate.Text = "To"
- '
- 'lblFromDate
- '
- Me.lblFromDate.AutoSize = True
- Me.lblFromDate.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.lblFromDate.Location = New System.Drawing.Point(6, 19)
- Me.lblFromDate.Name = "lblFromDate"
- Me.lblFromDate.Size = New System.Drawing.Size(30, 13)
- Me.lblFromDate.TabIndex = 0
- Me.lblFromDate.Text = "From"
- '
- 'ucrColName
- '
- Me.ucrColName.Location = New System.Drawing.Point(11, 212)
- Me.ucrColName.Name = "ucrColName"
- Me.ucrColName.Size = New System.Drawing.Size(402, 35)
- Me.ucrColName.TabIndex = 16
- '
- 'ucrSelectDataFrame
- '
- Me.ucrSelectDataFrame.Location = New System.Drawing.Point(14, 12)
- Me.ucrSelectDataFrame.Name = "ucrSelectDataFrame"
- Me.ucrSelectDataFrame.Size = New System.Drawing.Size(150, 63)
- Me.ucrSelectDataFrame.TabIndex = 15
- '
- 'ucrBase
- '
- Me.ucrBase.Location = New System.Drawing.Point(12, 253)
- Me.ucrBase.Name = "ucrBase"
- Me.ucrBase.Size = New System.Drawing.Size(404, 55)
- Me.ucrBase.TabIndex = 5
- '
- 'lstPreview
- '
- Me.lstPreview.FormattingEnabled = True
- Me.lstPreview.Location = New System.Drawing.Point(453, 83)
- Me.lstPreview.Name = "lstPreview"
- Me.lstPreview.Size = New System.Drawing.Size(120, 225)
- Me.lstPreview.TabIndex = 17
- '
'txtLength
'
- Me.txtLength.Location = New System.Drawing.Point(512, 12)
+ Me.txtLength.Enabled = False
+ Me.txtLength.Location = New System.Drawing.Point(147, 25)
Me.txtLength.Name = "txtLength"
Me.txtLength.Size = New System.Drawing.Size(58, 20)
Me.txtLength.TabIndex = 18
@@ -361,127 +240,75 @@ Partial Class dlgRegularSequence
'lblPreview
'
Me.lblPreview.AutoSize = True
- Me.lblPreview.Location = New System.Drawing.Point(450, 61)
+ Me.lblPreview.Location = New System.Drawing.Point(235, 48)
Me.lblPreview.Name = "lblPreview"
- Me.lblPreview.Size = New System.Drawing.Size(45, 13)
+ Me.lblPreview.Size = New System.Drawing.Size(64, 13)
Me.lblPreview.TabIndex = 19
- Me.lblPreview.Tag = "Preview"
- Me.lblPreview.Text = "Preview"
+ Me.lblPreview.Tag = "Get_preview"
+ Me.lblPreview.Text = "Get preview"
'
'lblLength
'
Me.lblLength.AutoSize = True
- Me.lblLength.Location = New System.Drawing.Point(450, 19)
+ Me.lblLength.Location = New System.Drawing.Point(157, 9)
Me.lblLength.Name = "lblLength"
Me.lblLength.Size = New System.Drawing.Size(40, 13)
Me.lblLength.TabIndex = 19
Me.lblLength.Tag = "Length"
Me.lblLength.Text = "Length"
'
- 'cmdShowHide
- '
- Me.cmdShowHide.Location = New System.Drawing.Point(341, 12)
- Me.cmdShowHide.Name = "cmdShowHide"
- Me.cmdShowHide.Size = New System.Drawing.Size(75, 36)
- Me.cmdShowHide.TabIndex = 20
- Me.cmdShowHide.Tag = "Show/Hide_preview"
- Me.cmdShowHide.Text = "Show/Hide Preview"
- Me.cmdShowHide.UseVisualStyleBackColor = True
- '
'cmdRefreshPreview
'
- Me.cmdRefreshPreview.Location = New System.Drawing.Point(341, 61)
+ Me.cmdRefreshPreview.Location = New System.Drawing.Point(238, 22)
Me.cmdRefreshPreview.Name = "cmdRefreshPreview"
- Me.cmdRefreshPreview.Size = New System.Drawing.Size(75, 47)
+ Me.cmdRefreshPreview.Size = New System.Drawing.Size(176, 23)
Me.cmdRefreshPreview.TabIndex = 20
Me.cmdRefreshPreview.Tag = "Refresh_Preview"
Me.cmdRefreshPreview.Text = "Refresh Preview"
Me.cmdRefreshPreview.UseVisualStyleBackColor = True
'
- 'grpFillFrom
- '
- Me.grpFillFrom.Controls.Add(Me.lblOverwrite)
- Me.grpFillFrom.Controls.Add(Me.txtOverwrite)
- Me.grpFillFrom.Controls.Add(Me.rdoAppend)
- Me.grpFillFrom.Controls.Add(Me.rdoRow)
- Me.grpFillFrom.Controls.Add(Me.rdoTop)
- Me.grpFillFrom.Location = New System.Drawing.Point(228, 114)
- Me.grpFillFrom.Name = "grpFillFrom"
- Me.grpFillFrom.Size = New System.Drawing.Size(188, 100)
- Me.grpFillFrom.TabIndex = 21
- Me.grpFillFrom.TabStop = False
- Me.grpFillFrom.Tag = "Fill_from"
- Me.grpFillFrom.Text = "Fill from"
- '
- 'lblOverwrite
- '
- Me.lblOverwrite.AutoSize = True
- Me.lblOverwrite.Location = New System.Drawing.Point(113, 51)
- Me.lblOverwrite.Name = "lblOverwrite"
- Me.lblOverwrite.Size = New System.Drawing.Size(58, 13)
- Me.lblOverwrite.TabIndex = 2
- Me.lblOverwrite.Tag = "Overwrite"
- Me.lblOverwrite.Text = "(Overwrite)"
- '
- 'txtOverwrite
- '
- Me.txtOverwrite.Location = New System.Drawing.Point(53, 44)
- Me.txtOverwrite.Name = "txtOverwrite"
- Me.txtOverwrite.Size = New System.Drawing.Size(54, 20)
- Me.txtOverwrite.TabIndex = 1
- '
- 'rdoAppend
- '
- Me.rdoAppend.AutoSize = True
- Me.rdoAppend.Location = New System.Drawing.Point(0, 65)
- Me.rdoAppend.Name = "rdoAppend"
- Me.rdoAppend.Size = New System.Drawing.Size(62, 17)
- Me.rdoAppend.TabIndex = 0
- Me.rdoAppend.TabStop = True
- Me.rdoAppend.Tag = "Append"
- Me.rdoAppend.Text = "Append"
- Me.rdoAppend.UseVisualStyleBackColor = True
- '
- 'rdoRow
- '
- Me.rdoRow.AutoSize = True
- Me.rdoRow.Location = New System.Drawing.Point(0, 42)
- Me.rdoRow.Name = "rdoRow"
- Me.rdoRow.Size = New System.Drawing.Size(47, 17)
- Me.rdoRow.TabIndex = 0
- Me.rdoRow.TabStop = True
- Me.rdoRow.Tag = "Row"
- Me.rdoRow.Text = "Row"
- Me.rdoRow.UseVisualStyleBackColor = True
- '
- 'rdoTop
- '
- Me.rdoTop.AutoSize = True
- Me.rdoTop.Location = New System.Drawing.Point(0, 19)
- Me.rdoTop.Name = "rdoTop"
- Me.rdoTop.Size = New System.Drawing.Size(44, 17)
- Me.rdoTop.TabIndex = 0
- Me.rdoTop.TabStop = True
- Me.rdoTop.Tag = "Top"
- Me.rdoTop.Text = "Top"
- Me.rdoTop.UseVisualStyleBackColor = True
+ 'ucrColName
+ '
+ Me.ucrColName.Location = New System.Drawing.Point(12, 258)
+ Me.ucrColName.Name = "ucrColName"
+ Me.ucrColName.Size = New System.Drawing.Size(402, 35)
+ Me.ucrColName.TabIndex = 16
+ '
+ 'ucrSelectDataFrame
+ '
+ Me.ucrSelectDataFrame.Location = New System.Drawing.Point(12, 9)
+ Me.ucrSelectDataFrame.Name = "ucrSelectDataFrame"
+ Me.ucrSelectDataFrame.Size = New System.Drawing.Size(126, 39)
+ Me.ucrSelectDataFrame.TabIndex = 15
+ '
+ 'ucrBase
+ '
+ Me.ucrBase.Location = New System.Drawing.Point(12, 296)
+ Me.ucrBase.Name = "ucrBase"
+ Me.ucrBase.Size = New System.Drawing.Size(402, 55)
+ Me.ucrBase.TabIndex = 5
+ '
+ 'txtGetPreview
+ '
+ Me.txtGetPreview.Location = New System.Drawing.Point(238, 74)
+ Me.txtGetPreview.Name = "txtGetPreview"
+ Me.txtGetPreview.Size = New System.Drawing.Size(171, 172)
+ Me.txtGetPreview.TabIndex = 21
+ Me.txtGetPreview.Text = ""
'
'dlgRegularSequence
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(426, 321)
- Me.Controls.Add(Me.grpFillFrom)
+ Me.ClientSize = New System.Drawing.Size(421, 351)
+ Me.Controls.Add(Me.txtGetPreview)
Me.Controls.Add(Me.cmdRefreshPreview)
- Me.Controls.Add(Me.cmdShowHide)
+ Me.Controls.Add(Me.grpSequenceDefinition)
Me.Controls.Add(Me.lblLength)
Me.Controls.Add(Me.lblPreview)
- Me.Controls.Add(Me.grpRepeatSingle)
Me.Controls.Add(Me.txtLength)
- Me.Controls.Add(Me.lstPreview)
Me.Controls.Add(Me.ucrColName)
Me.Controls.Add(Me.ucrSelectDataFrame)
- Me.Controls.Add(Me.grpSequence2)
Me.Controls.Add(Me.ucrBase)
Me.Controls.Add(Me.grpSequenceType)
Me.MaximizeBox = False
@@ -489,59 +316,39 @@ Partial Class dlgRegularSequence
Me.Name = "dlgRegularSequence"
Me.ShowIcon = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
+ Me.Tag = "Entry_of_regular_sequence"
Me.Text = "Entry of regular sequence"
Me.grpSequenceType.ResumeLayout(False)
Me.grpSequenceType.PerformLayout()
- Me.grpSequence.ResumeLayout(False)
- Me.grpSequence.PerformLayout()
- Me.grpRepeatSingle.ResumeLayout(False)
- Me.grpRepeatSingle.PerformLayout()
- Me.grpSequence2.ResumeLayout(False)
- Me.grpSequence2.PerformLayout()
- Me.grpFillFrom.ResumeLayout(False)
- Me.grpFillFrom.PerformLayout()
+ Me.grpSequenceDefinition.ResumeLayout(False)
+ Me.grpSequenceDefinition.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents grpSequenceType As GroupBox
- Friend WithEvents rdoSequence As RadioButton
- Friend WithEvents grpSequence As GroupBox
- Friend WithEvents rdoSingleValue As RadioButton
+ Friend WithEvents rdoNumeric As RadioButton
+ Friend WithEvents grpSequenceDefinition As GroupBox
Friend WithEvents rdoDates As RadioButton
Friend WithEvents lblSteps As Label
Friend WithEvents lblTo As Label
Friend WithEvents lblFrom As Label
Friend WithEvents txtFrom As TextBox
Friend WithEvents txtTo As TextBox
- Friend WithEvents txtSteps As TextBox
Friend WithEvents ucrBase As ucrButtons
- Friend WithEvents grpRepeatSingle As GroupBox
- Friend WithEvents lblTimes As Label
- Friend WithEvents lblRepeated As Label
- Friend WithEvents txtRepeatTimes As TextBox
- Friend WithEvents txtValue As TextBox
- Friend WithEvents lblValue As Label
- Friend WithEvents grpSequence2 As GroupBox
- Friend WithEvents dtSelectorA As DateTimePicker
- Friend WithEvents dtSelectorB As DateTimePicker
- Friend WithEvents lblBy As Label
- Friend WithEvents lblToDate As Label
- Friend WithEvents lblFromDate As Label
- Friend WithEvents cboBy As ComboBox
Friend WithEvents ucrSelectDataFrame As ucrDataFrame
Friend WithEvents ucrColName As ucrNewColumnName
- Friend WithEvents lstPreview As ListBox
Friend WithEvents txtLength As TextBox
Friend WithEvents lblPreview As Label
Friend WithEvents lblLength As Label
- Friend WithEvents cmdShowHide As Button
Friend WithEvents cmdRefreshPreview As Button
- Friend WithEvents grpFillFrom As GroupBox
- Friend WithEvents lblOverwrite As Label
- Friend WithEvents txtOverwrite As TextBox
- Friend WithEvents rdoAppend As RadioButton
- Friend WithEvents rdoRow As RadioButton
- Friend WithEvents rdoTop As RadioButton
+ Friend WithEvents lblTimes1 As Label
+ Friend WithEvents lblRepeatValues As Label
+ Friend WithEvents cboInStepsOf As ComboBox
+ Friend WithEvents chkDefineAsFactor As CheckBox
+ Friend WithEvents txtRepeatValues As TextBox
+ Friend WithEvents dtpSelectorA As DateTimePicker
+ Friend WithEvents dtpSelectorB As DateTimePicker
+ Friend WithEvents txtGetPreview As RichTextBox
End Class
diff --git a/instat/dlgRegularSequence.vb b/instat/dlgRegularSequence.vb
index 55fd6c1b77e..62f681034bc 100644
--- a/instat/dlgRegularSequence.vb
+++ b/instat/dlgRegularSequence.vb
@@ -17,91 +17,101 @@ Imports instat.Translations
Public Class dlgRegularSequence
Dim bIsExtended As Boolean = False
- Private Sub dlgRegularSequence_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- grpSequence2.Hide()
- grpRepeatSingle.Hide()
+ Private Sub dlgRegularSequence_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ucrBase.clsRsyntax.SetFunction("seq")
- autoTranslate(Me)
- ucrSelectDataFrame.SetColumnList(ucrColName)
+ autoTranslate(Me)
+ frmMain.clsRLink.SetOutput(txtGetPreview)
+ dtpSelectorA.Visible = False
+ dtpSelectorB.Visible = False
+ ucrSelectDataFrame.SetColumnList(ucrColName)
+
ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrColName.cboColumnName.Text, strTempDataframe:=ucrSelectDataFrame.cboAvailableDataFrames.Text, strTempColumn:=ucrColName.cboColumnName.Text)
- End Sub
-
- Private Sub rdoSingleValue_Click(sender As Object, e As EventArgs) Handles rdoSingleValue.Click
- grpSequence.Hide()
- grpSequence2.Hide()
- grpRepeatSingle.Visible = True
+ End Sub
+ Private Sub rdoDates_Click(sender As Object, e As EventArgs) Handles rdoDates.Click
+ chkDefineAsFactor.Visible = False
+ dtpSelectorA.Visible = True
+ dtpSelectorB.Visible = True
End Sub
- Private Sub rdoDates_Click(sender As Object, e As EventArgs) Handles rdoDates.Click
- grpSequence.Hide()
- grpRepeatSingle.Hide()
- grpSequence2.Visible = True
- End Sub
- Private Sub rdSequence_Click(sender As Object, e As EventArgs) Handles rdoSequence.Click
- grpRepeatSingle.Hide()
- grpSequence2.Hide()
- grpSequence.Visible = True
- End Sub
-
- Private Sub txtFrom_Leave(sender As Object, e As EventArgs) Handles txtFrom.Leave
- ucrBase.clsRsyntax.AddParameter("from", txtFrom.Text)
- End Sub
-
- Private Sub txtTo_TextChanged(sender As Object, e As EventArgs) Handles txtTo.Leave
- ucrBase.clsRsyntax.AddParameter("to", txtTo.Text)
- End Sub
-
- Private Sub txtSteps_TextChanged(sender As Object, e As EventArgs) Handles txtSteps.Leave
- ucrBase.clsRsyntax.AddParameter("by", txtSteps.Text)
- End Sub
-
- Private Sub dtSelectorA_Leave(sender As Object, e As EventArgs) Handles dtSelectorA.Leave
- ucrBase.clsRsyntax.AddParameter("from", "as.Date('" & Format(dtSelectorA.Value, "yyyy/MM/dd") & "')")
- End Sub
-
- Private Sub dtSelectorB_Leave(sender As Object, e As EventArgs) Handles dtSelectorB.Leave
- ucrBase.clsRsyntax.AddParameter("to", "as.Date('" & Format(dtSelectorB.Value, "yyyy/MM/dd") & "')")
- End Sub
-
- Private Sub cboBy_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboBy.Leave
- ucrBase.clsRsyntax.AddParameter("by", "'" & cboBy.SelectedItem.ToString() & "'")
- End Sub
-
- Private Sub txtValue_TextChanged(sender As Object, e As EventArgs) Handles txtValue.Leave
- Dim funct() As String = {"from", "to"}
- For Each Val As String In funct
- ucrBase.clsRsyntax.AddParameter(Val, txtValue.Text)
- Next
- End Sub
-
- Private Sub txtRepeatTimes_TextChanged(sender As Object, e As EventArgs) Handles txtRepeatTimes.Leave
- ucrBase.clsRsyntax.AddParameter("length.out", txtRepeatTimes.Text)
- End Sub
-
- Private Sub ucrSelectDataFrame_LostFocus(sender As Object, e As EventArgs) Handles ucrSelectDataFrame.LostFocus
- ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrColName.cboColumnName.Text, strTempDataframe:=ucrSelectDataFrame.cboAvailableDataFrames.Text, strTempColumn:=ucrColName.cboColumnName.Text)
- End Sub
-
- Private Sub ucrColName_LostFocus(sender As Object, e As EventArgs) Handles ucrColName.LostFocus
- ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrColName.cboColumnName.Text, strTempDataframe:=ucrSelectDataFrame.cboAvailableDataFrames.Text, strTempColumn:=ucrColName.cboColumnName.Text)
+ Private Sub txtFrom_Leave(sender As Object, e As EventArgs) Handles txtFrom.Leave
+
+ If IsNumeric(txtFrom.Text) = True Or txtFrom.Text = "" Then
+ ucrBase.clsRsyntax.AddParameter("from", txtFrom.Text)
+
+ ElseIf IsNumeric(txtFrom.Text) = False Then
+ MsgBox("Enter numeric value", vbOKOnly)
+ txtFrom.Focus()
+
+ End If
+
+
+
End Sub
+ Private Sub txtRepeatValues_Leave(sender As Object, e As EventArgs) Handles txtRepeatValues.Leave
+
+ If IsNumeric(txtRepeatValues.Text) = True Or txtRepeatValues.Text = "" Then
+ ucrBase.clsRsyntax.AddParameter("from", txtRepeatValues.Text)
+ ElseIf IsNumeric(txtRepeatValues.Text) = False Then
+ MsgBox("Enter numeric value", vbOKOnly)
+ txtRepeatValues.Focus()
+
+ End If
- Private Sub cmdShowHide_Click(sender As Object, e As EventArgs) Handles cmdShowHide.Click
- If bIsExtended Then
- Me.Width -= 151
- Else
- Me.Width += 151
+
+ End Sub
+ Private Sub txtTo_Leave(sender As Object, e As EventArgs) Handles txtTo.Leave
+ If IsNumeric(txtFrom.Text) = True Or txtTo.Text = "" Then
+ ucrBase.clsRsyntax.AddParameter("from", txtTo.Text)
+
+ ElseIf IsNumeric(txtTo.Text) = False Then
+ MsgBox("Enter numeric value", vbOKOnly)
+ txtTo.Focus()
+
End If
+
End Sub
- Private Sub txtOverwrite_TextChanged(sender As Object, e As EventArgs) Handles txtOverwrite.TextChanged
+ Private Sub rdoNumeric_CheckedChanged(sender As Object, e As EventArgs) Handles rdoNumeric.Click
+ If rdoNumeric.Checked = True Then
+ dtpSelectorA.Visible = False
+ dtpSelectorB.Visible = False
+ chkDefineAsFactor.Visible = True
+ End If
End Sub
- Private Sub lblValue_Click(sender As Object, e As EventArgs) Handles lblValue.Click
+ Private Sub dtpSelectorA_Leave(sender As Object, e As EventArgs)
+ ucrBase.clsRsyntax.AddParameter("from", "as.Date('" & Format(dtpSelectorA.Value, "yyyy/MM/dd") & "')")
+ End Sub
+ Private Sub dtpSelectorB_Leave(sender As Object, e As EventArgs)
+ ucrBase.clsRsyntax.AddParameter("to", "as.Date('" & Format(dtpSelectorB.Value, "yyyy/MM/dd") & "')")
+ End Sub
+ Private Sub cboInStepsOf_SelectedIndexChanged(sender As Object, e As EventArgs)
+ ucrBase.clsRsyntax.AddParameter("by", "'" & cboInStepsOf.SelectedItem.ToString() & "'")
+ End Sub
+ Private Sub txtRepeatValues_TextChanged(sender As Object, e As EventArgs)
+ ucrBase.clsRsyntax.AddParameter("length.out", txtRepeatValues.Text)
+ End Sub
+ Private Sub ucrSelectDataFrame_LostFocus(sender As Object, e As EventArgs) Handles ucrSelectDataFrame.LostFocus
+ ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrColName.cboColumnName.Text, strTempDataframe:=ucrSelectDataFrame.cboAvailableDataFrames.Text, strTempColumn:=ucrColName.cboColumnName.Text)
+ End Sub
+
+ Private Sub ucrColName_LostFocus(sender As Object, e As EventArgs) Handles ucrColName.LostFocus
+ ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrColName.cboColumnName.Text, strTempDataframe:=ucrSelectDataFrame.cboAvailableDataFrames.Text, strTempColumn:=ucrColName.cboColumnName.Text)
End Sub
+
+
+ Private Sub cboInStepsOf_TextChanged(sender As Object, e As EventArgs)
+ ucrBase.clsRsyntax.AddParameter("by", cboInStepsOf.Text)
+ End Sub
+
+ Private Sub cmdRefreshPreview_Click(sender As Object, e As EventArgs) Handles cmdRefreshPreview.Click
+ frmMain.clsRLink.RunScript(ucrBase.clsRsyntax.GetScript(), ucrBase.clsRsyntax.iCallType)
+ txtGetPreview.Refresh()
+ End Sub
+
End Class
\ No newline at end of file
diff --git a/instat/dlgRowStats.Designer.vb b/instat/dlgRowStats.Designer.vb
index 2b082818286..023e9348763 100644
--- a/instat/dlgRowStats.Designer.vb
+++ b/instat/dlgRowStats.Designer.vb
@@ -22,192 +22,180 @@ Partial Class dlgRowStats
'Do not modify it using the code editor.
Private Sub InitializeComponent()
- Me.grpStatistcsRequired = New System.Windows.Forms.GroupBox()
- Me.chkSum = New System.Windows.Forms.CheckBox()
- Me.chkStDev = New System.Windows.Forms.CheckBox()
- Me.chkMaximum = New System.Windows.Forms.CheckBox()
- Me.chkMinimum = New System.Windows.Forms.CheckBox()
- Me.chkMean = New System.Windows.Forms.CheckBox()
- Me.chkCount = New System.Windows.Forms.CheckBox()
- Me.lblSelectedVariables = New System.Windows.Forms.Label()
- Me.ucrReceiverRowStatistics = New instat.ucrReceiverMultiple()
Me.ucrBase = New instat.ucrButtons()
- Me.chkRestrictData_Values = New System.Windows.Forms.CheckBox()
- Me.chkWeights = New System.Windows.Forms.CheckBox()
- Me.ucrDataFrame = New instat.ucrSelectorByDataFrame()
- Me.grpStatistcsRequired.SuspendLayout()
+ Me.ucrSelectorDataFrame = New instat.ucrSelectorByDataFrameAddRemove()
+ Me.ucrReceiverRowStatistics = New instat.ucrReceiverMultiple()
+ Me.lblSelected = New System.Windows.Forms.Label()
+ Me.ucrNewColumnName = New instat.ucrNewColumnName()
+ Me.grpStatistic = New System.Windows.Forms.GroupBox()
+ Me.rdoMinimum = New System.Windows.Forms.RadioButton()
+ Me.rdoMaximum = New System.Windows.Forms.RadioButton()
+ Me.rdoCount = New System.Windows.Forms.RadioButton()
+ Me.rdoMean = New System.Windows.Forms.RadioButton()
+ Me.rdoStandardDeviation = New System.Windows.Forms.RadioButton()
+ Me.rdoSum = New System.Windows.Forms.RadioButton()
+ Me.grpStatistic.SuspendLayout()
Me.SuspendLayout()
'
- 'grpStatistcsRequired
- '
- Me.grpStatistcsRequired.Controls.Add(Me.chkSum)
- Me.grpStatistcsRequired.Controls.Add(Me.chkStDev)
- Me.grpStatistcsRequired.Controls.Add(Me.chkMaximum)
- Me.grpStatistcsRequired.Controls.Add(Me.chkMinimum)
- Me.grpStatistcsRequired.Controls.Add(Me.chkMean)
- Me.grpStatistcsRequired.Controls.Add(Me.chkCount)
- Me.grpStatistcsRequired.Location = New System.Drawing.Point(313, 12)
- Me.grpStatistcsRequired.Name = "grpStatistcsRequired"
- Me.grpStatistcsRequired.Size = New System.Drawing.Size(110, 155)
- Me.grpStatistcsRequired.TabIndex = 5
- Me.grpStatistcsRequired.TabStop = False
- Me.grpStatistcsRequired.Tag = "Statistcs_required"
- Me.grpStatistcsRequired.Text = "Statistcs required"
- '
- 'chkSum
- '
- Me.chkSum.AutoSize = True
- Me.chkSum.Location = New System.Drawing.Point(7, 135)
- Me.chkSum.Name = "chkSum"
- Me.chkSum.Size = New System.Drawing.Size(47, 17)
- Me.chkSum.TabIndex = 0
- Me.chkSum.Tag = "Sum"
- Me.chkSum.Text = "Sum"
- Me.chkSum.UseVisualStyleBackColor = True
- '
- 'chkStDev
- '
- Me.chkStDev.AutoSize = True
- Me.chkStDev.Location = New System.Drawing.Point(7, 112)
- Me.chkStDev.Name = "chkStDev"
- Me.chkStDev.Size = New System.Drawing.Size(62, 17)
- Me.chkStDev.TabIndex = 0
- Me.chkStDev.Tag = "Standard_deviation"
- Me.chkStDev.Text = "St. Dev"
- Me.chkStDev.UseVisualStyleBackColor = True
- '
- 'chkMaximum
- '
- Me.chkMaximum.AutoSize = True
- Me.chkMaximum.Location = New System.Drawing.Point(7, 89)
- Me.chkMaximum.Name = "chkMaximum"
- Me.chkMaximum.Size = New System.Drawing.Size(73, 17)
- Me.chkMaximum.TabIndex = 0
- Me.chkMaximum.Tag = "Maximum"
- Me.chkMaximum.Text = "Maximum "
- Me.chkMaximum.UseVisualStyleBackColor = True
- '
- 'chkMinimum
- '
- Me.chkMinimum.AutoSize = True
- Me.chkMinimum.Location = New System.Drawing.Point(7, 66)
- Me.chkMinimum.Name = "chkMinimum"
- Me.chkMinimum.Size = New System.Drawing.Size(67, 17)
- Me.chkMinimum.TabIndex = 0
- Me.chkMinimum.Tag = "Minimum"
- Me.chkMinimum.Text = "Minimum"
- Me.chkMinimum.UseVisualStyleBackColor = True
- '
- 'chkMean
- '
- Me.chkMean.AutoSize = True
- Me.chkMean.Location = New System.Drawing.Point(7, 43)
- Me.chkMean.Name = "chkMean"
- Me.chkMean.Size = New System.Drawing.Size(53, 17)
- Me.chkMean.TabIndex = 0
- Me.chkMean.Tag = "Mean"
- Me.chkMean.Text = "Mean"
- Me.chkMean.UseVisualStyleBackColor = True
- '
- 'chkCount
- '
- Me.chkCount.AutoSize = True
- Me.chkCount.Location = New System.Drawing.Point(7, 20)
- Me.chkCount.Name = "chkCount"
- Me.chkCount.Size = New System.Drawing.Size(57, 17)
- Me.chkCount.TabIndex = 0
- Me.chkCount.Tag = "Count"
- Me.chkCount.Text = "Count "
- Me.chkCount.UseVisualStyleBackColor = True
- '
- 'lblSelectedVariables
- '
- Me.lblSelectedVariables.AutoSize = True
- Me.lblSelectedVariables.Location = New System.Drawing.Point(202, 9)
- Me.lblSelectedVariables.Name = "lblSelectedVariables"
- Me.lblSelectedVariables.Size = New System.Drawing.Size(94, 13)
- Me.lblSelectedVariables.TabIndex = 14
- Me.lblSelectedVariables.Tag = "Selected_variables"
- Me.lblSelectedVariables.Text = "Selected variables"
- '
- 'ucrReceiverRowStatistics
- '
- Me.ucrReceiverRowStatistics.Location = New System.Drawing.Point(178, 25)
- Me.ucrReceiverRowStatistics.Name = "ucrReceiverRowStatistics"
- Me.ucrReceiverRowStatistics.Size = New System.Drawing.Size(101, 142)
- Me.ucrReceiverRowStatistics.TabIndex = 13
- '
'ucrBase
'
- Me.ucrBase.Location = New System.Drawing.Point(12, 243)
+ Me.ucrBase.Location = New System.Drawing.Point(12, 297)
Me.ucrBase.Name = "ucrBase"
Me.ucrBase.Size = New System.Drawing.Size(410, 60)
Me.ucrBase.TabIndex = 6
'
- 'chkRestrictData_Values
- '
- Me.chkRestrictData_Values.AutoSize = True
- Me.chkRestrictData_Values.Location = New System.Drawing.Point(13, 197)
- Me.chkRestrictData_Values.Name = "chkRestrictData_Values"
- Me.chkRestrictData_Values.Size = New System.Drawing.Size(120, 17)
- Me.chkRestrictData_Values.TabIndex = 15
- Me.chkRestrictData_Values.Tag = "Restrict_data_values"
- Me.chkRestrictData_Values.Text = "Restrict data values"
- Me.chkRestrictData_Values.UseVisualStyleBackColor = True
- '
- 'chkWeights
+ 'ucrSelectorDataFrame
'
- Me.chkWeights.AutoSize = True
- Me.chkWeights.Location = New System.Drawing.Point(13, 220)
- Me.chkWeights.Name = "chkWeights"
- Me.chkWeights.Size = New System.Drawing.Size(65, 17)
- Me.chkWeights.TabIndex = 16
- Me.chkWeights.Tag = "Weights"
- Me.chkWeights.Text = "Weights"
- Me.chkWeights.UseVisualStyleBackColor = True
+ Me.ucrSelectorDataFrame.Location = New System.Drawing.Point(12, 12)
+ Me.ucrSelectorDataFrame.Name = "ucrSelectorDataFrame"
+ Me.ucrSelectorDataFrame.Size = New System.Drawing.Size(242, 166)
+ Me.ucrSelectorDataFrame.TabIndex = 17
'
- 'ucrDataFrame
+ 'ucrReceiverRowStatistics
'
- Me.ucrDataFrame.Location = New System.Drawing.Point(12, 12)
- Me.ucrDataFrame.Name = "ucrDataFrame"
- Me.ucrDataFrame.Size = New System.Drawing.Size(133, 179)
- Me.ucrDataFrame.TabIndex = 17
+ Me.ucrReceiverRowStatistics.Location = New System.Drawing.Point(273, 28)
+ Me.ucrReceiverRowStatistics.Name = "ucrReceiverRowStatistics"
+ Me.ucrReceiverRowStatistics.Size = New System.Drawing.Size(121, 128)
+ Me.ucrReceiverRowStatistics.TabIndex = 18
+ '
+ 'lblSelected
+ '
+ Me.lblSelected.AutoSize = True
+ Me.lblSelected.Location = New System.Drawing.Point(270, 12)
+ Me.lblSelected.Name = "lblSelected"
+ Me.lblSelected.Size = New System.Drawing.Size(49, 13)
+ Me.lblSelected.TabIndex = 19
+ Me.lblSelected.Tag = "Selected"
+ Me.lblSelected.Text = "Selected"
+ '
+ 'ucrNewColumnName
+ '
+ Me.ucrNewColumnName.Location = New System.Drawing.Point(13, 256)
+ Me.ucrNewColumnName.Name = "ucrNewColumnName"
+ Me.ucrNewColumnName.Size = New System.Drawing.Size(367, 35)
+ Me.ucrNewColumnName.TabIndex = 20
+ '
+ 'grpStatistic
+ '
+ Me.grpStatistic.Controls.Add(Me.rdoMinimum)
+ Me.grpStatistic.Controls.Add(Me.rdoMaximum)
+ Me.grpStatistic.Controls.Add(Me.rdoCount)
+ Me.grpStatistic.Controls.Add(Me.rdoMean)
+ Me.grpStatistic.Controls.Add(Me.rdoStandardDeviation)
+ Me.grpStatistic.Controls.Add(Me.rdoSum)
+ Me.grpStatistic.Location = New System.Drawing.Point(13, 185)
+ Me.grpStatistic.Name = "grpStatistic"
+ Me.grpStatistic.Size = New System.Drawing.Size(381, 65)
+ Me.grpStatistic.TabIndex = 21
+ Me.grpStatistic.TabStop = False
+ Me.grpStatistic.Tag = "Statistic"
+ Me.grpStatistic.Text = "Statistic"
+ '
+ 'rdoMinimum
+ '
+ Me.rdoMinimum.AutoSize = True
+ Me.rdoMinimum.Location = New System.Drawing.Point(154, 19)
+ Me.rdoMinimum.Name = "rdoMinimum"
+ Me.rdoMinimum.Size = New System.Drawing.Size(66, 17)
+ Me.rdoMinimum.TabIndex = 0
+ Me.rdoMinimum.TabStop = True
+ Me.rdoMinimum.Tag = "Minimum"
+ Me.rdoMinimum.Text = "Minimum"
+ Me.rdoMinimum.UseVisualStyleBackColor = True
+ '
+ 'rdoMaximum
+ '
+ Me.rdoMaximum.AutoSize = True
+ Me.rdoMaximum.Location = New System.Drawing.Point(154, 42)
+ Me.rdoMaximum.Name = "rdoMaximum"
+ Me.rdoMaximum.Size = New System.Drawing.Size(69, 17)
+ Me.rdoMaximum.TabIndex = 0
+ Me.rdoMaximum.TabStop = True
+ Me.rdoMaximum.Tag = "Maximum"
+ Me.rdoMaximum.Text = "Maximum"
+ Me.rdoMaximum.UseVisualStyleBackColor = True
+ '
+ 'rdoCount
+ '
+ Me.rdoCount.AutoSize = True
+ Me.rdoCount.Location = New System.Drawing.Point(260, 42)
+ Me.rdoCount.Name = "rdoCount"
+ Me.rdoCount.Size = New System.Drawing.Size(53, 17)
+ Me.rdoCount.TabIndex = 0
+ Me.rdoCount.TabStop = True
+ Me.rdoCount.Tag = "Count"
+ Me.rdoCount.Text = "Count"
+ Me.rdoCount.UseVisualStyleBackColor = True
+ '
+ 'rdoMean
+ '
+ Me.rdoMean.AutoSize = True
+ Me.rdoMean.Location = New System.Drawing.Point(6, 19)
+ Me.rdoMean.Name = "rdoMean"
+ Me.rdoMean.Size = New System.Drawing.Size(52, 17)
+ Me.rdoMean.TabIndex = 0
+ Me.rdoMean.TabStop = True
+ Me.rdoMean.Tag = "Mean"
+ Me.rdoMean.Text = "Mean"
+ Me.rdoMean.UseVisualStyleBackColor = True
+ '
+ 'rdoStandardDeviation
+ '
+ Me.rdoStandardDeviation.AutoSize = True
+ Me.rdoStandardDeviation.Location = New System.Drawing.Point(6, 42)
+ Me.rdoStandardDeviation.Name = "rdoStandardDeviation"
+ Me.rdoStandardDeviation.Size = New System.Drawing.Size(114, 17)
+ Me.rdoStandardDeviation.TabIndex = 0
+ Me.rdoStandardDeviation.TabStop = True
+ Me.rdoStandardDeviation.Tag = "Standard_deviation"
+ Me.rdoStandardDeviation.Text = "Standard deviation"
+ Me.rdoStandardDeviation.UseVisualStyleBackColor = True
+ '
+ 'rdoSum
+ '
+ Me.rdoSum.AutoSize = True
+ Me.rdoSum.Location = New System.Drawing.Point(260, 19)
+ Me.rdoSum.Name = "rdoSum"
+ Me.rdoSum.Size = New System.Drawing.Size(46, 17)
+ Me.rdoSum.TabIndex = 0
+ Me.rdoSum.TabStop = True
+ Me.rdoSum.Tag = "Sum"
+ Me.rdoSum.Text = "Sum"
+ Me.rdoSum.UseVisualStyleBackColor = True
'
'dlgRowStats
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(462, 309)
- Me.Controls.Add(Me.ucrDataFrame)
- Me.Controls.Add(Me.chkWeights)
- Me.Controls.Add(Me.chkRestrictData_Values)
- Me.Controls.Add(Me.lblSelectedVariables)
+ Me.ClientSize = New System.Drawing.Size(462, 368)
+ Me.Controls.Add(Me.grpStatistic)
+ Me.Controls.Add(Me.ucrNewColumnName)
+ Me.Controls.Add(Me.lblSelected)
Me.Controls.Add(Me.ucrReceiverRowStatistics)
+ Me.Controls.Add(Me.ucrSelectorDataFrame)
Me.Controls.Add(Me.ucrBase)
- Me.Controls.Add(Me.grpStatistcsRequired)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "dlgRowStats"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Tag = "Row_statistics"
Me.Text = "Row statistics"
- Me.grpStatistcsRequired.ResumeLayout(False)
- Me.grpStatistcsRequired.PerformLayout()
+ Me.grpStatistic.ResumeLayout(False)
+ Me.grpStatistic.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
- Friend WithEvents ucrBase As ucrButtons
- Friend WithEvents grpStatistcsRequired As GroupBox
- Friend WithEvents chkSum As CheckBox
- Friend WithEvents chkStDev As CheckBox
- Friend WithEvents chkMaximum As CheckBox
- Friend WithEvents chkMinimum As CheckBox
- Friend WithEvents chkMean As CheckBox
- Friend WithEvents chkCount As CheckBox
- Friend WithEvents lblSelectedVariables As Label
- Friend WithEvents ucrReceiverRowStatistics As ucrReceiverMultiple
- Friend WithEvents chkRestrictData_Values As CheckBox
- Friend WithEvents chkWeights As CheckBox
- Friend WithEvents ucrDataFrame As ucrSelectorByDataFrame
+ Friend WithEvents ucrBase As ucrButtons
+ Friend WithEvents ucrSelectorDataFrame As ucrSelectorByDataFrameAddRemove
+ Friend WithEvents ucrReceiverRowStatistics As ucrReceiverMultiple
+ Friend WithEvents lblSelected As Label
+ Friend WithEvents ucrNewColumnName As ucrNewColumnName
+ Friend WithEvents grpStatistic As GroupBox
+ Friend WithEvents rdoMinimum As RadioButton
+ Friend WithEvents rdoMaximum As RadioButton
+ Friend WithEvents rdoCount As RadioButton
+ Friend WithEvents rdoMean As RadioButton
+ Friend WithEvents rdoStandardDeviation As RadioButton
+ Friend WithEvents rdoSum As RadioButton
End Class
diff --git a/instat/dlgRowStats.vb b/instat/dlgRowStats.vb
index 8d49dee9bfe..9a00c4caa72 100644
--- a/instat/dlgRowStats.vb
+++ b/instat/dlgRowStats.vb
@@ -18,9 +18,27 @@ Imports instat.Translations
Public Class dlgRowStats
Private Sub dlgRowStats_Load(sender As Object, e As EventArgs) Handles MyBase.Load
autoTranslate(Me)
+ ucrBase.clsRsyntax.SetFunction("apply")
+ ucrBase.clsRsyntax.iCallType = 2
+ ucrReceiverRowStatistics.Selector = ucrSelectorDataFrame
+ ucrReceiverRowStatistics.SetMeAsReceiver()
+ ucrBase.clsRsyntax.AddParameter("MARGIN", 1)
End Sub
- Private Sub ucrDataFrame_Load(sender As Object, e As EventArgs) Handles ucrDataFrame.Load
+ Private Sub ucrReceiverRowStatistics_Leave(sender As Object, e As EventArgs) Handles ucrReceiverRowStatistics.Leave
+ ucrBase.clsRsyntax.AddParameter("X", ucrReceiverRowStatistics.GetVariableNames())
+
+ End Sub
+
+
+ Private Sub Statistic_CheckedChanged(sender As Object, e As EventArgs) Handles rdoMean.CheckedChanged, rdoCount.CheckedChanged, rdoMaximum.CheckedChanged, rdoMinimum.CheckedChanged, rdoSum.CheckedChanged, rdoStandardDeviation.CheckedChanged
+ ' ucrNewColumnName.setPrefix= "RowMean", "RowCount", "RowMaximum", "RowMinimum, "RowSum", "RowStandardDeviation"
+ ucrBase.clsRsyntax.AddParameter("FUN", "mean")
+ ucrBase.clsRsyntax.AddParameter("FUN", "count")
+ ucrBase.clsRsyntax.AddParameter("FUN", "maximum")
+ ucrBase.clsRsyntax.AddParameter("FUN", "minimum")
+ ucrBase.clsRsyntax.AddParameter("FUN", "sum")
+ ucrBase.clsRsyntax.AddParameter("FUN", "sd")
End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgSaveAs.Designer.vb b/instat/dlgSaveAs.Designer.vb
new file mode 100644
index 00000000000..8c884b036a8
--- /dev/null
+++ b/instat/dlgSaveAs.Designer.vb
@@ -0,0 +1,50 @@
+ _
+Partial Class dlgSaveAs
+ 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.ucrBase = New instat.ucrButtons()
+ Me.SuspendLayout()
+ '
+ 'ucrBase
+ '
+ Me.ucrBase.Location = New System.Drawing.Point(8, 203)
+ Me.ucrBase.Name = "ucrBase"
+ Me.ucrBase.Size = New System.Drawing.Size(410, 53)
+ Me.ucrBase.TabIndex = 0
+ '
+ 'dlgSaveAs
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(430, 261)
+ Me.Controls.Add(Me.ucrBase)
+ Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
+ Me.Name = "dlgSaveAs"
+ Me.Tag = "Save_As"
+ Me.Text = "Save As"
+ Me.ResumeLayout(False)
+
+ End Sub
+
+ Friend WithEvents ucrBase As ucrButtons
+End Class
diff --git a/instat/dlgSaveAs.fr-FR.resx b/instat/dlgSaveAs.fr-FR.resx
new file mode 100644
index 00000000000..9c9f69d752c
--- /dev/null
+++ b/instat/dlgSaveAs.fr-FR.resx
@@ -0,0 +1,15 @@
+
+
+
+ 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/dlgSaveAs.resx b/instat/dlgSaveAs.resx
new file mode 100644
index 00000000000..29dcb1b3a35
--- /dev/null
+++ b/instat/dlgSaveAs.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/dlgSaveAs.sw-KE.resx b/instat/dlgSaveAs.sw-KE.resx
new file mode 100644
index 00000000000..9c9f69d752c
--- /dev/null
+++ b/instat/dlgSaveAs.sw-KE.resx
@@ -0,0 +1,15 @@
+
+
+
+ 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/dlgSaveAs.vb b/instat/dlgSaveAs.vb
new file mode 100644
index 00000000000..f6abeef50b1
--- /dev/null
+++ b/instat/dlgSaveAs.vb
@@ -0,0 +1,3 @@
+Public Class dlgSaveAs
+
+End Class
\ No newline at end of file
diff --git a/instat/dlgStack.Designer.vb b/instat/dlgStack.Designer.vb
index 9ab0be35bfe..86a0d986043 100644
--- a/instat/dlgStack.Designer.vb
+++ b/instat/dlgStack.Designer.vb
@@ -22,32 +22,19 @@ Partial Class dlgStack
'Do not modify it using the code editor.
_
Private Sub InitializeComponent()
- Me.ucrReceiverColumnsToBeStack = New instat.ucrReceiverMultiple()
Me.lblColumnsToBestack = New System.Windows.Forms.Label()
Me.txtStackDataInto = New System.Windows.Forms.TextBox()
- Me.chkOmitValue = New System.Windows.Forms.CheckBox()
Me.lblStackDataInto = New System.Windows.Forms.Label()
- Me.ucrReceiverIdVariable = New instat.ucrReceiverSingle()
- Me.lblIdVariable = New System.Windows.Forms.Label()
Me.lblFactorInto = New System.Windows.Forms.Label()
Me.txtFactorInto = New System.Windows.Forms.TextBox()
- Me.grpOutputOptions = New System.Windows.Forms.GroupBox()
- Me.rdoNewWorksheet = New System.Windows.Forms.RadioButton()
- Me.lblSheetName = New System.Windows.Forms.Label()
- Me.rdoExistingWorksheet = New System.Windows.Forms.RadioButton()
- Me.txtSheetName = New System.Windows.Forms.TextBox()
- Me.ucrBase = New instat.ucrButtons()
+ Me.chkIDVariables = New System.Windows.Forms.CheckBox()
+ Me.ucrNewColumnName = New instat.ucrNewColumnName()
+ Me.ucrIDVariablesReceiver = New instat.ucrReceiverMultiple()
Me.ucrDataFrameAddRemove = New instat.ucrSelectorByDataFrameAddRemove()
- Me.grpOutputOptions.SuspendLayout()
+ Me.ucrBase = New instat.ucrButtons()
+ Me.ucrReceiverColumnsToBeStack = New instat.ucrReceiverMultiple()
Me.SuspendLayout()
'
- 'ucrReceiverColumnsToBeStack
- '
- Me.ucrReceiverColumnsToBeStack.Location = New System.Drawing.Point(261, 28)
- Me.ucrReceiverColumnsToBeStack.Name = "ucrReceiverColumnsToBeStack"
- Me.ucrReceiverColumnsToBeStack.Size = New System.Drawing.Size(121, 111)
- Me.ucrReceiverColumnsToBeStack.TabIndex = 2
- '
'lblColumnsToBestack
'
Me.lblColumnsToBestack.AutoSize = True
@@ -66,17 +53,6 @@ Partial Class dlgStack
Me.txtStackDataInto.TabIndex = 4
Me.txtStackDataInto.Tag = ""
'
- 'chkOmitValue
- '
- Me.chkOmitValue.AutoSize = True
- Me.chkOmitValue.Location = New System.Drawing.Point(28, 246)
- Me.chkOmitValue.Name = "chkOmitValue"
- Me.chkOmitValue.Size = New System.Drawing.Size(76, 17)
- Me.chkOmitValue.TabIndex = 5
- Me.chkOmitValue.Tag = "Omit_value"
- Me.chkOmitValue.Text = "Omit value"
- Me.chkOmitValue.UseVisualStyleBackColor = True
- '
'lblStackDataInto
'
Me.lblStackDataInto.AutoSize = True
@@ -87,23 +63,6 @@ Partial Class dlgStack
Me.lblStackDataInto.Tag = "Stack_data_into"
Me.lblStackDataInto.Text = "Stack data into"
'
- 'ucrReceiverIdVariable
- '
- Me.ucrReceiverIdVariable.Location = New System.Drawing.Point(244, 191)
- Me.ucrReceiverIdVariable.Name = "ucrReceiverIdVariable"
- Me.ucrReceiverIdVariable.Size = New System.Drawing.Size(106, 26)
- Me.ucrReceiverIdVariable.TabIndex = 7
- '
- 'lblIdVariable
- '
- Me.lblIdVariable.AutoSize = True
- Me.lblIdVariable.Location = New System.Drawing.Point(241, 175)
- Me.lblIdVariable.Name = "lblIdVariable"
- Me.lblIdVariable.Size = New System.Drawing.Size(58, 13)
- Me.lblIdVariable.TabIndex = 8
- Me.lblIdVariable.Tag = "ID_variable"
- Me.lblIdVariable.Text = "ID variable"
- '
'lblFactorInto
'
Me.lblFactorInto.AutoSize = True
@@ -121,67 +80,30 @@ Partial Class dlgStack
Me.txtFactorInto.Size = New System.Drawing.Size(100, 20)
Me.txtFactorInto.TabIndex = 4
'
- 'grpOutputOptions
- '
- Me.grpOutputOptions.Controls.Add(Me.rdoNewWorksheet)
- Me.grpOutputOptions.Controls.Add(Me.lblSheetName)
- Me.grpOutputOptions.Controls.Add(Me.rdoExistingWorksheet)
- Me.grpOutputOptions.Controls.Add(Me.txtSheetName)
- Me.grpOutputOptions.Location = New System.Drawing.Point(15, 269)
- Me.grpOutputOptions.Name = "grpOutputOptions"
- Me.grpOutputOptions.Size = New System.Drawing.Size(200, 100)
- Me.grpOutputOptions.TabIndex = 10
- Me.grpOutputOptions.TabStop = False
- Me.grpOutputOptions.Tag = "Output_options"
- Me.grpOutputOptions.Text = "Output Options"
- '
- 'rdoNewWorksheet
- '
- Me.rdoNewWorksheet.AutoSize = True
- Me.rdoNewWorksheet.Location = New System.Drawing.Point(9, 43)
- Me.rdoNewWorksheet.Name = "rdoNewWorksheet"
- Me.rdoNewWorksheet.Size = New System.Drawing.Size(99, 17)
- Me.rdoNewWorksheet.TabIndex = 0
- Me.rdoNewWorksheet.TabStop = True
- Me.rdoNewWorksheet.Tag = "New_worksheet"
- Me.rdoNewWorksheet.Text = "New worksheet"
- Me.rdoNewWorksheet.UseVisualStyleBackColor = True
- '
- 'lblSheetName
- '
- Me.lblSheetName.AutoSize = True
- Me.lblSheetName.Location = New System.Drawing.Point(6, 66)
- Me.lblSheetName.Name = "lblSheetName"
- Me.lblSheetName.Size = New System.Drawing.Size(64, 13)
- Me.lblSheetName.TabIndex = 9
- Me.lblSheetName.Tag = "Sheet_name"
- Me.lblSheetName.Text = "Sheet name"
- '
- 'rdoExistingWorksheet
- '
- Me.rdoExistingWorksheet.AutoSize = True
- Me.rdoExistingWorksheet.Location = New System.Drawing.Point(9, 19)
- Me.rdoExistingWorksheet.Name = "rdoExistingWorksheet"
- Me.rdoExistingWorksheet.Size = New System.Drawing.Size(113, 17)
- Me.rdoExistingWorksheet.TabIndex = 0
- Me.rdoExistingWorksheet.TabStop = True
- Me.rdoExistingWorksheet.Tag = "Existing_worksheet"
- Me.rdoExistingWorksheet.Text = "Existing worksheet"
- Me.rdoExistingWorksheet.UseVisualStyleBackColor = True
- '
- 'txtSheetName
- '
- Me.txtSheetName.Location = New System.Drawing.Point(84, 66)
- Me.txtSheetName.Name = "txtSheetName"
- Me.txtSheetName.Size = New System.Drawing.Size(100, 20)
- Me.txtSheetName.TabIndex = 4
+ 'chkIDVariables
'
- 'ucrBase
+ Me.chkIDVariables.AutoSize = True
+ Me.chkIDVariables.Location = New System.Drawing.Point(264, 167)
+ Me.chkIDVariables.Name = "chkIDVariables"
+ Me.chkIDVariables.Size = New System.Drawing.Size(83, 17)
+ Me.chkIDVariables.TabIndex = 13
+ Me.chkIDVariables.Tag = "ID_Variables"
+ Me.chkIDVariables.Text = "ID Variables"
+ Me.chkIDVariables.UseVisualStyleBackColor = True
'
- Me.ucrBase.Location = New System.Drawing.Point(15, 374)
- Me.ucrBase.Name = "ucrBase"
- Me.ucrBase.Size = New System.Drawing.Size(410, 53)
- Me.ucrBase.TabIndex = 11
+ 'ucrNewColumnName
+ '
+ Me.ucrNewColumnName.Location = New System.Drawing.Point(17, 322)
+ Me.ucrNewColumnName.Name = "ucrNewColumnName"
+ Me.ucrNewColumnName.Size = New System.Drawing.Size(367, 35)
+ Me.ucrNewColumnName.TabIndex = 15
+ '
+ 'ucrIDVariablesReceiver
+ '
+ Me.ucrIDVariablesReceiver.Location = New System.Drawing.Point(264, 191)
+ Me.ucrIDVariablesReceiver.Name = "ucrIDVariablesReceiver"
+ Me.ucrIDVariablesReceiver.Size = New System.Drawing.Size(121, 128)
+ Me.ucrIDVariablesReceiver.TabIndex = 14
'
'ucrDataFrameAddRemove
'
@@ -190,18 +112,31 @@ Partial Class dlgStack
Me.ucrDataFrameAddRemove.Size = New System.Drawing.Size(242, 179)
Me.ucrDataFrameAddRemove.TabIndex = 12
'
+ 'ucrBase
+ '
+ Me.ucrBase.Location = New System.Drawing.Point(15, 374)
+ Me.ucrBase.Name = "ucrBase"
+ Me.ucrBase.Size = New System.Drawing.Size(410, 53)
+ Me.ucrBase.TabIndex = 11
+ '
+ 'ucrReceiverColumnsToBeStack
+ '
+ Me.ucrReceiverColumnsToBeStack.Location = New System.Drawing.Point(264, 28)
+ Me.ucrReceiverColumnsToBeStack.Name = "ucrReceiverColumnsToBeStack"
+ Me.ucrReceiverColumnsToBeStack.Size = New System.Drawing.Size(121, 132)
+ Me.ucrReceiverColumnsToBeStack.TabIndex = 2
+ '
'dlgStack
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(450, 439)
+ Me.ClientSize = New System.Drawing.Size(421, 429)
+ Me.Controls.Add(Me.ucrNewColumnName)
+ Me.Controls.Add(Me.ucrIDVariablesReceiver)
+ Me.Controls.Add(Me.chkIDVariables)
Me.Controls.Add(Me.ucrDataFrameAddRemove)
Me.Controls.Add(Me.ucrBase)
- Me.Controls.Add(Me.grpOutputOptions)
Me.Controls.Add(Me.lblFactorInto)
- Me.Controls.Add(Me.lblIdVariable)
- Me.Controls.Add(Me.ucrReceiverIdVariable)
- Me.Controls.Add(Me.chkOmitValue)
Me.Controls.Add(Me.txtFactorInto)
Me.Controls.Add(Me.txtStackDataInto)
Me.Controls.Add(Me.lblStackDataInto)
@@ -212,8 +147,6 @@ Partial Class dlgStack
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Tag = "Stack_join_columns"
Me.Text = "Stack (Join) columns"
- Me.grpOutputOptions.ResumeLayout(False)
- Me.grpOutputOptions.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -221,17 +154,12 @@ Partial Class dlgStack
Friend WithEvents ucrReceiverColumnsToBeStack As ucrReceiverMultiple
Friend WithEvents lblColumnsToBestack As Label
Friend WithEvents txtStackDataInto As TextBox
- Friend WithEvents chkOmitValue As CheckBox
Friend WithEvents lblStackDataInto As Label
- Friend WithEvents ucrReceiverIdVariable As ucrReceiverSingle
- Friend WithEvents lblIdVariable As Label
Friend WithEvents lblFactorInto As Label
Friend WithEvents txtFactorInto As TextBox
- Friend WithEvents grpOutputOptions As GroupBox
- Friend WithEvents rdoNewWorksheet As RadioButton
- Friend WithEvents lblSheetName As Label
- Friend WithEvents rdoExistingWorksheet As RadioButton
- Friend WithEvents txtSheetName As TextBox
Friend WithEvents ucrBase As ucrButtons
Friend WithEvents ucrDataFrameAddRemove As ucrSelectorByDataFrameAddRemove
+ Friend WithEvents chkIDVariables As CheckBox
+ Friend WithEvents ucrIDVariablesReceiver As ucrReceiverMultiple
+ Friend WithEvents ucrNewColumnName As ucrNewColumnName
End Class
diff --git a/instat/dlgStack.vb b/instat/dlgStack.vb
index 82e4a075c85..e647e99fffc 100644
--- a/instat/dlgStack.vb
+++ b/instat/dlgStack.vb
@@ -12,13 +12,42 @@
'
' You should have received a copy of the GNU General Public License k
' along with this program. If not, see .
+
Imports instat.Translations
Public Class dlgStack
Private Sub dlgStack_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- ucrBase.clsRsyntax.SetFunction("stack")
+ ucrBase.clsRsyntax.SetFunction("melt")
+ ucrIDVariablesReceiver.Visible = False
ucrBase.clsRsyntax.iCallType = 1
ucrReceiverColumnsToBeStack.Selector = ucrDataFrameAddRemove
- ucrReceiverColumnsToBeStack.SetMeAsReceiver()
- autoTranslate(Me)
+ ucrReceiverColumnsToBeStack.SetMeAsReceiver()
+ ucrIDVariablesReceiver.Selector = ucrDataFrameAddRemove
+ txtFactorInto.Text = "Variable"
+ txtStackDataInto.Text = "Value"
+ autoTranslate(Me)
+ End Sub
+
+ Private Sub chkIDVariables_CheckedChanged(sender As Object, e As EventArgs) Handles chkIDVariables.CheckedChanged
+ If chkIDVariables.Checked = True Then
+ ucrIDVariablesReceiver.Visible = True
+ Else
+ ucrIDVariablesReceiver.Visible = False
+ End If
+ End Sub
+
+
+ Private Sub ucrIDVariablesReceiver_Enter(sender As Object, e As EventArgs) Handles ucrIDVariablesReceiver.Enter
+ ucrIDVariablesReceiver.SetMeAsReceiver()
+ End Sub
+
+ Private Sub ucrReceiverColumnsToBeStack_Leave(sender As Object, e As EventArgs) Handles ucrReceiverColumnsToBeStack.Leave
+ ucrBase.clsRsyntax.AddParameter("id.var", ucrReceiverColumnsToBeStack.GetVariableNames())
+ End Sub
+ Private Sub ucrIDVariablesReceiver_Leave(sender As Object, e As EventArgs) Handles ucrIDVariablesReceiver.Leave
+ ucrBase.clsRsyntax.AddParameter("", ucrIDVariablesReceiver.GetVariableNames())
+ End Sub
+
+ Private Sub ucrReceiverColumnsToBeStack_Load(sender As Object, e As EventArgs)
+
End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgStemAndLeaf.vb b/instat/dlgStemAndLeaf.vb
index 3b5a388c4da..5f15287bdec 100644
--- a/instat/dlgStemAndLeaf.vb
+++ b/instat/dlgStemAndLeaf.vb
@@ -27,7 +27,7 @@ Public Class dlgStemAndLeaf
ucrReceiverStemAndLeaf.SetMeAsReceiver()
End Sub
Private Sub ucrReceiverStemAndLeaf_Leave(sender As Object, e As EventArgs) Handles ucrReceiverStemAndLeaf.Leave
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverStemAndLeaf.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverStemAndLeaf.GetVariables())
End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb
index 5067bb467db..fb8a6c3afab 100644
--- a/instat/dlgSummaryTables.vb
+++ b/instat/dlgSummaryTables.vb
@@ -36,11 +36,11 @@ Public Class dlgSummaryTables
End Sub
Private Sub ucrReceiverFactor_Leave(sender As Object, e As EventArgs) Handles ucrReceiverFactor.Leave
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverFactor.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverFactor.GetVariables())
End Sub
Private Sub ucrReceiverVariate_Leave(sender As Object, e As EventArgs) Handles ucrReceiverVariate.Leave
- ucrBase.clsRsyntax.AddParameter("x", ucrReceiverVariate.GetVariables())
+ ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariate.GetVariables())
End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgTwoWayAnova.vb b/instat/dlgTwoWayAnova.vb
index 73c7fb001d4..229500028d2 100644
--- a/instat/dlgTwoWayAnova.vb
+++ b/instat/dlgTwoWayAnova.vb
@@ -40,13 +40,13 @@ Public Class dlgTwoWayAnova
End Sub
Private Sub FillFormula()
- Dim strCounts As String
- Dim strRowFactor As String
- Dim strColumnFactor As String
+ Dim strCounts As String = ""
+ Dim strRowFactor As String = ""
+ Dim strColumnFactor As String = ""
- strCounts = ucrReceiverCounts.GetVariables()
- strRowFactor = ucrReceiverRowFactor.GetVariables()
- strColumnFactor = ucrReceiverColumnFactor.GetVariables()
+ 'strCounts = ucrReceiverCounts.GetVariables()
+ 'strRowFactor = ucrReceiverRowFactor.GetVariables()
+ 'strColumnFactor = ucrReceiverColumnFactor.GetVariables()
If ((Not (strCounts = "")) And (Not (strRowFactor = "")) And (Not (strColumnFactor = ""))) Then
ucrBase.clsRsyntax.AddParameter("formula", strCounts & "~" & strRowFactor & "*" & strColumnFactor)
ucrBase.OKEnabled(True)
diff --git a/instat/dlgUnstack.Designer.vb b/instat/dlgUnstack.Designer.vb
index fdeccf21e55..c96d42a668a 100644
--- a/instat/dlgUnstack.Designer.vb
+++ b/instat/dlgUnstack.Designer.vb
@@ -25,22 +25,18 @@ Partial Class dlgUnstack
Me.ucrBase = New instat.ucrButtons()
Me.ucrDataFrame = New instat.ucrDataFrame()
Me.ucrSelectorByDataFrameAddRemove = New instat.ucrSelectorByDataFrameAddRemove()
- Me.ucrReceiverFactors = New instat.ucrReceiverMultiple()
- Me.ucrReceiverColumns = New instat.ucrReceiverMultiple()
Me.lblFactorstoUnstackBy = New System.Windows.Forms.Label()
Me.lblColumnstoUnstack = New System.Windows.Forms.Label()
Me.chkUseFactoLabels = New System.Windows.Forms.CheckBox()
- Me.grpOutputOptions = New System.Windows.Forms.GroupBox()
- Me.txtSheetName = New System.Windows.Forms.TextBox()
- Me.lblSheetName = New System.Windows.Forms.Label()
- Me.rdoNewWorksheet = New System.Windows.Forms.RadioButton()
- Me.rdoExistingWorksheet = New System.Windows.Forms.RadioButton()
- Me.grpOutputOptions.SuspendLayout()
+ Me.ucrfactortoUnstackReceiver = New instat.ucrReceiverSingle()
+ Me.ucrColumntoUnstackReceiver = New instat.ucrReceiverSingle()
+ Me.chkIDColumn = New System.Windows.Forms.CheckBox()
+ Me.ucrIDColumnReceiver = New instat.ucrReceiverMultiple()
Me.SuspendLayout()
'
'ucrBase
'
- Me.ucrBase.Location = New System.Drawing.Point(7, 355)
+ Me.ucrBase.Location = New System.Drawing.Point(13, 275)
Me.ucrBase.Name = "ucrBase"
Me.ucrBase.Size = New System.Drawing.Size(410, 56)
Me.ucrBase.TabIndex = 2
@@ -59,39 +55,25 @@ Partial Class dlgUnstack
Me.ucrSelectorByDataFrameAddRemove.Size = New System.Drawing.Size(242, 179)
Me.ucrSelectorByDataFrameAddRemove.TabIndex = 7
'
- 'ucrReceiverFactors
- '
- Me.ucrReceiverFactors.Location = New System.Drawing.Point(245, 65)
- Me.ucrReceiverFactors.Name = "ucrReceiverFactors"
- Me.ucrReceiverFactors.Size = New System.Drawing.Size(121, 128)
- Me.ucrReceiverFactors.TabIndex = 8
- '
- 'ucrReceiverColumns
- '
- Me.ucrReceiverColumns.Location = New System.Drawing.Point(387, 65)
- Me.ucrReceiverColumns.Name = "ucrReceiverColumns"
- Me.ucrReceiverColumns.Size = New System.Drawing.Size(121, 128)
- Me.ucrReceiverColumns.TabIndex = 8
- '
'lblFactorstoUnstackBy
'
Me.lblFactorstoUnstackBy.AutoSize = True
- Me.lblFactorstoUnstackBy.Location = New System.Drawing.Point(245, 38)
+ Me.lblFactorstoUnstackBy.Location = New System.Drawing.Point(258, 16)
Me.lblFactorstoUnstackBy.Name = "lblFactorstoUnstackBy"
- Me.lblFactorstoUnstackBy.Size = New System.Drawing.Size(121, 13)
+ Me.lblFactorstoUnstackBy.Size = New System.Drawing.Size(118, 13)
Me.lblFactorstoUnstackBy.TabIndex = 9
- Me.lblFactorstoUnstackBy.Tag = "Factor(s)_to_Unstrack_By"
- Me.lblFactorstoUnstackBy.Text = "Factor(s) to Unstrack By"
+ Me.lblFactorstoUnstackBy.Tag = "Factors_to_Unstack_By"
+ Me.lblFactorstoUnstackBy.Text = "Factor(s) to Unstack By"
'
'lblColumnstoUnstack
'
Me.lblColumnstoUnstack.AutoSize = True
- Me.lblColumnstoUnstack.Location = New System.Drawing.Point(384, 39)
+ Me.lblColumnstoUnstack.Location = New System.Drawing.Point(255, 69)
Me.lblColumnstoUnstack.Name = "lblColumnstoUnstack"
- Me.lblColumnstoUnstack.Size = New System.Drawing.Size(102, 13)
+ Me.lblColumnstoUnstack.Size = New System.Drawing.Size(97, 13)
Me.lblColumnstoUnstack.TabIndex = 9
- Me.lblColumnstoUnstack.Tag = "Columns_to_Unstack"
- Me.lblColumnstoUnstack.Text = "Columns to Unstack"
+ Me.lblColumnstoUnstack.Tag = "Column_to_Unstack"
+ Me.lblColumnstoUnstack.Text = "Column to Unstack"
'
'chkUseFactoLabels
'
@@ -104,72 +86,50 @@ Partial Class dlgUnstack
Me.chkUseFactoLabels.Text = "Use Factor labels in Column Names"
Me.chkUseFactoLabels.UseVisualStyleBackColor = True
'
- 'grpOutputOptions
- '
- Me.grpOutputOptions.Controls.Add(Me.txtSheetName)
- Me.grpOutputOptions.Controls.Add(Me.lblSheetName)
- Me.grpOutputOptions.Controls.Add(Me.rdoNewWorksheet)
- Me.grpOutputOptions.Controls.Add(Me.rdoExistingWorksheet)
- Me.grpOutputOptions.Location = New System.Drawing.Point(22, 249)
- Me.grpOutputOptions.Name = "grpOutputOptions"
- Me.grpOutputOptions.Size = New System.Drawing.Size(199, 100)
- Me.grpOutputOptions.TabIndex = 11
- Me.grpOutputOptions.TabStop = False
- Me.grpOutputOptions.Tag = "Output_Options"
- Me.grpOutputOptions.Text = "Output Options"
- '
- 'txtSheetName
- '
- Me.txtSheetName.Location = New System.Drawing.Point(95, 66)
- Me.txtSheetName.Name = "txtSheetName"
- Me.txtSheetName.Size = New System.Drawing.Size(100, 20)
- Me.txtSheetName.TabIndex = 2
- '
- 'lblSheetName
- '
- Me.lblSheetName.AutoSize = True
- Me.lblSheetName.Location = New System.Drawing.Point(31, 67)
- Me.lblSheetName.Name = "lblSheetName"
- Me.lblSheetName.Size = New System.Drawing.Size(66, 13)
- Me.lblSheetName.TabIndex = 1
- Me.lblSheetName.Tag = "Sheet_Name"
- Me.lblSheetName.Text = "Sheet Name"
- '
- 'rdoNewWorksheet
- '
- Me.rdoNewWorksheet.AutoSize = True
- Me.rdoNewWorksheet.Location = New System.Drawing.Point(7, 43)
- Me.rdoNewWorksheet.Name = "rdoNewWorksheet"
- Me.rdoNewWorksheet.Size = New System.Drawing.Size(102, 17)
- Me.rdoNewWorksheet.TabIndex = 0
- Me.rdoNewWorksheet.TabStop = True
- Me.rdoNewWorksheet.Tag = "New_Worksheet"
- Me.rdoNewWorksheet.Text = "New Worksheet"
- Me.rdoNewWorksheet.UseVisualStyleBackColor = True
- '
- 'rdoExistingWorksheet
- '
- Me.rdoExistingWorksheet.AutoSize = True
- Me.rdoExistingWorksheet.Location = New System.Drawing.Point(7, 20)
- Me.rdoExistingWorksheet.Name = "rdoExistingWorksheet"
- Me.rdoExistingWorksheet.Size = New System.Drawing.Size(116, 17)
- Me.rdoExistingWorksheet.TabIndex = 0
- Me.rdoExistingWorksheet.TabStop = True
- Me.rdoExistingWorksheet.Tag = "Existing_Worksheet"
- Me.rdoExistingWorksheet.Text = "Existing Worksheet"
- Me.rdoExistingWorksheet.UseVisualStyleBackColor = True
+ 'ucrfactortoUnstackReceiver
+ '
+ Me.ucrfactortoUnstackReceiver.Location = New System.Drawing.Point(256, 40)
+ Me.ucrfactortoUnstackReceiver.Name = "ucrfactortoUnstackReceiver"
+ Me.ucrfactortoUnstackReceiver.Size = New System.Drawing.Size(106, 26)
+ Me.ucrfactortoUnstackReceiver.TabIndex = 12
+ '
+ 'ucrColumntoUnstackReceiver
+ '
+ Me.ucrColumntoUnstackReceiver.Location = New System.Drawing.Point(258, 95)
+ Me.ucrColumntoUnstackReceiver.Name = "ucrColumntoUnstackReceiver"
+ Me.ucrColumntoUnstackReceiver.Size = New System.Drawing.Size(106, 26)
+ Me.ucrColumntoUnstackReceiver.TabIndex = 12
+ '
+ 'chkIDColumn
+ '
+ Me.chkIDColumn.AutoSize = True
+ Me.chkIDColumn.Location = New System.Drawing.Point(257, 126)
+ Me.chkIDColumn.Name = "chkIDColumn"
+ Me.chkIDColumn.Size = New System.Drawing.Size(75, 17)
+ Me.chkIDColumn.TabIndex = 13
+ Me.chkIDColumn.Tag = "ID_Column"
+ Me.chkIDColumn.Text = "ID Column"
+ Me.chkIDColumn.UseVisualStyleBackColor = True
+ '
+ 'ucrIDColumnReceiver
+ '
+ Me.ucrIDColumnReceiver.Location = New System.Drawing.Point(249, 145)
+ Me.ucrIDColumnReceiver.Name = "ucrIDColumnReceiver"
+ Me.ucrIDColumnReceiver.Size = New System.Drawing.Size(121, 128)
+ Me.ucrIDColumnReceiver.TabIndex = 14
'
'dlgUnstack
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(515, 408)
- Me.Controls.Add(Me.grpOutputOptions)
+ Me.ClientSize = New System.Drawing.Size(420, 331)
+ Me.Controls.Add(Me.ucrIDColumnReceiver)
+ Me.Controls.Add(Me.chkIDColumn)
+ Me.Controls.Add(Me.ucrColumntoUnstackReceiver)
+ Me.Controls.Add(Me.ucrfactortoUnstackReceiver)
Me.Controls.Add(Me.chkUseFactoLabels)
Me.Controls.Add(Me.lblColumnstoUnstack)
Me.Controls.Add(Me.lblFactorstoUnstackBy)
- Me.Controls.Add(Me.ucrReceiverColumns)
- Me.Controls.Add(Me.ucrReceiverFactors)
Me.Controls.Add(Me.ucrSelectorByDataFrameAddRemove)
Me.Controls.Add(Me.ucrDataFrame)
Me.Controls.Add(Me.ucrBase)
@@ -178,8 +138,6 @@ Partial Class dlgUnstack
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Tag = "Unstack_split_columns"
Me.Text = "Unstack(Split) columns"
- Me.grpOutputOptions.ResumeLayout(False)
- Me.grpOutputOptions.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -187,14 +145,11 @@ Partial Class dlgUnstack
Friend WithEvents ucrBase As ucrButtons
Friend WithEvents ucrDataFrame As ucrDataFrame
Friend WithEvents ucrSelectorByDataFrameAddRemove As ucrSelectorByDataFrameAddRemove
- Friend WithEvents ucrReceiverFactors As ucrReceiverMultiple
- Friend WithEvents ucrReceiverColumns As ucrReceiverMultiple
Friend WithEvents lblFactorstoUnstackBy As Label
Friend WithEvents lblColumnstoUnstack As Label
Friend WithEvents chkUseFactoLabels As CheckBox
- Friend WithEvents grpOutputOptions As GroupBox
- Friend WithEvents txtSheetName As TextBox
- Friend WithEvents lblSheetName As Label
- Friend WithEvents rdoNewWorksheet As RadioButton
- Friend WithEvents rdoExistingWorksheet As RadioButton
+ Friend WithEvents ucrfactortoUnstackReceiver As ucrReceiverSingle
+ Friend WithEvents ucrColumntoUnstackReceiver As ucrReceiverSingle
+ Friend WithEvents chkIDColumn As CheckBox
+ Friend WithEvents ucrIDColumnReceiver As ucrReceiverMultiple
End Class
diff --git a/instat/dlgUnstack.vb b/instat/dlgUnstack.vb
index 000be2dda1f..05aecd1f470 100644
--- a/instat/dlgUnstack.vb
+++ b/instat/dlgUnstack.vb
@@ -12,31 +12,39 @@
'
' You should have received a copy of the GNU General Public License k
' along with this program. If not, see .
+
Imports instat.Translations
Public Class dlgUnstack
Private Sub dlgUnstack_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- ucrBase.clsRsyntax.SetFunction("unstack")
+ ucrBase.clsRsyntax.SetFunction("unstack")
ucrBase.clsRsyntax.iCallType = 1
- ucrReceiverColumns.Selector = ucrSelectorByDataFrameAddRemove
- ucrReceiverFactors.Selector = ucrSelectorByDataFrameAddRemove
- ucrReceiverFactors.SetMeAsReceiver()
+ ucrfactortoUnstackReceiver.SetMeAsReceiver()
+ ucrIDColumnReceiver.Selector = ucrSelectorByDataFrameAddRemove
+ ucrfactortoUnstackReceiver.Selector = ucrSelectorByDataFrameAddRemove
+ ucrIDColumnReceiver.SetMeAsReceiver()
autoTranslate(Me)
- lblSheetName.Visible = False
- txtSheetName.Visible = False
+ ucrIDColumnReceiver.Visible = False
+ chkIDColumn.Checked = False
+ End Sub
+
+ Private Sub ucrReceiverColumns_Enter(sender As Object, e As EventArgs)
+ ucrIDColumnReceiver.SetMeAsReceiver()
End Sub
- Private Sub rdoNewWorksheet_CheckedChanged(sender As Object, e As EventArgs) Handles rdoNewWorksheet.CheckedChanged
- If rdoNewWorksheet.Checked = True Then
- lblSheetName.Visible = True
- txtSheetName.Visible = True
+ Private Sub chkIDColumn_CheckedChanged(sender As Object, e As EventArgs) Handles chkIDColumn.CheckedChanged
+ If chkIDColumn.Checked = True Then
+ ucrIDColumnReceiver.Visible = True
Else
- lblSheetName.Visible = False
- txtSheetName.Visible = False
+ ucrIDColumnReceiver.Visible = False
End If
End Sub
- Private Sub ucrReceiverColumns_Enter(sender As Object, e As EventArgs) Handles ucrReceiverColumns.Enter
- ucrReceiverColumns.SetMeAsReceiver()
+ Private Sub ucrfactortoUnstackReceiver_Leave(sender As Object, e As EventArgs) Handles ucrfactortoUnstackReceiver.Leave
+ ucrBase.clsRsyntax.AddParameter("", ucrfactortoUnstackReceiver.GetVariableNames())
+ End Sub
+
+ Private Sub ucrColumntoUnstackReceiver_Leave(sender As Object, e As EventArgs) Handles ucrColumntoUnstackReceiver.Leave
+ ucrBase.clsRsyntax.AddParameter("", ucrColumntoUnstackReceiver.GetVariableNames())
End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgcolrowname.designer.vb b/instat/dlgcolrowname.designer.vb
new file mode 100644
index 00000000000..e81b6b91ec4
--- /dev/null
+++ b/instat/dlgcolrowname.designer.vb
@@ -0,0 +1,89 @@
+ _
+Partial Class dlgcolrowname
+ 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.Label1 = New System.Windows.Forms.Label()
+ Me.txtcolrowname = New System.Windows.Forms.TextBox()
+ Me.cmdClickOk = New System.Windows.Forms.Button()
+ Me.btnClickCancel = New System.Windows.Forms.Button()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(6, 18)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(35, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Name"
+ '
+ 'txtcolrowname
+ '
+ Me.txtcolrowname.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+ Me.txtcolrowname.Location = New System.Drawing.Point(87, 15)
+ Me.txtcolrowname.Name = "txtcolrowname"
+ Me.txtcolrowname.Size = New System.Drawing.Size(100, 20)
+ Me.txtcolrowname.TabIndex = 1
+ '
+ 'cmdClickOk
+ '
+ Me.cmdClickOk.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
+ Me.cmdClickOk.Location = New System.Drawing.Point(2, 44)
+ Me.cmdClickOk.Name = "cmdClickOk"
+ Me.cmdClickOk.Size = New System.Drawing.Size(75, 23)
+ Me.cmdClickOk.TabIndex = 2
+ Me.cmdClickOk.Text = "OK"
+ Me.cmdClickOk.UseVisualStyleBackColor = True
+ '
+ 'btnClickCancel
+ '
+ Me.btnClickCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+ Me.btnClickCancel.Location = New System.Drawing.Point(112, 44)
+ Me.btnClickCancel.Name = "btnClickCancel"
+ Me.btnClickCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnClickCancel.TabIndex = 3
+ Me.btnClickCancel.Text = "Cancel"
+ Me.btnClickCancel.UseVisualStyleBackColor = True
+ '
+ 'dlgcolrowname
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(199, 71)
+ Me.Controls.Add(Me.btnClickCancel)
+ Me.Controls.Add(Me.cmdClickOk)
+ Me.Controls.Add(Me.txtcolrowname)
+ Me.Controls.Add(Me.Label1)
+ Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
+ Me.Name = "dlgcolrowname"
+ Me.Text = "New Name"
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
+
+ End Sub
+
+ Friend WithEvents Label1 As Label
+ Friend WithEvents txtcolrowname As TextBox
+ Friend WithEvents cmdClickOk As Button
+ Friend WithEvents btnClickCancel As Button
+End Class
diff --git a/instat/dlgcolrowname.fr-FR.resx b/instat/dlgcolrowname.fr-FR.resx
new file mode 100644
index 00000000000..9c9f69d752c
--- /dev/null
+++ b/instat/dlgcolrowname.fr-FR.resx
@@ -0,0 +1,15 @@
+
+
+
+ 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/dlgcolrowname.resx b/instat/dlgcolrowname.resx
new file mode 100644
index 00000000000..29dcb1b3a35
--- /dev/null
+++ b/instat/dlgcolrowname.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/dlgcolrowname.sw-KE.resx b/instat/dlgcolrowname.sw-KE.resx
new file mode 100644
index 00000000000..9c9f69d752c
--- /dev/null
+++ b/instat/dlgcolrowname.sw-KE.resx
@@ -0,0 +1,15 @@
+
+
+
+ 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/dlgcolrowname.vb b/instat/dlgcolrowname.vb
new file mode 100644
index 00000000000..81e47bff203
--- /dev/null
+++ b/instat/dlgcolrowname.vb
@@ -0,0 +1,25 @@
+Public Class dlgcolrowname
+ Private Sub dlgcolrowname_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ txtcolrowname.Text = frmEditor.grdData.CurrentWorksheet.GetColumnHeader(frmEditor.grdData.CurrentWorksheet.SelectionRange.Col).Text
+ End Sub
+
+ Private Sub btnClickCancel_Click(sender As Object, e As EventArgs) Handles btnClickCancel.Click
+ Me.Hide()
+ End Sub
+
+ Private Sub cmdClickOk_Click(sender As Object, e As EventArgs) Handles cmdClickOk.Click
+ Dim strk As String
+ Dim newcolname As String
+ newcolname = txtcolrowname.Text.Trim()
+ If newcolname IsNot "" Then
+ strk = frmMain.clsRLink.strInstatDataObject & "$rename_column_in_data(data_name = " & Chr(34) & frmEditor.grdData.CurrentWorksheet.Name & Chr(34) & ", column_name = " &
+ Chr(34) & frmEditor.grdData.CurrentWorksheet.GetColumnHeader(frmEditor.grdData.CurrentWorksheet.SelectionRange.Col).Text & Chr(34) & ", new_val = " & Chr(34) & newcolname & Chr(34) & ")"
+ frmMain.clsRLink.RunScript(strk)
+ Me.Hide()
+ Else
+ MessageBox.Show("Name cannot be empty")
+ txtcolrowname.Focus()
+ End If
+
+ End Sub
+End Class
\ No newline at end of file
diff --git a/instat/frmEditor.Designer.vb b/instat/frmEditor.Designer.vb
index f5daf5f579d..80fc764f4db 100644
--- a/instat/frmEditor.Designer.vb
+++ b/instat/frmEditor.Designer.vb
@@ -67,6 +67,7 @@ Partial Class frmEditor
Me.deleteSheet = New System.Windows.Forms.ToolStripMenuItem()
Me.renameSheet = New System.Windows.Forms.ToolStripMenuItem()
Me.lblNoData = New System.Windows.Forms.Label()
+ Me.mnuColumnRename = New System.Windows.Forms.ToolStripMenuItem()
Me.columnContextMenuStrip.SuspendLayout()
Me.cellContextMenuStrip.SuspendLayout()
Me.leadHeaderContextMenuStrip.SuspendLayout()
@@ -94,9 +95,9 @@ Partial Class frmEditor
'
'columnContextMenuStrip
'
- Me.columnContextMenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.insertColToolStripMenuItem, Me.deleteColumnToolStripMenuItem, Me.toolStripMenuItem2, Me.resetToDefaultWidthToolStripMenuItem, Me.columnWidthToolStripMenuItem, Me.hideColumnsToolStripMenuItem, Me.unhideColumnsToolStripMenuItem, Me.toolStripMenuItem21, Me.columnFilterToolStripMenuItem, Me.clearColumnFilterToolStripMenuItem, Me.toolStripMenuItem35, Me.groupColumnsToolStripMenuItem1, Me.ungroupColumnsToolStripMenuItem1, Me.ungroupAllColumnsToolStripMenuItem, Me.ToolStripMenuItem1})
+ Me.columnContextMenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuColumnRename, Me.insertColToolStripMenuItem, Me.deleteColumnToolStripMenuItem, Me.toolStripMenuItem2, Me.resetToDefaultWidthToolStripMenuItem, Me.columnWidthToolStripMenuItem, Me.hideColumnsToolStripMenuItem, Me.unhideColumnsToolStripMenuItem, Me.toolStripMenuItem21, Me.columnFilterToolStripMenuItem, Me.clearColumnFilterToolStripMenuItem, Me.toolStripMenuItem35, Me.groupColumnsToolStripMenuItem1, Me.ungroupColumnsToolStripMenuItem1, Me.ungroupAllColumnsToolStripMenuItem, Me.ToolStripMenuItem1})
Me.columnContextMenuStrip.Name = "columnContextMenuStrip"
- Me.columnContextMenuStrip.Size = New System.Drawing.Size(193, 286)
+ Me.columnContextMenuStrip.Size = New System.Drawing.Size(193, 330)
'
'insertColToolStripMenuItem
'
@@ -196,36 +197,36 @@ Partial Class frmEditor
'cutRangeToolStripMenuItem
'
Me.cutRangeToolStripMenuItem.Name = "cutRangeToolStripMenuItem"
- Me.cutRangeToolStripMenuItem.Size = New System.Drawing.Size(201, 22)
+ Me.cutRangeToolStripMenuItem.Size = New System.Drawing.Size(123, 22)
Me.cutRangeToolStripMenuItem.Text = "Cut"
'
'copyRangeToolStripMenuItem
'
Me.copyRangeToolStripMenuItem.Name = "copyRangeToolStripMenuItem"
- Me.copyRangeToolStripMenuItem.Size = New System.Drawing.Size(201, 22)
+ Me.copyRangeToolStripMenuItem.Size = New System.Drawing.Size(123, 22)
Me.copyRangeToolStripMenuItem.Text = "Copy"
'
'pasteRangeToolStripMenuItem
'
Me.pasteRangeToolStripMenuItem.Name = "pasteRangeToolStripMenuItem"
- Me.pasteRangeToolStripMenuItem.Size = New System.Drawing.Size(201, 22)
+ Me.pasteRangeToolStripMenuItem.Size = New System.Drawing.Size(123, 22)
Me.pasteRangeToolStripMenuItem.Text = "Paste"
'
'ToolStripSeparator4
'
Me.ToolStripSeparator4.Name = "ToolStripSeparator4"
- Me.ToolStripSeparator4.Size = New System.Drawing.Size(198, 6)
+ Me.ToolStripSeparator4.Size = New System.Drawing.Size(120, 6)
'
'mergeRangeToolStripMenuItem
'
Me.mergeRangeToolStripMenuItem.Name = "mergeRangeToolStripMenuItem"
- Me.mergeRangeToolStripMenuItem.Size = New System.Drawing.Size(201, 22)
+ Me.mergeRangeToolStripMenuItem.Size = New System.Drawing.Size(123, 22)
Me.mergeRangeToolStripMenuItem.Text = "Merge"
'
'unmergeRangeToolStripMenuItem
'
Me.unmergeRangeToolStripMenuItem.Name = "unmergeRangeToolStripMenuItem"
- Me.unmergeRangeToolStripMenuItem.Size = New System.Drawing.Size(201, 22)
+ Me.unmergeRangeToolStripMenuItem.Size = New System.Drawing.Size(123, 22)
Me.unmergeRangeToolStripMenuItem.Text = "Unmerge"
'
'leadHeaderContextMenuStrip
@@ -351,6 +352,12 @@ Partial Class frmEditor
Me.lblNoData.Tag = "no_data_loaded"
Me.lblNoData.Text = "No Data Loaded"
'
+ 'mnuColumnRename
+ '
+ Me.mnuColumnRename.Name = "mnuColumnRename"
+ Me.mnuColumnRename.Size = New System.Drawing.Size(192, 22)
+ Me.mnuColumnRename.Text = "Rename Column"
+ '
'frmEditor
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -416,4 +423,5 @@ Partial Class frmEditor
Friend WithEvents insertSheet As ToolStripMenuItem
Friend WithEvents deleteSheet As ToolStripMenuItem
Friend WithEvents renameSheet As ToolStripMenuItem
+ Friend WithEvents mnuColumnRename As ToolStripMenuItem
End Class
diff --git a/instat/frmEditor.vb b/instat/frmEditor.vb
index 609503be7c0..85bd2881d99 100644
--- a/instat/frmEditor.vb
+++ b/instat/frmEditor.vb
@@ -20,6 +20,7 @@ Imports System.Threading
Imports instat.Translations
Public Class frmEditor
Public clearFilter As unvell.ReoGrid.Data.AutoColumnFilter
+ Public strf As String
Private Sub frmEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load
frmMain.clsGrids.SetData(grdData)
grdData.Visible = False
@@ -37,15 +38,15 @@ Public Class frmEditor
End Sub
Private Sub insertCol_Click(sender As Object, e As EventArgs) Handles insertColToolStripMenuItem.Click
- grdData.DoAction(New unvell.ReoGrid.Actions.InsertColumnsAction(grdData.CurrentWorksheet.SelectionRange.Col, grdData.CurrentWorksheet.SelectionRange.Cols))
- 'Dim strF As String
- 'strF = frmMain.clsRLink.strInstatDataObject & "$insert_column_in_data(" & Chr(34) & grdData.CurrentWorksheet.Name & Chr(34) & "," & Chr(34) & "ff" & Chr(34) & ",c()," & grdData.CurrentWorksheet.SelectionRange.Col & ")"
- 'frmMain.clsRLink.clsEngine.Evaluate(strF)
- 'frmMain.clsGrids.UpdateGrids()
+ 'grdData.DoAction(New unvell.ReoGrid.Actions.InsertColumnsAction(grdData.CurrentWorksheet.SelectionRange.Col, grdData.CurrentWorksheet.SelectionRange.Cols))
+ strf = frmMain.clsRLink.strInstatDataObject & "$insert_column_in_data(data_name =" & Chr(34) & grdData.CurrentWorksheet.Name & Chr(34) & ",col_data = " & "c(), start_pos = " & grdData.CurrentWorksheet.SelectionRange.Col + 1 & ",number_cols =" & grdData.CurrentWorksheet.SelectionRange.Cols & ")"
+ frmMain.clsRLink.RunScript(strf)
End Sub
Private Sub deleteColumnToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles deleteColumnToolStripMenuItem.Click
- grdData.DoAction(New unvell.ReoGrid.Actions.RemoveColumnsAction(grdData.CurrentWorksheet.SelectionRange.Col, grdData.CurrentWorksheet.SelectionRange.Cols))
+ 'grdData.DoAction(New unvell.ReoGrid.Actions.RemoveColumnsAction(grdData.CurrentWorksheet.SelectionRange.Col, grdData.CurrentWorksheet.SelectionRange.Cols))
+ strf = frmMain.clsRLink.strInstatDataObject & "$remove_columns_in_data_from_start_position(data_name =" & Chr(34) & grdData.CurrentWorksheet.Name & Chr(34) & ", start_pos = " & grdData.CurrentWorksheet.SelectionRange.Col + 1 & ",col_numbers =" & grdData.CurrentWorksheet.SelectionRange.Cols & ")"
+ frmMain.clsRLink.RunScript(strf)
End Sub
Private Sub resetToDefaultWidthToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles resetToDefaultWidthToolStripMenuItem.Click
@@ -141,11 +142,15 @@ Public Class frmEditor
End Sub
Private Sub insertRowToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles insertRowToolStripMenuItem.Click
- grdData.DoAction(New unvell.ReoGrid.Actions.InsertRowsAction(grdData.CurrentWorksheet.SelectionRange.Row, grdData.CurrentWorksheet.SelectionRange.Rows))
+ 'grdData.DoAction(New unvell.ReoGrid.Actions.InsertRowsAction(grdData.CurrentWorksheet.SelectionRange.Row, grdData.CurrentWorksheet.SelectionRange.Rows))
+ strf = frmMain.clsRLink.strInstatDataObject & "$insert_row_in_data(data_name =" & Chr(34) & grdData.CurrentWorksheet.Name & Chr(34) & ",row_data = " & "c(), start_pos = " & grdData.CurrentWorksheet.SelectionRange.Row + 1 & ",number_rows =" & grdData.CurrentWorksheet.SelectionRange.Rows & ")"
+ frmMain.clsRLink.RunScript(strf)
End Sub
Private Sub ToolStripMenuItem3_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem3.Click
- grdData.DoAction(New unvell.ReoGrid.Actions.RemoveRowsAction(grdData.CurrentWorksheet.SelectionRange.Row, grdData.CurrentWorksheet.SelectionRange.Rows))
+ 'grdData.DoAction(New unvell.ReoGrid.Actions.RemoveRowsAction(grdData.CurrentWorksheet.SelectionRange.Row, grdData.CurrentWorksheet.SelectionRange.Rows))
+ strf = frmMain.clsRLink.strInstatDataObject & "$remove_rows_in_data(data_name =" & Chr(34) & grdData.CurrentWorksheet.Name & Chr(34) & ", start_pos = " & grdData.CurrentWorksheet.SelectionRange.Col + 1 & ",num_rows =" & grdData.CurrentWorksheet.SelectionRange.Cols & ")"
+ frmMain.clsRLink.RunScript(strf)
End Sub
Private Sub resetToDefaultHeightToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles resetToDefaultHeightToolStripMenuItem.Click
@@ -199,4 +204,8 @@ Public Class frmEditor
Private Sub deleteSheet_Click(sender As Object, e As EventArgs) Handles deleteSheet.Click
grdData.RemoveWorksheet(grdData.GetWorksheetIndex(grdData.CurrentWorksheet))
End Sub
+
+ Private Sub mnuColumnRename_Click(sender As Object, e As EventArgs) Handles mnuColumnRename.Click
+ dlgcolrowname.ShowDialog()
+ End Sub
End Class
\ No newline at end of file
diff --git a/instat/instat.vbproj b/instat/instat.vbproj
index 8bbf16fc57d..5bf7cbd1b9e 100644
--- a/instat/instat.vbproj
+++ b/instat/instat.vbproj
@@ -215,6 +215,12 @@
Form
+
+ dlgcolrowname.vb
+
+
+ Form
+
dlgColumnRows.vb
@@ -1170,6 +1176,15 @@
dlgCliPlot.vb
+
+ dlgcolrowname.vb
+
+
+ dlgcolrowname.vb
+
+
+ dlgcolrowname.vb
+
dlgColumnRows.vb
diff --git a/instat/static/InstatObject/R/data_object.R b/instat/static/InstatObject/R/data_object.R
index 1d6a61a8509..27247667e6c 100644
--- a/instat/static/InstatObject/R/data_object.R
+++ b/instat/static/InstatObject/R/data_object.R
@@ -191,11 +191,12 @@ data_obj$methods(add_column_to_data = function(col_name = "", col_data) {
}
)
-data_obj$methods(get_column_from_data = function(col_name) {
- if(missing(col_name)) stop("no col_name to return")
- if(!col_name %in% names(data)) stop(paste(col_name, "not found in data"))
+data_obj$methods(get_columns_from_data = function(col_names) {
+ if(missing(col_names)) stop("no col_names to return")
+ if(!all(sapply(col_names, function(x) x %in% names(data)))) stop("Not all column names were found in data")
- return(data[[col_name]])
+ if(length(col_names)==1) return (data[[col_names]])
+ else return(data[col_names])
}
)
@@ -223,6 +224,8 @@ data_obj$methods(rename_column_in_data = function(curr_col_name = "", new_col_na
renamed."))
}
names(data)[names(data) == curr_col_name] <<- new_col_name
+ rownames(variables_metadata)[rownames(variables_metadata) == curr_col_name] <<- new_col_name
+ variables_metadata[rownames(variables_metadata) == new_col_name, 1] <<- new_col_name
.self$append_to_changes(list(Renamed_col, curr_col_name, new_col_name))
.self$set_data_changed(TRUE)
.self$set_variables_metadata_changed(TRUE)
@@ -230,24 +233,36 @@ data_obj$methods(rename_column_in_data = function(curr_col_name = "", new_col_na
}
)
-data_obj$methods(remove_column_in_data = function(col_name = "") {
-
- # Column name must be character
- if( ! is.character(col_name) ) {
- stop("Column name must be of type: character")
- }
-
- else if (!(col_name %in% names(data))) {
- stop(paste0("Column :'", col_name, " was not found in the data."))
- }
-
- else {
- data[[ col_name ]] <<- NULL
- .self$append_to_changes(list(Removed_col, col_name))
+data_obj$methods(remove_columns_in_data_from_start_position = function(start_pos, col_numbers = 1 ) {
+ if (start_pos <= 0) stop("You cannot remove a column into the position less or equal to zero.")
+ if (start_pos %% 1 != 0) stop("start_pos value should be an integer.")
+ if (length(names(data)) < start_pos) stop("The start_pos argument exceeds the number of columns in the data.")
+ col_names = names(data)[start_pos:(start_pos+col_numbers-1)]
+ .self$remove_columns_in_data(col_names)
+}
+)
+
+data_obj$methods(remove_columns_in_data = function(cols=c()) {
+ for(col_name in cols){
+ # Column name must be character
+ if( ! is.character(col_name) ) {
+ stop("Column name must be of type: character")
+ }
+
+ else if (!(col_name %in% names(data))) {
+ stop(paste0("Column :'", col_name, " was not found in the data."))
+ }
+
+ else {
+ data[[ col_name ]] <<- NULL
+ # .self$append_to_changes(list(Removed_col, col_name))
+ }
}
+ .self$append_to_changes(list(Removed_col, cols))
.self$set_data_changed(TRUE)
.self$set_variables_metadata_changed(TRUE)
}
+
)
data_obj$methods(replace_value_in_data = function(col_name = "", index, new_value = "") {
@@ -328,17 +343,17 @@ data_obj$methods(add_defaults_meta = function(user) {
}
)
-data_obj$methods(remove_row_in_data = function(row_num) {
-
- if ( row_num != as.integer(row_num) || row_num < 1 || row_num > nrow(data) ) {
+data_obj$methods(remove_rows_in_data = function(start_pos, num_rows = 1) {
+ if ( start_pos != as.integer(start_pos) || start_pos < 1 || start_pos > nrow(data) ) {
stop( paste("index must be an integer between 1 and", nrow(data), ".") )
}
- else if (row_num > nrow(data)) {
- stop(paste0(" Row: '", row_num, " does not exist in the data."))
+ else if (start_pos > nrow(data)) {
+ stop(paste0(" Row: '", start_pos, " does not exist in the data."))
}
else {
- data <<- data[-row_num,]
- .self$append_to_changes(list(Removed_row, row_num))
+ end_pos <- start_pos + num_rows - 1
+ data <<- data[-(start_pos:end_pos),]
+ .self$append_to_changes(list(Removed_row, start_pos))
}
.self$set_data_changed(TRUE)
}
@@ -349,30 +364,27 @@ data_obj$methods(get_next_default_column_name = function(prefix) {
}
)
-data_obj$methods(insert_column_in_data = function( col_name = "", col_data =c(), col_number) {
- if (col_number <= 0) stop("You cannot put a column into the position less or equal to zero.")
- if (col_number %% 1 != 0) stop("col_number value should be an integer.")
- if (length(names(data)) < col_number) stop("The col_number argument exceeds the number of columns in the data.")
-
-
+data_obj$methods(insert_column_in_data = function(col_data =c(), start_pos = length(names(data)), number_cols = 1) {
+ if (start_pos <= 0) stop("You cannot put a column into the position less or equal to zero.")
+ if (start_pos %% 1 != 0) stop("start_pos value should be an integer.")
+ if (length(names(data)) < start_pos) stop("The start_pos argument exceeds the number of columns in the data.")
+
if(length(col_data)==0){
col_data <- rep(NA, nrow(data))
- warning(paste("You are inserting an empty column to", get_metadata(data_name_label)))
+ warning(paste("You are inserting empty column(s) to", get_metadata(data_name_label)))
}
-
- if(missing(col_name)){
+ for(j in 1:number_cols){
col_name <- .self$get_next_default_column_name("X")
+ assign(col_name, col_data)
+ data[, col_name] <<- col_data
}
-
- data[, col_name] <<- col_data
- if(col_number==1){
- data <<- cbind(data[ncol(data)], data[(col_number):ncol(data)-1])
+ if(start_pos==1){
+ data <<- cbind(data[(ncol(data)-number_cols+1): ncol(data)], data[(start_pos):(ncol(data)-number_cols)])
}
else{
- data <<- cbind(data[1:(col_number -1)],data[ncol(data)], data[(col_number+1):ncol(data)-1])
+ data <<- cbind(data[1:(start_pos -1)],data[(ncol(data)-number_cols+1):ncol(data)], data[(start_pos+number_cols):ncol(data)-number_cols])
}
-
- .self$append_to_changes(list(Inserted_col, col_number))
+ .self$append_to_changes(list(Inserted_col, start_pos))
.self$data_changed = TRUE
}
)
@@ -407,31 +419,32 @@ data_obj$methods(move_column_in_data = function(col_name = "", col_number) {
}
)
-data_obj$methods(insert_row_in_data = function(row_num, row_data = c()) {
+data_obj$methods(insert_row_in_data = function(start_pos = (nrow(data)+1), row_data = c(), number_rows = 1) {
- if (row_num != as.integer(row_num) || row_num < 1 || row_num > nrow(data)+1 ) {
+ if (start_pos != as.integer(start_pos) || start_pos < 1 || start_pos > nrow(data) + 1 ) {
stop( paste("index must be an integer between 1 and", nrow(data)+1, ".") )
}
- if (length(row_data)==0){
+ if (length(row_data) == 0){
row_data <- rep(NA,ncol(data))
warning("You are inserting an empty row to data")
}
if(length(row_data)>0 && length(row_data)!=ncol(data)){
stop("The dimension of Row data is different from that of the data")
}
-
- if(row_num==1){
- data <<- rbind(row_data, data)
- }
-
- else if (row_num == (nrow(data)+1)){
- data <<- rbind(data,row_data)
- }
- else {
- data <<- rbind(data[1:(row_num-1),],row_data,data[(row_num):nrow(data),])
+ for(j in 1:number_rows){
+ if(start_pos==1){
+ data <<- rbind(row_data, data)
+ }
+ else if (start_pos == (nrow(data)+1)){
+ data <<- rbind(data,row_data)
+ }
+ else {
+ data <<- rbind(data[1:(start_pos-1),],row_data,data[(start_pos):nrow(data),])
+
+ }
}
- .self$append_to_changes(list(Inserted_row, row_num))
+ .self$append_to_changes(list(Inserted_row, start_pos))
.self$set_data_changed(TRUE)
}
)
diff --git a/instat/static/InstatObject/R/instat_object.R b/instat/static/InstatObject/R/instat_object.R
index 3d78c03f2fd..547d3e193ed 100644
--- a/instat/static/InstatObject/R/instat_object.R
+++ b/instat/static/InstatObject/R/instat_object.R
@@ -244,11 +244,11 @@ instat_obj$methods(add_column_to_data = function(data_name, col_name, col_data)
}
)
-instat_obj$methods(get_column_from_data = function(data_name, col_name) {
+instat_obj$methods(get_columns_from_data = function(data_name, col_names) {
if(missing(data_name)) stop("data_name is required")
if(!data_name %in% names(data_objects)) stop(paste(data_name, "not found"))
- data_objects[[data_name]]$get_column_from_data(col_name)
+ data_objects[[data_name]]$get_columns_from_data(col_names)
}
)
@@ -284,19 +284,27 @@ instat_obj$methods(rename_column_in_data = function(data_name, column_name, new_
}
)
-instat_obj$methods(remove_column_in_data = function(data_name, column_name) {
+instat_obj$methods(remove_columns_in_data_from_start_position = function(data_name, start_pos, col_numbers) {
if(!is.character(data_name)) stop("data_name must be of type character")
if(!data_name %in% names(data_objects)) stop(paste("dataframe: ", data_name, " not found"))
- data_objects[[data_name]]$remove_column_in_data(column_name)
+ data_objects[[data_name]]$remove_columns_in_data_from_start_position(start_pos = start_pos, col_numbers = col_numbers)
}
)
-instat_obj$methods(remove_row_in_data = function(data_name, row_num) {
+instat_obj$methods(remove_column_in_data = function(data_name, cols) {
if(!is.character(data_name)) stop("data_name must be of type character")
if(!data_name %in% names(data_objects)) stop(paste("dataframe: ", data_name, " not found"))
- data_objects[[data_name]]$remove_row_in_data(row_num)
+ data_objects[[data_name]]$remove_column_in_data(cols = cols)
+}
+)
+
+instat_obj$methods(remove_rows_in_data = function(data_name, start_pos, num_rows) {
+ if(!is.character(data_name)) stop("data_name must be of type character")
+ if(!data_name %in% names(data_objects)) stop(paste("dataframe: ", data_name, " not found"))
+
+ data_objects[[data_name]]$remove_rows_in_data(start_pos = start_pos, num_rows = num_rows)
}
)
@@ -323,15 +331,15 @@ instat_obj$methods(get_column_names = function(data_name) {
}
)
-instat_obj$methods(insert_column_in_data = function(data_name, col_name, col_data = c(), col_number) {
+instat_obj$methods(insert_column_in_data = function(data_name, col_data =c(), start_pos, number_cols) {
if(!is.character(data_name)) stop("data_name must be of type character")
if(!data_name %in% names(data_objects)) stop(paste("dataframe: ", data_name, " not found"))
- data_objects[[data_name]]$insert_column_in_data(col_name = col_name, col_data = col_data, col_number = col_number)
+ data_objects[[data_name]]$insert_column_in_data(col_data = col_data, start_pos = start_pos, number_cols = number_cols )
}
)
-instat_obj$methods(move_column_in_data = function(data_name, col_name = "", col_number){
+instat_obj$methods(move_column_in_data = function(data_name, col_name, col_number){
if(!is.character(data_name)) stop("data_name must be of type character")
if(!data_name %in% names(data_objects)) stop(paste("dataframe: ", data_name, " not found"))
@@ -339,11 +347,11 @@ instat_obj$methods(move_column_in_data = function(data_name, col_name = "", col_
}
)
-instat_obj$methods(insert_row_in_data = function(data_name, row_num, row_data = c()) {
+instat_obj$methods(insert_row_in_data = function(data_name, start_pos, row_data = c(), number_rows) {
if(!is.character(data_name)) stop("data_name must be of type character")
if(!data_name %in% names(data_objects)) stop(paste("dataframe: ", data_name, " not found"))
- data_objects[[data_name]]$insert_row_in_data(row_num = row_num, row_data = row_data)
+ data_objects[[data_name]]$insert_row_in_data(start_pos = start_pos, row_data = row_data, number_rows = number_rows)
}
)
diff --git a/instat/ucrDataFrame.Designer.vb b/instat/ucrDataFrame.Designer.vb
index b04b469fa9a..03552aa91b3 100644
--- a/instat/ucrDataFrame.Designer.vb
+++ b/instat/ucrDataFrame.Designer.vb
@@ -23,7 +23,7 @@ Partial Class ucrDataFrame
_
Private Sub InitializeComponent()
Me.cboAvailableDataFrames = New System.Windows.Forms.ComboBox()
- Me.lblSelectDataFrame = New System.Windows.Forms.Label()
+ Me.lblDataFrame = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'cboAvailableDataFrames
@@ -34,20 +34,21 @@ Partial Class ucrDataFrame
Me.cboAvailableDataFrames.Size = New System.Drawing.Size(121, 21)
Me.cboAvailableDataFrames.TabIndex = 0
'
- 'lblSelectDataFrame
+ 'lblDataFrame
'
- Me.lblSelectDataFrame.AutoSize = True
- Me.lblSelectDataFrame.Location = New System.Drawing.Point(3, 0)
- Me.lblSelectDataFrame.Name = "lblSelectDataFrame"
- Me.lblSelectDataFrame.Size = New System.Drawing.Size(98, 13)
- Me.lblSelectDataFrame.TabIndex = 1
- Me.lblSelectDataFrame.Text = "Select Data Frame:"
+ Me.lblDataFrame.AutoSize = True
+ Me.lblDataFrame.Location = New System.Drawing.Point(3, 0)
+ Me.lblDataFrame.Name = "lblDataFrame"
+ Me.lblDataFrame.Size = New System.Drawing.Size(65, 13)
+ Me.lblDataFrame.TabIndex = 1
+ Me.lblDataFrame.Tag = "Data_Frame:"
+ Me.lblDataFrame.Text = "Data Frame:"
'
'ucrDataFrame
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.Controls.Add(Me.lblSelectDataFrame)
+ Me.Controls.Add(Me.lblDataFrame)
Me.Controls.Add(Me.cboAvailableDataFrames)
Me.Name = "ucrDataFrame"
Me.Size = New System.Drawing.Size(127, 41)
@@ -57,5 +58,5 @@ Partial Class ucrDataFrame
End Sub
Friend WithEvents cboAvailableDataFrames As ComboBox
- Friend WithEvents lblSelectDataFrame As Label
+ Friend WithEvents lblDataFrame As Label
End Class
diff --git a/instat/ucrDataFrame.vb b/instat/ucrDataFrame.vb
index 0ae0e404024..4dd81941618 100644
--- a/instat/ucrDataFrame.vb
+++ b/instat/ucrDataFrame.vb
@@ -14,16 +14,16 @@
' You should have received a copy of the GNU General Public License k
' along with this program. If not, see .
Imports instat.Translations
+Imports RDotNet
Public Class ucrDataFrame
Public CurrentColumnList As ucrNewColumnName
+ Public strDataFrameLength As String
Private Sub ucrDataFrame_Load(sender As Object, e As EventArgs) Handles MyBase.Load
frmMain.clsRLink.FillComboDataFrames(cboAvailableDataFrames)
End Sub
-
-
Public Sub SetColumnList(ColumnList As ucrNewColumnName)
CurrentColumnList = ColumnList
UpdateColumnList()
@@ -34,6 +34,7 @@ Public Class ucrDataFrame
Private Sub cboAvailableDataFrames_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboAvailableDataFrames.SelectedIndexChanged
UpdateColumnList()
RaiseEvent DataFrameChanged(sender, e)
+ strDataFrameLength = frmMain.clsRLink.clsEngine.Evaluate(frmMain.clsRLink.strInstatDataObject & "$length_of_data(" & Chr(34) & cboAvailableDataFrames.Text & Chr(34) & ")").AsCharacter(0).ToString
End Sub
Public Sub UpdateColumnList()
diff --git a/instat/ucrDistributions.Designer.vb b/instat/ucrDistributions.Designer.vb
index 6d2977b8df1..33c27f7c1db 100644
--- a/instat/ucrDistributions.Designer.vb
+++ b/instat/ucrDistributions.Designer.vb
@@ -31,10 +31,10 @@ Partial Class ucrDistributions
Me.lblDistributionType.AutoSize = True
Me.lblDistributionType.Location = New System.Drawing.Point(3, 16)
Me.lblDistributionType.Name = "lblDistributionType"
- Me.lblDistributionType.Size = New System.Drawing.Size(89, 13)
+ Me.lblDistributionType.Size = New System.Drawing.Size(62, 13)
Me.lblDistributionType.TabIndex = 0
- Me.lblDistributionType.Tag = "distribution_type:"
- Me.lblDistributionType.Text = "Distribution Type:"
+ Me.lblDistributionType.Tag = "distribution:"
+ Me.lblDistributionType.Text = "Distribution:"
'
'cboDistributions
'
diff --git a/instat/ucrDistributions.vb b/instat/ucrDistributions.vb
index f006a835934..9cb7a804c8c 100644
--- a/instat/ucrDistributions.vb
+++ b/instat/ucrDistributions.vb
@@ -19,59 +19,75 @@ Imports instat.RSyntax
Public Class ucrDistributions
Public lstAllDistributions As New List(Of Distribution)
- Public lstRequiredDistributions As New List(Of Distribution)
- Public strRequiredDistributions As String = "All"
+ Public lstCurrentDistributions As New List(Of Distribution)
+ Public strDistributionType As String = ""
Public clsCurrDistribution As New Distribution
Public bDistributionsSet As Boolean = False
- Public ucrBaseButtons As ucrButtons
+ Public clsRSyntax As New RSyntax
+ Public clsCurrRFunction As New RFunction
+ Public lstFunctionParameters As New List(Of RParameter)
Private Sub ucrDistributions_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If Not bDistributionsSet Then
CreateDistributions()
End If
- SetRequiredDistributions()
End Sub
- Public Sub SetRequiredDistributions()
- Dim lstDistributionNames As New List(Of String)
+ Public Sub AddParameter(strArgumentName As String, strArgumentValue As String)
+ Dim i As Integer
+ clsRSyntax.AddParameter(strArgumentName, strArgumentValue, clsRFunction:=clsCurrRFunction)
+ i = lstFunctionParameters.FindIndex(Function(x) x.strArgumentName.Equals(strArgumentName))
+ If i = -1 Then
+ lstFunctionParameters.Add(clsCurrRFunction.clsParameters.Last)
+ Else
+ lstFunctionParameters(i).strArgumentValue = strArgumentValue
+ End If
+ End Sub
+
+ Public Sub IncludeFunctionParameter()
+ For Each clsParam In lstFunctionParameters
+ clsCurrRFunction.AddParameter(clsParam)
+ Next
+ End Sub
+
+ Public Sub SetRDistributions()
+
+ strDistributionType = "RFunctions"
+ SetDistributions()
+
+ End Sub
+
+ Public Sub SetPDistributions()
+
+ strDistributionType = "PFunctions"
+ SetDistributions()
+
+ End Sub
+
+ Private Sub SetDistributions()
+
+ Dim bUse As Boolean
+
+ lstCurrentDistributions.Clear()
+ cboDistributions.Items.Clear()
For Each Dist In lstAllDistributions
- Select Case strRequiredDistributions
- Case "All"
- lstDistributionNames.Add(translate(Dist.strNameTag))
- lstRequiredDistributions.Add(Dist)
+ bUse = False
+ Select Case strDistributionType
Case "RFunctions"
- If Not Dist.strRFunctionName = "" Then
- lstDistributionNames.Add(translate(Dist.strNameTag))
- lstRequiredDistributions.Add(Dist)
- End If
+ bUse = (Dist.strRFunctionName <> "")
Case "PFunctions"
- If Not Dist.strPFunctionName = "" Then
- lstDistributionNames.Add(translate(Dist.strNameTag))
- lstRequiredDistributions.Add(Dist)
- End If
+ bUse = (Dist.strPFunctionName <> "")
Case "QFunctions"
- If Not Dist.strQFunctionName = "" Then
- lstDistributionNames.Add(translate(Dist.strNameTag))
- lstRequiredDistributions.Add(Dist)
- End If
Case "DFunctions"
- If Not Dist.strDFunctionName = "" Then
- lstDistributionNames.Add(translate(Dist.strNameTag))
- lstRequiredDistributions.Add(Dist)
- End If
Case "GLMFunctions"
- If Not Dist.strGLMFunctionName = "" Then
- lstDistributionNames.Add(translate(Dist.strNameTag))
- lstRequiredDistributions.Add(Dist)
- End If
End Select
+ If Dist.bIncluded And bUse Then
+ lstCurrentDistributions.Add(Dist)
+ cboDistributions.Items.Add(translate(Dist.strNameTag))
+ End If
Next
+ cboDistributions.SelectedIndex = 0
- If Not lstDistributionNames.Count = 0 Then
- cboDistributions.Items.Clear()
- cboDistributions.Items.AddRange(lstDistributionNames.ToArray)
- cboDistributions.SelectedIndex = 0
- End If
End Sub
Public Sub CreateDistributions()
@@ -111,7 +127,7 @@ Public Class ucrDistributions
clsGeometricDist.strPFunctionName = "pgeom"
clsGeometricDist.strQFunctionName = "qgeom"
clsGeometricDist.strDFunctionName = "dgeom"
- clsGeometricDist.AddParameter("prob", "Probability", 1)
+ clsGeometricDist.AddParameter("prob", "Probability", 0.5)
lstAllDistributions.Add(clsGeometricDist)
' Extreme Value Distribution
@@ -177,27 +193,19 @@ Public Class ucrDistributions
End Sub
Public Event cboDistributionsIndexChanged(sender As Object, e As EventArgs)
Private Sub cboDistributions_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboDistributions.SelectedIndexChanged
- clsCurrDistribution = lstRequiredDistributions(cboDistributions.SelectedIndex)
- If strRequiredDistributions <> "All" Then
- ucrBaseButtons.clsRSyntax.ClearParameters()
- Select Case strRequiredDistributions
- Case "RFunctions"
- ucrBaseButtons.clsRsyntax.SetFunction(clsCurrDistribution.strRFunctionName)
- Case "PFunctions"
- ucrBaseButtons.clsRsyntax.SetFunction(clsCurrDistribution.strPFunctionName)
- Case "DFunctions"
- ucrBaseButtons.clsRsyntax.SetFunction(clsCurrDistribution.strDFunctionName)
- Case "QFunctions"
- ucrBaseButtons.clsRsyntax.SetFunction(clsCurrDistribution.strQFunctionName)
- Case "GLMFunctions"
- ucrBaseButtons.clsRsyntax.SetFunction(clsCurrDistribution.strGLMFunctionName)
- End Select
- For Each clsCurrParameter In clsCurrDistribution.clsParameters
- If clsCurrParameter.bHasDefault Then
- ucrBaseButtons.clsRsyntax.AddParameter(clsCurrParameter.strArgumentName, clsCurrParameter.dcmDefaultValue)
- End If
- Next
- End If
+ clsCurrDistribution = lstCurrentDistributions(cboDistributions.SelectedIndex)
+ Select Case strDistributionType
+ Case "RFunctions"
+ clsRSyntax.SetFunction(clsCurrDistribution.strRFunctionName, clsCurrRFunction)
+ Case "PFunctions"
+ clsRSyntax.SetFunction(clsCurrDistribution.strPFunctionName, clsCurrRFunction)
+ Case "DFunctions"
+ clsRSyntax.SetFunction(clsCurrDistribution.strDFunctionName, clsCurrRFunction)
+ Case "QFunctions"
+ clsRSyntax.SetFunction(clsCurrDistribution.strQFunctionName, clsCurrRFunction)
+ Case "GLMFunctions"
+ clsRSyntax.SetFunction(clsCurrDistribution.strGLMFunctionName, clsCurrRFunction)
+ End Select
RaiseEvent cboDistributionsIndexChanged(sender, e)
End Sub
-End Class
+End Class
\ No newline at end of file
diff --git a/instat/ucrDistributionsWithParameters.Designer.vb b/instat/ucrDistributionsWithParameters.Designer.vb
index d39419a09a6..e5dc31fca4f 100644
--- a/instat/ucrDistributionsWithParameters.Designer.vb
+++ b/instat/ucrDistributionsWithParameters.Designer.vb
@@ -29,6 +29,8 @@ Partial Class ucrDistributionsWithParameters
Me.txtParameter1 = New System.Windows.Forms.TextBox()
Me.txtParameter2 = New System.Windows.Forms.TextBox()
Me.txtParameter3 = New System.Windows.Forms.TextBox()
+ Me.txtParameter4 = New System.Windows.Forms.TextBox()
+ Me.lblParameter4 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'lblDistributionParameters
@@ -86,10 +88,27 @@ Partial Class ucrDistributionsWithParameters
Me.txtParameter3.Size = New System.Drawing.Size(100, 20)
Me.txtParameter3.TabIndex = 8
'
+ 'txtParameter4
+ '
+ Me.txtParameter4.Location = New System.Drawing.Point(95, 158)
+ Me.txtParameter4.Name = "txtParameter4"
+ Me.txtParameter4.Size = New System.Drawing.Size(100, 20)
+ Me.txtParameter4.TabIndex = 10
+ '
+ 'lblParameter4
+ '
+ Me.lblParameter4.AutoSize = True
+ Me.lblParameter4.Location = New System.Drawing.Point(9, 165)
+ Me.lblParameter4.Name = "lblParameter4"
+ Me.lblParameter4.Size = New System.Drawing.Size(0, 13)
+ Me.lblParameter4.TabIndex = 9
+ '
'ucrDistributionsWithParameters
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.Controls.Add(Me.txtParameter4)
+ Me.Controls.Add(Me.lblParameter4)
Me.Controls.Add(Me.txtParameter3)
Me.Controls.Add(Me.txtParameter2)
Me.Controls.Add(Me.txtParameter1)
@@ -98,7 +117,7 @@ Partial Class ucrDistributionsWithParameters
Me.Controls.Add(Me.lblParameter1)
Me.Controls.Add(Me.lblDistributionParameters)
Me.Name = "ucrDistributionsWithParameters"
- Me.Size = New System.Drawing.Size(221, 156)
+ Me.Size = New System.Drawing.Size(221, 194)
Me.Controls.SetChildIndex(Me.lblDistributionParameters, 0)
Me.Controls.SetChildIndex(Me.lblParameter1, 0)
Me.Controls.SetChildIndex(Me.lblParameter2, 0)
@@ -106,6 +125,8 @@ Partial Class ucrDistributionsWithParameters
Me.Controls.SetChildIndex(Me.txtParameter1, 0)
Me.Controls.SetChildIndex(Me.txtParameter2, 0)
Me.Controls.SetChildIndex(Me.txtParameter3, 0)
+ Me.Controls.SetChildIndex(Me.lblParameter4, 0)
+ Me.Controls.SetChildIndex(Me.txtParameter4, 0)
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -118,4 +139,6 @@ Partial Class ucrDistributionsWithParameters
Friend WithEvents txtParameter1 As TextBox
Friend WithEvents txtParameter2 As TextBox
Friend WithEvents txtParameter3 As TextBox
+ Friend WithEvents txtParameter4 As TextBox
+ Friend WithEvents lblParameter4 As Label
End Class
diff --git a/instat/ucrDistributionsWithParameters.vb b/instat/ucrDistributionsWithParameters.vb
index 62c2b60a9b1..e7c1a11a7f8 100644
--- a/instat/ucrDistributionsWithParameters.vb
+++ b/instat/ucrDistributionsWithParameters.vb
@@ -59,11 +59,14 @@ Public Class ucrDistributionsWithParameters
If clsCurrDistribution IsNot Nothing Then
lstCurrArguments.Clear()
+ clsRSyntax.ClearParameters(clsCurrRFunction)
+ IncludeFunctionParameter()
For i = 0 To clsCurrDistribution.clsParameters.Count - 1
lstParameterLabels(i).Text = translate(clsCurrDistribution.clsParameters(i).strNameTag)
lstCurrArguments.Add(clsCurrDistribution.clsParameters(i).strArgumentName)
If clsCurrDistribution.clsParameters(i).bHasDefault Then
lstParameterTextBoxes(i).Text = clsCurrDistribution.clsParameters(i).dcmDefaultValue
+ clsRSyntax.AddParameter(clsCurrDistribution.clsParameters(i).strArgumentName, clsCurrDistribution.clsParameters(i).dcmDefaultValue, clsRFunction:=clsCurrRFunction)
Else
lstParameterTextBoxes(i).Clear()
End If
@@ -76,14 +79,14 @@ Public Class ucrDistributionsWithParameters
End Sub
Private Sub txtParameter1_Leave(sender As Object, e As EventArgs) Handles txtParameter1.Leave
- ucrBaseButtons.clsRsyntax.AddParameter(lstCurrArguments(0), txtParameter1.Text)
+ clsRSyntax.AddParameter(lstCurrArguments(0), txtParameter1.Text, clsRFunction:=clsCurrRFunction)
End Sub
Private Sub txtParameter2_Leave(sender As Object, e As EventArgs) Handles txtParameter2.Leave
- ucrBaseButtons.clsRsyntax.AddParameter(lstCurrArguments(1), txtParameter2.Text)
+ clsRSyntax.AddParameter(lstCurrArguments(1), txtParameter2.Text, clsRFunction:=clsCurrRFunction)
End Sub
Private Sub txtParameter3_Leave(sender As Object, e As EventArgs) Handles txtParameter3.Leave
- ucrBaseButtons.clsRsyntax.AddParameter(lstCurrArguments(2), txtParameter3.Text)
+ clsRSyntax.AddParameter(lstCurrArguments(2), txtParameter3.Text, clsRFunction:=clsCurrRFunction)
End Sub
-End Class
+End Class
\ No newline at end of file
diff --git a/instat/ucrNewColumnName.vb b/instat/ucrNewColumnName.vb
index 42e1510d624..1d553e850d1 100644
--- a/instat/ucrNewColumnName.vb
+++ b/instat/ucrNewColumnName.vb
@@ -21,17 +21,33 @@ Public Class ucrNewColumnName
Public lstNextDefaultNames As GenericVector
Public strCurrDataFrame As String
Public strPrefix As String = "Val"
+ Public ucrDataFrameSelector As ucrDataFrame
Private Sub ucrNewColumnName_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ GetNextDefaults()
+ End Sub
+
+ Public Sub SetDataFrameSelector(ucrNewSelector)
+ ucrDataFrameSelector = ucrNewSelector
+ End Sub
+
+ Public Sub SetPrefix(strNewPrefix As String)
+ strPrefix = strNewPrefix
+ GetNextDefaults()
+ SetDefaultName(ucrDataFrameSelector.cboAvailableDataFrames.Text)
+ End Sub
+
+ Public Sub GetNextDefaults()
lstNextDefaultNames = frmMain.clsRLink.GetDefaultNames(strPrefix)
End Sub
Public Sub SetDefaultName(strDataFrame As String)
Dim i As Integer
+
For i = 0 To lstNextDefaultNames.Length - 1
If lstNextDefaultNames.Names(i) = strDataFrame Then
cboColumnName.Text = lstNextDefaultNames.AsCharacter(i)
End If
Next
End Sub
-End Class
+End Class
\ No newline at end of file
diff --git a/instat/ucrReceiver.vb b/instat/ucrReceiver.vb
index 66ac68c939e..94659dd70ef 100644
--- a/instat/ucrReceiver.vb
+++ b/instat/ucrReceiver.vb
@@ -15,10 +15,10 @@
' along with this program. If not, see .
Imports instat.Translations
-'Public MustInherit Class ucrReceiver
Public Class ucrReceiver
Public Selector As ucrSelector
Public strDataType As String = "all"
+ Public clsRSyntax As New RSyntax
Public Overridable Sub AddSelected()
@@ -28,8 +28,14 @@ Public Class ucrReceiver
End Sub
- Public Overridable Function GetVariables() As String
- Return ""
+ Public Overridable Function GetVariables() As RFunction
+ Dim clsGetVariablesFunc As New RFunction
+ Return clsGetVariablesFunc
+ End Function
+
+ Public Overridable Function GetVariableNames() As String
+ Dim strVarNames As String = ""
+ Return strVarNames
End Function
Public Sub SetMeAsReceiver()
@@ -50,4 +56,18 @@ Public Class ucrReceiver
RaiseEvent ValueChanged(sender, e)
End Sub
+ Public Sub SetDataType(strTemp As String)
+ strDataType = strTemp
+ If Selector IsNot Nothing Then
+ Selector.LoadList()
+ End If
+ End Sub
+
+ Public Function MakeValidRString(strTemp As String) As String
+ Dim InvalidStrings() As String = {" ", "-"}
+ For Each strInvalid In InvalidStrings
+ strTemp = Replace(strTemp, strInvalid, "")
+ Next
+ Return strTemp
+ End Function
End Class
diff --git a/instat/ucrReceiverMultiple.designer.vb b/instat/ucrReceiverMultiple.designer.vb
index 5fb70b19b1a..5316619c92c 100644
--- a/instat/ucrReceiverMultiple.designer.vb
+++ b/instat/ucrReceiverMultiple.designer.vb
@@ -28,7 +28,7 @@ Partial Class ucrReceiverMultiple
Me.lstSelectedVariables.Location = New System.Drawing.Point(3, 5)
Me.lstSelectedVariables.MultiColumn = True
Me.lstSelectedVariables.Name = "lstSelectedVariables"
- Me.lstSelectedVariables.Size = New System.Drawing.Size(115, 121)
+ Me.lstSelectedVariables.Size = New System.Drawing.Size(113, 95)
Me.lstSelectedVariables.Sorted = True
Me.lstSelectedVariables.TabIndex = 0
'
diff --git a/instat/ucrReceiverMultiple.vb b/instat/ucrReceiverMultiple.vb
index bbdad47fa6a..60243b7fda3 100644
--- a/instat/ucrReceiverMultiple.vb
+++ b/instat/ucrReceiverMultiple.vb
@@ -43,8 +43,53 @@ Public Class ucrReceiverMultiple
End If
End Sub
- Public Overrides Function GetVariables() As String
- Return "To do"
+ Public Overrides Function GetVariables() As RFunction
+ 'TODO sort this out
+ Dim clsGetVariablesFunc As New RFunction
+ Dim lstCurrDataFrames As List(Of String)
+ Dim strCurrDataFrame As String
+ lstCurrDataFrames = GetDataFrameNames()
+
+ If lstCurrDataFrames.Count = 1 Then
+ strCurrDataFrame = lstCurrDataFrames(0)
+ clsRSyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data", clsFunction:=clsGetVariablesFunc)
+ clsRSyntax.AddParameter("data_name", Chr(34) & strCurrDataFrame & Chr(34), clsRFunction:=clsGetVariablesFunc)
+ clsRSyntax.AddParameter("col_names", GetVariableNames(), clsRFunction:=clsGetVariablesFunc)
+ 'TODO make this an option set in Options menu
+ 'clsRSyntax.SetAssignTo(MakeValidRString(strCurrDataFrame) & "_temp", clsFunction:=clsGetVariablesFunc)
+ Else
+ End If
+ Return clsGetVariablesFunc
+ End Function
+
+ Public Overrides Function GetVariableNames() As String
+ Dim strTemp As String = ""
+ Dim i As Integer
+ If objSelected.Count = 1 Then
+ strTemp = objSelected(0).Text
+ ElseIf objSelected.Count > 1 Then
+ strTemp = "c" & "("
+ For i = 0 To objSelected.Count - 1
+ If i > 0 Then
+ strTemp = strTemp & ","
+ End If
+ strTemp = strTemp & Chr(34) & objSelected(i).Text & Chr(34)
+ Next
+ strTemp = strTemp & ")"
+ End If
+
+ Return strTemp
End Function
+ Public Function GetDataFrameNames() As List(Of String)
+ Dim strDataFrames As New List(Of String)
+
+ For Each CurrObj In objSelected
+ If Not strDataFrames.Contains(CurrObj.Group.ToString) Then
+ strDataFrames.Add(CurrObj.Group.ToString)
+ End If
+ Next
+
+ Return strDataFrames
+ End Function
End Class
\ No newline at end of file
diff --git a/instat/ucrReceiverSingle.vb b/instat/ucrReceiverSingle.vb
index 32ca55f38fb..9e620006ab1 100644
--- a/instat/ucrReceiverSingle.vb
+++ b/instat/ucrReceiverSingle.vb
@@ -38,14 +38,28 @@ Public Class ucrReceiverSingle
End If
End Sub
- Public Overrides Function GetVariables() As String
+ Public Overrides Function GetVariables() As RFunction
+ 'return columns (in data frame) in both cases
+ 'call GetVariableNames
+ Dim clsGetVariablesFunc As New RFunction
If bSelected Then
- Return frmMain.clsRLink.strInstatDataObject & "$get_column_from_data(obj_name = " & Chr(34) & objSelected.Group.ToString() & Chr(34) & ", col_name = " & Chr(34) & objSelected.Text & Chr(34) & ")"
+ clsRSyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data", clsFunction:=clsGetVariablesFunc)
+ clsRSyntax.AddParameter("data_name", Chr(34) & objSelected.Group.ToString() & Chr(34), clsRFunction:=clsGetVariablesFunc)
+ clsRSyntax.AddParameter("col_name", GetVariableNames(), clsRFunction:=clsGetVariablesFunc)
+ 'TODO make this an option set in Options menu
+ clsRSyntax.SetAssignTo(MakeValidRString(objSelected.Text), clsFunction:=clsGetVariablesFunc)
+ Return clsGetVariablesFunc
Else
- Return ""
+ Return clsGetVariablesFunc
End If
End Function
+ Public Overrides Function GetVariableNames() As String
+ Return Chr(34) & objSelected.Text & Chr(34)
+ 'in multiple return c( 'column names' )
+ End Function
+
+
Private Sub txtReceiverSingle_TextChanged(sender As Object, e As EventArgs) Handles txtReceiverSingle.TextChanged
OnValueChanged(sender, e)
End Sub
diff --git a/instat/ucrSelector.designer.vb b/instat/ucrSelector.designer.vb
index 804956dad1e..049e6e66c58 100644
--- a/instat/ucrSelector.designer.vb
+++ b/instat/ucrSelector.designer.vb
@@ -22,19 +22,19 @@ Partial Class ucrSelector
'Do not modify it using the code editor.
Private Sub InitializeComponent()
- Me.lblAvailableVariables = New System.Windows.Forms.Label()
+ Me.lblVariables = New System.Windows.Forms.Label()
Me.lstAvailableVariable = New System.Windows.Forms.ListView()
Me.SuspendLayout()
'
- 'lblAvailableVariables
+ 'lblVariables
'
- Me.lblAvailableVariables.AutoSize = True
- Me.lblAvailableVariables.Location = New System.Drawing.Point(5, 2)
- Me.lblAvailableVariables.Name = "lblAvailableVariables"
- Me.lblAvailableVariables.Size = New System.Drawing.Size(102, 13)
- Me.lblAvailableVariables.TabIndex = 82
- Me.lblAvailableVariables.Tag = "Available_Variables "
- Me.lblAvailableVariables.Text = "Available Variables "
+ Me.lblVariables.AutoSize = True
+ Me.lblVariables.Location = New System.Drawing.Point(5, 2)
+ Me.lblVariables.Name = "lblVariables"
+ Me.lblVariables.Size = New System.Drawing.Size(53, 13)
+ Me.lblVariables.TabIndex = 82
+ Me.lblVariables.Tag = "Variables:"
+ Me.lblVariables.Text = "Variables:"
'
'lstAvailableVariable
'
@@ -53,13 +53,14 @@ Partial Class ucrSelector
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Controls.Add(Me.lstAvailableVariable)
- Me.Controls.Add(Me.lblAvailableVariables)
+ Me.Controls.Add(Me.lblVariables)
Me.Name = "ucrSelector"
Me.Size = New System.Drawing.Size(124, 127)
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
- Friend WithEvents lblAvailableVariables As Label
- Friend WithEvents lstAvailableVariable As ListView
+
+ Protected Friend WithEvents lblVariables As Label
+ Protected Friend WithEvents lstAvailableVariable As ListView
End Class
diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb
index 8646b93e677..d3930c3adaf 100644
--- a/instat/ucrSelector.vb
+++ b/instat/ucrSelector.vb
@@ -24,7 +24,6 @@ Public Class ucrSelector
End Sub
Public Overridable Sub LoadList(Optional strDataType As String = "all")
- 'TODO should this be run? Or do we assume SetCurrentReceiver has been done by now.
frmMain.clsRLink.FillListView(lstAvailableVariable, strDataType)
End Sub
diff --git a/instat/ucrSelectorByDataFrame.Designer.vb b/instat/ucrSelectorByDataFrame.Designer.vb
index 6cab97746fe..c1350ec526b 100644
--- a/instat/ucrSelectorByDataFrame.Designer.vb
+++ b/instat/ucrSelectorByDataFrame.Designer.vb
@@ -25,9 +25,17 @@ Partial Class ucrSelectorByDataFrame
Me.ucrAvailableDataFrames = New instat.ucrDataFrame()
Me.SuspendLayout()
'
+ 'lblAvailableVariables
+ '
+ Me.lblVariables.Location = New System.Drawing.Point(3, 52)
+ '
+ 'lstAvailableVariable
+ '
+ Me.lstAvailableVariable.Location = New System.Drawing.Point(3, 72)
+ '
'ucrAvailableDataFrames
'
- Me.ucrAvailableDataFrames.Location = New System.Drawing.Point(2, 128)
+ Me.ucrAvailableDataFrames.Location = New System.Drawing.Point(3, 3)
Me.ucrAvailableDataFrames.Name = "ucrAvailableDataFrames"
Me.ucrAvailableDataFrames.Size = New System.Drawing.Size(127, 41)
Me.ucrAvailableDataFrames.TabIndex = 84
@@ -39,6 +47,8 @@ Partial Class ucrSelectorByDataFrame
Me.Controls.Add(Me.ucrAvailableDataFrames)
Me.Name = "ucrSelectorByDataFrame"
Me.Size = New System.Drawing.Size(133, 179)
+ Me.Controls.SetChildIndex(Me.lblVariables, 0)
+ Me.Controls.SetChildIndex(Me.lstAvailableVariable, 0)
Me.Controls.SetChildIndex(Me.ucrAvailableDataFrames, 0)
Me.ResumeLayout(False)
Me.PerformLayout()
diff --git a/instat/ucrSelectorByDataFrameAddRemove.Designer.vb b/instat/ucrSelectorByDataFrameAddRemove.Designer.vb
index 45e917aaa51..315210dae3b 100644
--- a/instat/ucrSelectorByDataFrameAddRemove.Designer.vb
+++ b/instat/ucrSelectorByDataFrameAddRemove.Designer.vb
@@ -28,7 +28,7 @@ Partial Class ucrSelectorByDataFrameAddRemove
'
'btnAdd
'
- Me.btnAdd.Location = New System.Drawing.Point(149, 39)
+ Me.btnAdd.Location = New System.Drawing.Point(149, 95)
Me.btnAdd.Name = "btnAdd"
Me.btnAdd.Size = New System.Drawing.Size(75, 23)
Me.btnAdd.TabIndex = 85
@@ -38,7 +38,7 @@ Partial Class ucrSelectorByDataFrameAddRemove
'
'btnRemove
'
- Me.btnRemove.Location = New System.Drawing.Point(149, 81)
+ Me.btnRemove.Location = New System.Drawing.Point(149, 136)
Me.btnRemove.Name = "btnRemove"
Me.btnRemove.Size = New System.Drawing.Size(75, 23)
Me.btnRemove.TabIndex = 86
@@ -54,6 +54,8 @@ Partial Class ucrSelectorByDataFrameAddRemove
Me.Controls.Add(Me.btnAdd)
Me.Name = "ucrSelectorByDataFrameAddRemove"
Me.Size = New System.Drawing.Size(242, 179)
+ Me.Controls.SetChildIndex(Me.lblVariables, 0)
+ Me.Controls.SetChildIndex(Me.lstAvailableVariable, 0)
Me.Controls.SetChildIndex(Me.btnAdd, 0)
Me.Controls.SetChildIndex(Me.btnRemove, 0)
Me.ResumeLayout(False)