Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Fidel365 committed Apr 22, 2024
1 parent af37f9e commit 3d22fdd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 30 deletions.
4 changes: 2 additions & 2 deletions instat/ucrCalculator.Designer.vb

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

2 changes: 1 addition & 1 deletion instat/ucrCalculator.resx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,6 @@
<value>759, 103</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>99</value>
<value>65</value>
</metadata>
</root>
36 changes: 9 additions & 27 deletions instat/ucrCalculator.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3d22fdd

Please sign in to comment.