diff --git a/instat/ucrCalculator.Designer.vb b/instat/ucrCalculator.Designer.vb index f0a25ed9e37..71b01204a25 100644 --- a/instat/ucrCalculator.Designer.vb +++ b/instat/ucrCalculator.Designer.vb @@ -6957,7 +6957,7 @@ Partial Class ucrCalculator Me.grpList.Controls.Add(Me.cmdListSum) Me.grpList.Controls.Add(Me.cmdListSumd) Me.grpList.Controls.Add(Me.cmdListMissing) - Me.grpList.Location = New System.Drawing.Point(438, 42) + Me.grpList.Location = New System.Drawing.Point(438, 52) Me.grpList.Margin = New System.Windows.Forms.Padding(2) Me.grpList.Name = "grpList" Me.grpList.Padding = New System.Windows.Forms.Padding(2) @@ -7618,7 +7618,7 @@ Partial Class ucrCalculator ' Me.cmdRhelpList.AutoSize = True Me.cmdRhelpList.ContextMenuStrip = Me.ContextMenuStripList - Me.cmdRhelpList.Location = New System.Drawing.Point(674, 26) + Me.cmdRhelpList.Location = New System.Drawing.Point(678, 26) Me.cmdRhelpList.Margin = New System.Windows.Forms.Padding(2) Me.cmdRhelpList.Name = "cmdRhelpList" Me.cmdRhelpList.Size = New System.Drawing.Size(68, 23) diff --git a/instat/ucrCalculator.resx b/instat/ucrCalculator.resx index b436018d56a..fab1bf083ba 100644 --- a/instat/ucrCalculator.resx +++ b/instat/ucrCalculator.resx @@ -163,6 +163,6 @@ 759, 103 - 99 + 65 \ No newline at end of file diff --git a/instat/ucrCalculator.vb b/instat/ucrCalculator.vb index e8833c8a3c6..8d86b09a414 100644 --- a/instat/ucrCalculator.vb +++ b/instat/ucrCalculator.vb @@ -128,6 +128,7 @@ Public Class ucrCalculator ttCalculator.SetToolTip(cmdDuplicate, "duplicate detects non-unique values, for example duplicated(c(1:3,2,7)) gives FALSE, FALSE, FALSE, TRUE, FALSE") ttCalculator.SetToolTip(cmdNear, "near(x,y)compares 2 variables. For example sqrt(5)^2 is almost, but isn't exactly 5, however near(sqrt(5)^2,5) is TRUE") ttCalculator.SetToolTip(cmdnumeric, "Define a variable as numeric. For example as numeric(c(TRUE,TRUE,FALSE,TRUE)) gives (1, 1,0, 1) ") + ttCalculator.SetToolTip(cmdSquareBrackets, "Extract one or more elements from a column (or data frame") ttCalculator.SetToolTip(cmdTilde, "This is called tilde and links the left side and right side of a formula") ttCalculator.SetToolTip(cmdCalcConcantenateFunction, "Combines arguments to form a single vector, e.g. c(1:3 8) is 1, 2, 3, 8") ttCalculator.SetToolTip(cmdCalcRepelicationFunction, "Repeat of a sequence, e.g. rep(c(2, 3, 4), each=2) gives 2, 2, 3, 3, 4, 4") @@ -2805,38 +2806,19 @@ Public Class ucrCalculator End Sub Private Sub cmdid_Click(sender As Object, e As EventArgs) Handles cmdid.Click - Dim clsWakefieldInternetBrowserFunction As New RFunction + Dim clsWakefieldIDFunction As New RFunction Dim clsWakefieldNrowFunction As New RFunction - Dim clsBrowserListFunction As New RFunction - Dim clsBrowserProbFunction As New RFunction clsWakefieldNrowFunction.SetRCommand("nrow") clsWakefieldNrowFunction.AddParameter("x", ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, iPosition:=0) - clsBrowserListFunction.SetRCommand("c") - clsBrowserListFunction.AddParameter("chrome", Chr(34) & "Chrome" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) - clsBrowserListFunction.AddParameter("IE", Chr(34) & "IE" & Chr(34), iPosition:=1, bIncludeArgumentName:=False) - clsBrowserListFunction.AddParameter("firefox", Chr(34) & "Firefox" & Chr(34), iPosition:=2, bIncludeArgumentName:=False) - clsBrowserListFunction.AddParameter("safari", Chr(34) & "Safari" & Chr(34), iPosition:=3, bIncludeArgumentName:=False) - clsBrowserListFunction.AddParameter("opera", Chr(34) & "Opera" & Chr(34), iPosition:=4, bIncludeArgumentName:=False) - clsBrowserListFunction.AddParameter("android", Chr(34) & "Android" & Chr(34), iPosition:=5, bIncludeArgumentName:=False) - - clsBrowserProbFunction.SetRCommand("c") - clsBrowserProbFunction.AddParameter("0.5027", "0.5027", iPosition:=0, bIncludeArgumentName:=False) - clsBrowserProbFunction.AddParameter("0.175", "0.175", iPosition:=1, bIncludeArgumentName:=False) - clsBrowserProbFunction.AddParameter("0.1689", "0.1689", iPosition:=2, bIncludeArgumentName:=False) - clsBrowserProbFunction.AddParameter("0.0994", "0.0994", iPosition:=3, bIncludeArgumentName:=False) - clsBrowserProbFunction.AddParameter("0.017", "0.017", iPosition:=4, bIncludeArgumentName:=False) - clsBrowserProbFunction.AddParameter("0.0132", "0.0132", iPosition:=5, bIncludeArgumentName:=False) - - clsWakefieldInternetBrowserFunction.SetPackageName("wakefield") - clsWakefieldInternetBrowserFunction.SetRCommand("internet_browser") - clsWakefieldInternetBrowserFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0) - clsWakefieldInternetBrowserFunction.AddParameter("x", clsRFunctionParameter:=clsBrowserListFunction, iPosition:=1) - clsWakefieldInternetBrowserFunction.AddParameter("prob", clsRFunctionParameter:=clsBrowserProbFunction, iPosition:=2) - clsWakefieldInternetBrowserFunction.AddParameter("name", Chr(34) & "Browser" & Chr(34), iPosition:=3) - - ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldInternetBrowserFunction.ToScript, 0) + clsWakefieldIDFunction.SetPackageName("wakefield") + clsWakefieldIDFunction.SetRCommand("id") + clsWakefieldIDFunction.AddParameter("n", clsRFunctionParameter:=clsWakefieldNrowFunction, iPosition:=0) + clsWakefieldIDFunction.AddParameter("random", "FALSE", iPosition:=1) + clsWakefieldIDFunction.AddParameter("name", Chr(34) & "ID" & Chr(34), iPosition:=2) + + ucrReceiverForCalculation.AddToReceiverAtCursorPosition(clsWakefieldIDFunction.ToScript, 0) End Sub Private Sub cmdIq_Click(sender As Object, e As EventArgs) Handles cmdIq.Click